The Current Value API queries the current value data and reads the current values for a list of tags. If the start time is equal to end time, the request returns one sample.
METHOD: | GET, POST |
URI: |
|
SAMPLE GET URI: | https://<historianservername>:8443/historian-rest-api/v1/datapoints/currentvalue?tagNames=tagName1 |
SAMPLE POST URI: | https://<historianservername>:8443/historian-rest-api/v1/datapoints/currentvalue |
SAMPLE cURL COMMAND (GET): | curl -i -H "Accept: application/json" -H "Authorization: Bearer <TOKEN>” http://<nodename>:8443/ historian-rest-api/v1/ datapoints/currentvalue/<tagName> |
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/currentvalue |
Query Parameters
Parameter | Description | Required? | Values |
---|---|---|---|
TagNames | Queries the specified tag names. | Yes | String |
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:
|
Sample Response
{ "ErrorCode" : 0, "ErrorMessage": null, "Data":[{ "DataType":"DoubleFloat", "ErrorCode":0, "TagName":"TagName1", "Samples":[ { "TimeStamp":"2014-01-01T12:00:00Z","Value":"34.26155","Quality":3 } ] }]}