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

PI Web API Reference

AssetDatabase CreateElementTemplate

AssetDatabase CreateElementTemplate

Create a template at the Asset Database root. Specify InstanceType of "Element" or "EventFrame" to create element or event frame template respectively. Only these two types of templates can be created.

Remarks

Elements and event frames that are based on an element template will inherit characteristics defined in the template.

Request

POST assetdatabases/{webId}/elementtemplates

URL Parameters

  • webId

    The ID of the database in which to create the element 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 new element template definition.

Status Codes

201: The element template was created. The response's Location header is a link to the created template.

Sample Request Body

{
  "Name": "MachineName",
  "Description": "Manufacturing Machine MachineName",
  "AllowElementToExtend": false,
  "BaseTemplate": "Equipment",
  "InstanceType": "Element",
  "NamingPattern": "%TEMPLATE%",
  "CategoryNames": [
    "Equipment Assets"
  ],
  "ExtendedProperties": {},
  "Severity": "None",
  "CanBeAcknowledged": false
}
In This Topic
TitleResults for “How to create a CRG?”Also Available in