Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Web API Reference

ElementTemplate GetAttributeTemplates

ElementTemplate GetAttributeTemplates

Get child attribute templates for an element template.

Remarks

If 'showInherited' and 'showDescendants' are 'true', it returns all the attribute templates from current element template and the base template. If 'showInherited' is 'false', it returns all the attribute templates from the current element template.

Request

GET elementtemplates/{webId}/attributetemplates

URL Parameters

  • webId

    The ID of the element template. See WebID for more information.

  • showInherited

    Specifies if the result should include attribute templates inherited from base element templates. The default is 'false'.

  • showDescendants

    Specifies if the result should include all descendant attribute templates from the current element template, even indirect ones. The default is 'false'.

  • depthFirstTraverse

    When 'true', a Depth First traversal will be performed; this starts at the root and explores as far as possible along each branch before backtracking. When 'false', a Breadth First traversal will be performed; this starts at the tree root and explores the neighbor nodes first, then moves onto the next level of neighbors. The default is 'false' (Breadth First).

  • startIndex

    The starting index (zero based) of the items to be returned. The default is 0.

  • maxCount

    The maximum number of objects to be returned. The default is 1000.

  • 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: A list of attribute templates for the specified element template.

Sample Response Body

{
  "Items": [
    {
      "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"
      }
    },
    {
      "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"
      }
    }
  ],
  "Links": {}
}
In This Topic
TitleResults for “How to create a CRG?”Also Available in