Element GetPaths
- Last UpdatedJun 15, 2023
- 1 minute read
- PI System
- PI Web API Reference
- Developer
Element GetPaths
Get a list of the full or relative paths to this element.
Remarks
This method will return paths with the primary path at the first index. If there is no primary path, then null will be at the first index. If relative path is specified but does not exist, null will be returned at the first index.
Request
GET elements/{webId}/paths
URL Parameters
-
webId The ID of the element. See WebID for more information.
-
relativePath The full path in ShortName format to the parent object that the returned paths should be relative. For example, "\\Server1\Database2" would return all the paths to the element relative to the database. A path of "\\Server1\Database2\RootElement" would return all paths to the element relative to "RootElement". If null, then all the full paths to the element will be returned.
Status Codes
200: A list of the full or relative paths to this element.
Sample Response Body
{
"Items": [
"\\\\MyAssetServer\\Machines\\MyLocation\\Active\\MyMachine",
"\\\\MyAssetServer\\Machines\\Provider\\MyProviderCompany\\Active\\MyMachine",
"\\\\MyAssetServer\\Machines\\Active\\MyMachine"
]
}