GET api/Unit/{id}
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id | integer |
Required |
Body Parameters
None.
Response Information
Resource Description
UnitViewModelName | Description | Type | Additional information |
---|---|---|---|
Id | globally unique identifier |
None. |
|
Name | string |
None. |
|
LocLat | decimal number |
None. |
|
LocLong | decimal number |
None. |
|
DateCreated | string |
Data type: Text |
|
Sensors | Collection of SensorModel |
None. |
Response Formats
application/json, text/json
Sample:
{ "Id": "a1f4232a-0bd9-43ca-a202-57b2cbf2cc7b", "Name": "sample string 2", "LocLat": 3.1, "LocLong": 4.1, "DateCreated": "sample string 5", "Sensors": [ { "Id": "0f4f45a1-a7fc-417c-b457-8aadd991ef48", "Manufacturer": "sample string 2", "Model": "sample string 3", "DateCreated": "2025-01-22T21:02:00.3753137+01:00" }, { "Id": "0f4f45a1-a7fc-417c-b457-8aadd991ef48", "Manufacturer": "sample string 2", "Model": "sample string 3", "DateCreated": "2025-01-22T21:02:00.3753137+01:00" } ] }
application/xml, text/xml
Sample:
<UnitViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WaterLab.Models"> <DateCreated>sample string 5</DateCreated> <Id>a1f4232a-0bd9-43ca-a202-57b2cbf2cc7b</Id> <LocLat>3.1</LocLat> <LocLong>4.1</LocLong> <Name>sample string 2</Name> <Sensors> <SensorModel> <DateCreated>2025-01-22T21:02:00.3753137+01:00</DateCreated> <Id>0f4f45a1-a7fc-417c-b457-8aadd991ef48</Id> <Manufacturer>sample string 2</Manufacturer> <Model>sample string 3</Model> </SensorModel> <SensorModel> <DateCreated>2025-01-22T21:02:00.3753137+01:00</DateCreated> <Id>0f4f45a1-a7fc-417c-b457-8aadd991ef48</Id> <Manufacturer>sample string 2</Manufacturer> <Model>sample string 3</Model> </SensorModel> </Sensors> </UnitViewModel>