AttributeTemplate GetByPath
- Last UpdatedJun 15, 2023
- 1 minute read
- PI System
- PI Web API Reference
- Developer
AttributeTemplate GetByPath
Retrieve an attribute template by path.
Remarks
This method returns an attribute template based on the hierarchical path associated with it, and should be used when a path has been received from a separate part of the PI System for use in the PI Web API. Users should primarily search with the WebID when available.
Request
GET attributetemplates
URL Parameters
-
path The path to the attribute template. 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 attribute template.
Sample Response Body
{
"WebId": "I1ATEG_auSSsvuECG8ad_p8b25QQkxqWDwIWU6zC4vmgpd4kgtSfQI9VdxUGA8fi1yf9DVg",
"Id": "23d027b5-5dd5-41c5-80f1-f8b5c9ff4356",
"Name": "Water(2008)",
"Description": "2008 Water Use",
"Path": "\\\\MyAssetServer\\MyDatabase\\ElementTemplates[MachineName]|Water(2008)",
"Type": "Int32",
"TypeQualifier": "",
"DefaultUnitsName": "liter",
"DefaultValue": 0,
"DataReferencePlugIn": "Table Lookup",
"ConfigString": "SELECT [Water Use] FROM [Energy Use 2008] WHERE [Asset ID] = '%Element%'",
"IsConfigurationItem": false,
"IsExcluded": false,
"IsHidden": false,
"IsManualDataEntry": false,
"HasChildren": false,
"CategoryNames": [
"Energy Savings Targets"
],
"TraitName": "LimitLoLo",
"DefaultUnitsNameAbbreviation": "L",
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/attributetemplates/I1ATEG_auSSsvuECG8ad_p8b25QQkxqWDwIWU6zC4vmgpd4kgtSfQI9VdxUGA8fi1yf9DVg"
}
}