Tags API

The Tags API retrieves the qualified tag name list by a given nameMask.
Note: URI format supports asterisks (*) and question marks (?).
METHODGET
URIhttps://<historianservername>:8443/historian-rest-api/v1/tags/{nameMask}/{maxNumber}
SAMPLE URIhttps://<historianservername>:8443/historian-rest-api/v1/tags?nameMask=*&maxNumber=100
SAMPLE cURL COMMANDcurl -i -H "Accept: application/json" -H "Authorization: Bearer <TOKEN> https://<nodename>:8443/ historian-rest-api/v1/tags?nameMask=*&maxNumber=<Number_Of_Tags>

Query Parameters

ParameterDescriptionRequired?Values
nameMaskTagmask that searches for all tags that match the mask and applies the remaining criteria to retrieve data. The mask can include wildcards, such as asterisks (*).OptionalString
maxNumberMaximum tag number provides the limit while returning the results (0 by default). This means that for a query, if using 0, all tags are returned.

If a negative number is used, then 0 is used for the maxNumber.

If a positive number is used, then that number of tags is returned. In addition, an error number of +14 notifies the user that there are more than the requested number of tags in the system.

OptionalInteger

0 by default

Response Parameters

ParameterData TypeRequired?Description
ErrorCodeNumberYesFor example, ErrorCode = 0, which means the operation was successful.
ErrorMessageStringYesFor example, NULL.
tagsStringYesIncludes the following:
  • ALT_SENSOR
  • tagName1
  • tagName2

Sample Response

{
    "ErrorCode":0,
    "ErrorMessage": null,
    "tags": [
        "ALT_SENSOR",
        "tagName1",
        "tagName2"
    ]
}