The Get Tag Comment API

Using the Get Tag Comment API, you can view the comments added to a tag.
METHOD GET
URI
https://<historianservername>/historian-rest-api/v1/tags/
comments/{tagNames}/{start}/{end}
SAMPLE PATH PARAM GET URI
https://<historianservername>/historian-rest-api/
v1/tags/comments/rsserver2012-02.Simulation00003/
2020-04-19T00:00:00.000Z/2020-04-24T00:00:00.000Z
Note: The path parameter supports only a single tag.
SAMPLE QUERY PARAM GET URI
https://<historianservername>/historian-rest-api/
v1/tags/comments/?tagNames=rsserver2012-02.Simulation00003; 
rsserver2012-02.Simulation00004&start=2020-04-19T00:
00:00.000Z&end=2020-04-24T00:00:00.000Z
Note: The query parameter supports multiple tags.
SAMPLE RESPONSE
{
    "ErrorCode": 0,
    "ErrorMessage": null,
    "Data": [
        {
            "TagName": "Motor Temperature",
            "ErrorCode": 0,
            "Comments": [
                {
                    "TimeStamp": "2020-04-22T00:00:00.000Z",
                    "Comment": "Heat run test: Starting temperature"
                },
                {
                    "TimeStamp": "2020-04-22T00:00:00.000Z",
                    "Comment": "Heat run test: Temperature of the stator"
                },
                {
                    "TimeStamp": "2020-04-22T00:00:00.000Z",
                    "Comment": "Heat run test: Temperature of the rotor"
                },
                {
                    "TimeStamp": "2020-04-22T00:00:00.000Z",
                    "Comment": "Heat run test: Temperature of the shaft"
                },
                {
                    "TimeStamp": "2020-04-22T00:00:00.000Z",
                    "Comment": "Heat run test: Temperature of the endshield"
                }
            ]
        }
    ]
}
SAMPLE cURL COMMAND
curl -i -H "Accept: application/json" -H 
"Authorization: Bearer <TOKEN> http://<historianservername>
/historian-rest-api/v1/tags/comments/<tagNames>/<start>/<end>

Query Parameters

Query parameters include the Payload parameter, which is a JSON file, which contains the following properties.

Parameter Description Required? Values
tagNames

The names of the tag as a semicolon-separated list. For example: HISTWIN20161.ctag1; HISTWIN20161.ctag2

Yes String
start The start time of the query, in ISO data format (YYYY-MM-DDTHH:mm:ss.SSSZ). Yes DateTime
end The end time of the query, in ISO format (YYYY-MM-DDTHH:mm:ss.SSSZ). Yes DateTime

Response Parameters

Parameter Data Type Required? Description
ErrorCode Integer Yes For example, ErrorCode = 0 implies the operation was successful.
ErrorMessage String Yes For example, NULL.