GET api/Unit
Request Information
URI Parameters
None.
Body Parameters
None.
Response Information
Resource Description
Collection of 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": "ca1c8e4a-7d89-4058-accb-1c33aec83f11", "Name": "sample string 2", "LocLat": 3.1, "LocLong": 4.1, "DateCreated": "sample string 5", "Sensors": [ { "Id": "b353877c-c203-4f8e-abea-6e25bb312262", "Manufacturer": "sample string 2", "Model": "sample string 3", "DateCreated": "2025-01-22T20:49:17.6513592+01:00" }, { "Id": "b353877c-c203-4f8e-abea-6e25bb312262", "Manufacturer": "sample string 2", "Model": "sample string 3", "DateCreated": "2025-01-22T20:49:17.6513592+01:00" } ] }, { "Id": "ca1c8e4a-7d89-4058-accb-1c33aec83f11", "Name": "sample string 2", "LocLat": 3.1, "LocLong": 4.1, "DateCreated": "sample string 5", "Sensors": [ { "Id": "b353877c-c203-4f8e-abea-6e25bb312262", "Manufacturer": "sample string 2", "Model": "sample string 3", "DateCreated": "2025-01-22T20:49:17.6513592+01:00" }, { "Id": "b353877c-c203-4f8e-abea-6e25bb312262", "Manufacturer": "sample string 2", "Model": "sample string 3", "DateCreated": "2025-01-22T20:49:17.6513592+01:00" } ] } ]
application/xml, text/xml
Sample:
<ArrayOfUnitViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WaterLab.Models"> <UnitViewModel> <DateCreated>sample string 5</DateCreated> <Id>ca1c8e4a-7d89-4058-accb-1c33aec83f11</Id> <LocLat>3.1</LocLat> <LocLong>4.1</LocLong> <Name>sample string 2</Name> <Sensors> <SensorModel> <DateCreated>2025-01-22T20:49:17.6513592+01:00</DateCreated> <Id>b353877c-c203-4f8e-abea-6e25bb312262</Id> <Manufacturer>sample string 2</Manufacturer> <Model>sample string 3</Model> </SensorModel> <SensorModel> <DateCreated>2025-01-22T20:49:17.6513592+01:00</DateCreated> <Id>b353877c-c203-4f8e-abea-6e25bb312262</Id> <Manufacturer>sample string 2</Manufacturer> <Model>sample string 3</Model> </SensorModel> </Sensors> </UnitViewModel> <UnitViewModel> <DateCreated>sample string 5</DateCreated> <Id>ca1c8e4a-7d89-4058-accb-1c33aec83f11</Id> <LocLat>3.1</LocLat> <LocLong>4.1</LocLong> <Name>sample string 2</Name> <Sensors> <SensorModel> <DateCreated>2025-01-22T20:49:17.6513592+01:00</DateCreated> <Id>b353877c-c203-4f8e-abea-6e25bb312262</Id> <Manufacturer>sample string 2</Manufacturer> <Model>sample string 3</Model> </SensorModel> <SensorModel> <DateCreated>2025-01-22T20:49:17.6513592+01:00</DateCreated> <Id>b353877c-c203-4f8e-abea-6e25bb312262</Id> <Manufacturer>sample string 2</Manufacturer> <Model>sample string 3</Model> </SensorModel> </Sensors> </UnitViewModel> </ArrayOfUnitViewModel>