Unit GetByPath
- Last UpdatedJun 15, 2023
- 1 minute read
- PI System
- PI Web API Reference
- Developer
Unit GetByPath
Retrieve a unit by path.
Request
GET units
URL Parameters
-
path The path to the unit. See Path Syntax 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 specified unit.
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"
}
}