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

PI Web API Reference

AssetDatabase GetAnalysisTemplates

AssetDatabase GetAnalysisTemplates

Retrieve analysis templates based on the specified criteria. By default, all analysis templates in the specified Asset Database are returned.

Remarks

Users can search for the analysis templates based on specific search parameters. If no parameters are specified in the search, the default values for each parameter will be used and will return the templates that match the default search.

Request

GET assetdatabases/{webId}/analysistemplates

URL Parameters

  • webId

    The ID of the database to search. See WebID for more information.

  • field

    Specifies which of the object's properties are searched. See Search Field for more information. Multiple search fields may be specified with multiple instances of the parameter. The default is 'Name'.

  • query

    The query string used for finding objects. The default is no query string. See Query String for more information.

  • sortField

    The field or property of the object used to sort the returned collection. The default is 'Name'.

  • sortOrder

    The order that the returned collection is sorted. The default is 'Ascending'.

  • maxCount

    The maximum number of objects to be returned per call (page size). 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 analysis templates matching the specified condition.

Sample Response Body

{
  "Items": [
    {
      "WebId": "I1XTG_auSSsvuECG8ad_p8b25QEZgtYQY_J06YnELl5cALiA",
      "Id": "612d9811-3f06-4e27-989c-42e5e5c00b88",
      "Name": "MyAnalysisTemplate",
      "Description": "",
      "Path": "\\\\MyAssetServer\\MyDatabase\\AnalysisTemplates[MyAnalysisTemplate]",
      "AnalysisRulePlugInName": "PerformanceEquation",
      "CategoryNames": [
        "MyAnalysisCategory"
      ],
      "CreateEnabled": true,
      "GroupId": 0,
      "HasNotificationTemplate": false,
      "HasTarget": false,
      "OutputTime": "",
      "TargetName": "MyElementTemplate",
      "TimeRulePlugInName": "Periodic",
      "Links": {
        "Self": "https://localhost.osisoft.int/piwebapi/analysistemplates/I1XTG_auSSsvuECG8ad_p8b25QEZgtYQY_J06YnELl5cALiA"
      }
    },
    {
      "WebId": "I1XTG_auSSsvuECG8ad_p8b25QEZgtYQY_J06YnELl5cALiA",
      "Id": "612d9811-3f06-4e27-989c-42e5e5c00b88",
      "Name": "MyAnalysisTemplate",
      "Description": "",
      "Path": "\\\\MyAssetServer\\MyDatabase\\AnalysisTemplates[MyAnalysisTemplate]",
      "AnalysisRulePlugInName": "PerformanceEquation",
      "CategoryNames": [
        "MyAnalysisCategory"
      ],
      "CreateEnabled": true,
      "GroupId": 0,
      "HasNotificationTemplate": false,
      "HasTarget": false,
      "OutputTime": "",
      "TargetName": "MyElementTemplate",
      "TimeRulePlugInName": "Periodic",
      "Links": {
        "Self": "https://localhost.osisoft.int/piwebapi/analysistemplates/I1XTG_auSSsvuECG8ad_p8b25QEZgtYQY_J06YnELl5cALiA"
      }
    }
  ],
  "Links": {}
}
In This Topic
TitleResults for “How to create a CRG?”Also Available in