GET api/units
Gets all measurement units.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
RelatedUnitId | integer |
None. |
|
ClassId | integer |
None. |
|
IsDefault | boolean |
None. |
|
ShortName | string |
Max length: 10 |
|
MediumName | string |
Max length: 15 |
|
LongName | string |
Max length: 30 |
|
Conversion | decimal number |
None. |
|
Seconds | integer |
None. |
|
BaseUnitId | integer |
None. |
Body Parameters
None.
Response Information
Resource Description
Collection of UnitViewModelName | Description | Type | Additional information |
---|---|---|---|
Id | integer |
Required |
|
ClassId | integer |
Required |
|
IsDefault | boolean |
None. |
|
ShortName | string |
Required Max length: 10 |
|
MediumName | string |
Required Max length: 15 |
|
LongName | string |
Required Max length: 30 |
|
Conversion | decimal number |
Required |
|
Seconds | integer |
None. |
|
BaseUnitId | integer |
None. |
|
Links |
Gets the links. |
Collection of LinkModel |
None. |
Response Formats
application/json, text/json
Sample:
[ { "id": 1, "classId": 2, "isDefault": true, "shortName": "sample string 4", "mediumName": "sample string 5", "longName": "sample string 6", "conversion": 7.1, "seconds": 1, "baseUnitId": 1 }, { "id": 1, "classId": 2, "isDefault": true, "shortName": "sample string 4", "mediumName": "sample string 5", "longName": "sample string 6", "conversion": 7.1, "seconds": 1, "baseUnitId": 1 } ]
application/xml, text/xml
Sample:
<ArrayOfUnitViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TelogWebAPI.Models"> <UnitViewModel> <BaseUnitId>1</BaseUnitId> <ClassId>2</ClassId> <Conversion>7.1</Conversion> <Id>1</Id> <IsDefault>true</IsDefault> <LongName>sample string 6</LongName> <MediumName>sample string 5</MediumName> <Seconds>1</Seconds> <ShortName>sample string 4</ShortName> </UnitViewModel> <UnitViewModel> <BaseUnitId>1</BaseUnitId> <ClassId>2</ClassId> <Conversion>7.1</Conversion> <Id>1</Id> <IsDefault>true</IsDefault> <LongName>sample string 6</LongName> <MediumName>sample string 5</MediumName> <Seconds>1</Seconds> <ShortName>sample string 4</ShortName> </UnitViewModel> </ArrayOfUnitViewModel>