The Interpolated Data API queries interpolated values for a list of tags. If the start time equals the end time, the request returns one sample.
METHOD: | GET, POST |
URI: |
- GET
https://<historianservername>:8443/historian-rest-api/v1/datapoints/interpolated/{tagNames}/{start}/{end}/{count}/{intervalMs} - POST
https://<historianservername>:8443/historian-rest-api/v1/datapoints/interpolated/{start}/{end}/{count}/{intervalMs}
|
SAMPLE GET URI: | https://<historianservername>:8443/historian-rest-api/v1/datapoints/interpolated/tagName1/2013-10-02T11:30:00.111111Z/2013-10-02T11:31:11.111Z/100/10000 |
SAMPLE POST URI: | https://<historianservername>:8443/historian-rest-api/v1/datapoints/interpolated/2013-10-02T11:30:00.111111Z/2013-10-02T11:31:11.111Z/100/10000 |
SAMPLE cURL COMMAND (GET): | curl -i -H "Accept: application/json" -H "Authorization: Bearer <TOKEN>http://<nodename>:8443/ historian-rest-api/v1/ datapoints/interpolated/<tagName>/<start time>/<end time>/<count>/<intervalMS> |
SAMPLE cURL COMMAND (POST): | curl -i X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Bearer <TOKEN>-d {\tagNames\:\<tagName>\}http://<nodename>:8443/ historian-rest-api/v1/ datapoints/interpolated/<start time>/<end time>/<count>/<intervalMS> |
Query Parameters
Parameter | Description | Required? | Values |
---|
TagName | Queries the tag names specified. | Yes | String |
Start | Start time of the query, in ISO data format (such as YYYY-MM-DDTHH:mm:ss.SSSZ). | Yes | DateTime |
End | End time of the query, in ISO data format (such as YYYY-MM-DDTHH:mm:ss.SSSZ). | Yes | DateTime |
Count | Count of archive values within each calculation interval. | Yes | Integer, with a value such as 100. |
intervalMS | Interval in milliseconds. | Yes | 64-bit signed integer, with a value such as 10000. |
Response Parameters
Parameter | Data Type | Required? | Description |
---|
ErrorCode | Integer | Yes | For example, 0. |
ErrorMessage | String | Yes | For example, NULL. |
Data | String | Yes | The object container for the following parameters:- DataType
- DoubleFloat, which stores decimal values up to 15 places.
- ErrorCode
- Value is 0, which means the operation was successful.
- TagName
- Example is TagName1.
- Samples
- Provides TimeStamp, Value and Quality for each sample. For example, TimeStamp = 2013-10-02T11:30:00.111Z, Value = 34.26155, and Quality = 3.
|
Sample Response
{
"ErrorCode" : 0,
"ErrorMessage": null,
"Data":[{
"DataType":"DoubleFloat",
"ErrorCode":0,
"TagName":"TagName1",
"Samples":[ { "TimeStamp":"2013-10-02T11:30:00.111Z","Value":"34.26155","Quality":3 },
{ "TimeStamp":"2013-10-02T11:30:10.111Z", "Value":"37.26155", "Quality":3 },
{ "TimeStamp":"2013-10-02T11:31:00.111Z", "Value":"33.26155", "Quality":3 }
]
}]
}