AttributeTemplate CreateAttributeTemplate
- Last UpdatedJun 15, 2023
- 1 minute read
- PI System
- PI Web API Reference
- Developer
AttributeTemplate CreateAttributeTemplate
Create an attribute template as a child of another attribute template.
Request
POST attributetemplates/{webId}/attributetemplates
URL Parameters
-
webId The ID of the parent attribute template on which to create the attribute template. See WebID 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.
Body Parameter
The attribute template definition.
Status Codes
201: The attribute template was created. The response's Location header is a link to the created resource.
Sample Request Body
{
"Name": "Water(2008)",
"Description": "2008 Water Use",
"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,
"CategoryNames": [
"Energy Savings Targets"
],
"TraitName": "LimitLoLo"
}