UnitClass GetCanonicalUnit
- Last UpdatedJun 15, 2023
- 1 minute read
- PI System
- PI Web API Reference
- Developer
UnitClass GetCanonicalUnit
Get the canonical unit of a unit class.
Request
GET unitclasses/{webId}/canonicalunit
URL Parameters
-
webId The ID of unit class. 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: the canonical unit of the specified unit class.
Sample Response Body
{
"WebId": "I1UtDqD5loBNH0erqeqJodtALAjqwhgeI8lEeV4xeD1db0_A",
"Id": "8121ac8e-3ce2-4794-95e3-1783d5d6f4fc",
"Name": "Hertz",
"Abbreviation": "Hz",
"Description": "Hertz Unit",
"Path": "\\\\MyAssetServer\\UOMDatabase\\Hertz",
"Factor": 1.0,
"Offset": 0.0,
"ReferenceFactor": 1.0,
"ReferenceOffset": 0.0,
"ReferenceUnitAbbreviation": "",
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/units/I1UtDqD5loBNH0erqeqJodtALAjqwhgeI8lEeV4xeD1db0_A"
}
}