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

PI Web API Reference

Stream GetRecordedAtTimes

Stream GetRecordedAtTimes

Retrieves recorded values at the specified times.

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. If only recorded values with annotations are desired, the filterExpression parameter should include the filter IsSet('.', "a").

Request

GET streams/{webId}/recordedattimes

URL Parameters

  • webId

    The ID of the stream. See WebID for more information.

  • time

    The timestamp at which to retrieve a recorded value. Multiple timestamps may be specified with multiple instances of the parameter. 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.

  • retrievalMode

    An optional value that determines the value to return when a value doesn't exist at the exact time specified. The default is 'Auto'. See Retrieval Mode for more information.

  • desiredUnits

    The name or abbreviation of the desired units of measure for the returned value, as found in the UOM database associated with the attribute. If not specified for an attribute, the attribute's default unit of measure is used. If the underlying stream is a point, this value may not be specified, as points are not associated with a unit of measure.

  • sortOrder

    The order that the returned collection is sorted. The default is 'Ascending'. See Sort Order for more information.

  • 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.

  • associations

    Associated values to return in the response, separated by semicolons (;). This call supports Annotations to return events with annotation values. If this parameter is not specified, annotation values are not returned. See Associations for more information.

Status Codes

200: The values that meet the specified conditions.

400: The request was malformed.

409: The data reference does not support this method, or the desired units of measure are incompatible.

Sample Response Body

{
  "Items": [
    {
      "Annotations": [
        {
          "Id": "512B6616-CE39-4F70-9048-8C6A025FB592",
          "Name": "Temperature Annotation",
          "Description": "Signifies a spike in temperature.",
          "Value": "The temperature spiked because of a malfunction with a unit in our west plant.",
          "Creator": "MyDomain\\UserA",
          "CreationDate": "2016-06-21T14:45:50.2988321Z",
          "Modifier": "MyDomain\\UserA",
          "ModifyDate": "2016-06-21T14:45:50.2988321Z",
          "Errors": null
        },
        {
          "Id": "512B6616-CE39-4F70-9048-8C6A025FB592",
          "Name": "Temperature Annotation",
          "Description": "Signifies a spike in temperature.",
          "Value": "The temperature spiked because of a malfunction with a unit in our west plant.",
          "Creator": "MyDomain\\UserA",
          "CreationDate": "2016-06-21T14:45:50.2988321Z",
          "Modifier": "MyDomain\\UserA",
          "ModifyDate": "2016-06-21T14:45:50.2988321Z",
          "Errors": null
        }
      ],
      "Timestamp": "2014-07-22T14:00:00Z",
      "UnitsAbbreviation": "m",
      "Good": true,
      "Questionable": false,
      "Substituted": false,
      "Annotated": false,
      "Value": 12.3
    },
    {
      "Annotations": [
        {
          "Id": "512B6616-CE39-4F70-9048-8C6A025FB592",
          "Name": "Temperature Annotation",
          "Description": "Signifies a spike in temperature.",
          "Value": "The temperature spiked because of a malfunction with a unit in our west plant.",
          "Creator": "MyDomain\\UserA",
          "CreationDate": "2016-06-21T14:45:50.2988321Z",
          "Modifier": "MyDomain\\UserA",
          "ModifyDate": "2016-06-21T14:45:50.2988321Z",
          "Errors": null
        },
        {
          "Id": "512B6616-CE39-4F70-9048-8C6A025FB592",
          "Name": "Temperature Annotation",
          "Description": "Signifies a spike in temperature.",
          "Value": "The temperature spiked because of a malfunction with a unit in our west plant.",
          "Creator": "MyDomain\\UserA",
          "CreationDate": "2016-06-21T14:45:50.2988321Z",
          "Modifier": "MyDomain\\UserA",
          "ModifyDate": "2016-06-21T14:45:50.2988321Z",
          "Errors": null
        }
      ],
      "Timestamp": "2014-07-22T14:00:00Z",
      "UnitsAbbreviation": "m",
      "Good": true,
      "Questionable": false,
      "Substituted": false,
      "Annotated": false,
      "Value": 12.3
    }
  ],
  "Links": {}
}
In This Topic
TitleResults for “How to create a CRG?”Also Available in