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

PI Web API Reference

StreamSet GetSummaries

StreamSet GetSummaries

Returns summary values of the attributes for an element, event frame or attribute.

Remarks

Any time series value in the response that contains an 'Errors' property indicates PI Web API encountered a handled error during the transfer of the response stream. See Error Handling for more information.

Request

GET streamsets/{webId}/summary

URL Parameters

  • webId

    The ID of an element, event frame or attribute, which is the base element or parent of all the stream attributes. See WebID for more information.

  • startTime

    An optional start time. The default is '*-1d' for element attributes and points. For event frame attributes, the default is the event frame's start time, or '*-1d' if that is not set. See Time Strings for more information.

  • endTime

    An optional end time. The default is '*' for element attributes and points. For event frame attributes, the default is the event frame's end time, or '*' if that is not set. Note that if endTime is earlier than startTime, the resulting values will be in time-descending order. See Time Strings for more information.

  • timeZone

    The time zone in which the time string will be interpreted. This parameter will be ignored if a time zone is specified in the time string. If no time zone is specified in either places, the PI Web API server time zone will be used. See Time Zone for more information.

  • summaryType

    Specifies the kinds of summaries to produce over the range. The default is 'Total'. Multiple summary types may be specified by using multiple instances of summaryType. See Summary Type for more information.

  • calculationBasis

    Specifies the method of evaluating the data over the time range. The default is 'TimeWeighted'. See Calculation Basis for more information.

  • timeType

    Specifies how to calculate the timestamp for each interval. The default is 'Auto'. See Time Type for more information.

  • summaryDuration

    The duration of each summary interval. See Summary Duration for more information.

  • sampleType

    A flag which specifies one or more summaries to compute for each interval over the time range. The default is 'ExpressionRecordedValues'. See Sample Type for more information.

  • sampleInterval

    A time span specifies how often the filter expression is evaluated when computing the summary for an interval, if the sampleType is 'Interval'.

  • filterExpression

    A string containing a filter expression. Expression variables are relative to the attribute. Use '.' to reference the containing attribute. The default is no filtering.

  • nameFilter

    The name query string used for filtering attributes. The default is no filter. See Query String for more information.

  • categoryName

    Specify that included attributes must have this category. The default is no category filter.

  • templateName

    Specify that included attributes must be members of this template. The default is no template filter.

  • showExcluded

    Specified if the search should include attributes with the Excluded property set. The default is 'false'.

  • showHidden

    Specified if the search should include attributes with the Hidden property set. The default is 'false'.

  • searchFullHierarchy

    Specifies if the search should include attributes nested further than the immediate attributes of the searchRoot. The default is 'false'.

  • 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: Summary values of the streams that meet the specified conditions.

409: Unsupported operation on the given AF object.

Sample Response Body

{
  "Items": [
    {
      "WebId": "I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg",
      "Name": "Water",
      "Path": "\\\\MyAssetServer\\MyDatabase\\MyElement|Water",
      "Items": [
        {
          "Type": "Total",
          "Value": {
            "Timestamp": "2014-07-22T14:00:00Z",
            "UnitsAbbreviation": "m",
            "Good": true,
            "Questionable": false,
            "Substituted": false,
            "Annotated": false,
            "Value": 12.3
          }
        },
        {
          "Type": "Total",
          "Value": {
            "Timestamp": "2014-07-22T14:00:00Z",
            "UnitsAbbreviation": "m",
            "Good": true,
            "Questionable": false,
            "Substituted": false,
            "Annotated": false,
            "Value": 12.3
          }
        }
      ],
      "Links": {
        "Self": "https://localhost.osisoft.int/piwebapi/attributes/I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg"
      }
    },
    {
      "WebId": "I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg",
      "Name": "Water",
      "Path": "\\\\MyAssetServer\\MyDatabase\\MyElement|Water",
      "Items": [
        {
          "Type": "Total",
          "Value": {
            "Timestamp": "2014-07-22T14:00:00Z",
            "UnitsAbbreviation": "m",
            "Good": true,
            "Questionable": false,
            "Substituted": false,
            "Annotated": false,
            "Value": 12.3
          }
        },
        {
          "Type": "Total",
          "Value": {
            "Timestamp": "2014-07-22T14:00:00Z",
            "UnitsAbbreviation": "m",
            "Good": true,
            "Questionable": false,
            "Substituted": false,
            "Annotated": false,
            "Value": 12.3
          }
        }
      ],
      "Links": {
        "Self": "https://localhost.osisoft.int/piwebapi/attributes/I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg"
      }
    }
  ],
  "Links": {}
}
In This Topic
TitleResults for “How to create a CRG?”Also Available in