AssetServer GetUnitClasses
- Last UpdatedJun 15, 2023
- 1 minute read
- PI System
- PI Web API Reference
- Developer
AssetServer GetUnitClasses
Retrieve a list of all unit classes on the specified Asset Server.
Request
GET assetservers/{webId}/unitclasses
URL Parameters
-
webId The ID of the server. See WebID for more information.
-
selectedFields List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned. See Selected Fields for more information.
-
webIdType Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType". See WebID Type for more information.
Status Codes
200: A list of unit classes.
Sample Response Body
{
"Items": [
{
"WebId": "I1UCDqD5loBNH0erqeqJodtALATbkl-fxulEulDQAVw5HySQ",
"Id": "f925b94d-6efc-4b94-a50d-0015c391f249",
"Name": "Power",
"Description": "Power Unit Class",
"CanonicalUnitName": "watt",
"CanonicalUnitAbbreviation": "W",
"Path": "\\\\MyAssetServer\\UOMDatabase\\UOMClasses[Power]",
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/unitclasses/I1UCDqD5loBNH0erqeqJodtALATbkl-fxulEulDQAVw5HySQ"
}
},
{
"WebId": "I1UCDqD5loBNH0erqeqJodtALATbkl-fxulEulDQAVw5HySQ",
"Id": "f925b94d-6efc-4b94-a50d-0015c391f249",
"Name": "Power",
"Description": "Power Unit Class",
"CanonicalUnitName": "watt",
"CanonicalUnitAbbreviation": "W",
"Path": "\\\\MyAssetServer\\UOMDatabase\\UOMClasses[Power]",
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/unitclasses/I1UCDqD5loBNH0erqeqJodtALATbkl-fxulEulDQAVw5HySQ"
}
}
],
"Links": {}
}