Tagslist API

The Tags List API GET method retrieves the list of tags.

When retrieving large tag lists from Historian, you can paginate the response, allowing you to get the next page, go the end, go back one page, and go to the beginning. See .

Tags List Request Parameters

You can use wildcards (*, &,?) with string parameters for pattern matching. Results are sorted in ascending tag names. All parameters use the AND operator. The OR operator is not supported.

All request parameters are optional.

When there are NO wildcard characters (*, &,?) with string parameters for pattern matching, then search would be a contains search

Example: ?dog pattern will match ?dog1 ?, ?dog2 ?, ?dogs ?, ?dogx ?, ?dog12 ?, ?dogs are faithful ?, ?1dog1 and so on. When wildcards (*,&, ?) are used in the search string parameters for pattern matching, then they work as per the wildcard character definition.

? - Single character matching

* - Multi character matching

Eg1: ?dog? pattern will match: ?dog1 ?, ?dog2 ?, ?dogs ?, ?dogx and so on but not ?dog12 or ?dogs are faithful

Eg2: ?dog* pattern will match ?dog1 ?, ?dog2 ?, ?dogs ?, ?dogx ?, ?dog12 ?, ?dogs are faithful and so on but not ?1dog1

Parameter NameData TypeDefaultDescription
calctypeInteger-1Returns exact match of calc type (0,1,2).
collectiondisabledBooleanIf ignored, all types considered.Must be only true / false, else error out.
collectionintervalInteger0 means all intervalsIf collectorinterval = 0 consider all intervals, else exact match.
collectorcompressionBoolean*Returns exact match of collector compression (true/false).
collectornameString*Default * means consider all.
collectortypeInteger0 means consider all collector typesReturns exact match of collector type.
commentString*Default * means consider all.
datastorenameString*Default * means consider all.
datatypeInteger0 means consider all data typesReturns exact match of data type.
descriptionString*Default * means consider all.
egudescriptionString*Default * means consider all.
enumeratedsetString*Default * means consider all.
hasaliasBooleanIf ignored, all types considered.Must be only true / false, else error out.
isstaleBooleanIf ignored, all types considered.Must be only true / false, else error out.
lastmodifiedString1970-01-01T00:00:00.000Z>= is applied so that last modified tag is returned in the result set.
lastmodifieduserString*Default * means consider all.
numberofelementsInteger0If 0, ignore this parameter else returns exact match of number of elements.
pagenoInteger1

Must be > 1

If invalid, no data is returned.
pagesizeInteger128

Max 512

Min 2

If out of range, returns error.
sourceaddressString*Default * means consider all.
tagnameString*Default * means consider all.
userdefinedtypenameString*Default * means consider all.

Tags List Pagination Parameters

When retrieving large tag lists from Historian, you can paginate the response, allowing you to get the next page, go the end, and go back on page and to the beginning. Results with no errors return these pagination parameters:
ParameterValue
pagesize Current page size.
pageno Current page number
totalcount Total result other than current page.
Links to URLsAll URLs are part of the HTTP response headers.
  • first First page tags list URL (can be null if count is 0).
  • last - Last page tags list URL (can be null if count is 0).
  • prev Previous page tags list URL (can be null if current page is 1).
  • Next - Next page tags list URL (can be null if current page is last page).

Sample cURL commands

METHODGET
SAMPLE cURL COMMAND: [lastmodified] curl -i -H "Accept: application/json" -H "Authorization:Bearer <TOKEN> http://<nodename>:8443/historian-rest-api/v1/tagslist?lastmodified=2017-05-01T00:00:00.00Z
SAMPLE cURL COMMAND: [pageno=0] curl -i -H "Accept: application/json" -H "Authorization:Bearer <TOKEN> http://<nodename>:8443/historian-rest-api/v1/tagslist?pageno=0
SAMPLE cURL COMMAND: [pageno=1] curl -i -H "Accept: application/json" -H "Authorization:Bearer <TOKEN> http://<nodename>:8443/historian-rest-api/v1/tagslist?pageno=1
SAMPLE cURL COMMAND: [complete tagslist]curl -i -H "Accept: application/json" -H "Authorization:Bearer <TOKEN> http://<nodename>:8443/historian-rest-api/v1/tagslist

Example Queries

The following request returns first page as pageno is ignored and pagesize is defaulted to 128, all tags are considered:
<baseurl>/v1/tagslist
The following request returns first page as pageno is ignored and pagesize is defaulted to 128, all tags are considered that are modified after 2017-05-01T00:00:00.00Z.
<baseurl>/v1/tagslist?lastmodified=2017-05-01T00:00:00.00Z

Example Results

The following info is returned for each tag from the criteria provided in the request as an array of tag info.
  • tagid - String
  • tagname - String
  • description - String
  • datatype - Integer
  • collectorname - String
  • collectortype - Integer
  • datastorename - String
  • egudescription - String
  • comment - String
  • sourceaddress - String
  • sourceaddress - String
  • collectioninterval - Integer
  • collectorcompression - Boolean
  • lastmodifieduser - String
  • enumeratedset - String
  • userdefinedtypename - String
  • calctype - Integer
  • isstale - Boolean
  • lastmodified - Long
  • lastmodified - Long
  • lastmodifiedString String In readable format
  • has alias - Boolean
  • numberofelements - Integer
  • collectiondisabled - Boolean
For example:
{
	"TotalCount": 1031,
	"Page": 1,
	"PageSize": 4,
	"Tags": [
		{
			"Tagid": "adb70ebf-978f-46dd-ac6f-5e863cdb0739",
			"Tagname": "-anilgwxb.Constant",
			"Description": "anilgwxb.Constant",
			"DataType": 3,
			"CollectorName": "ANILGWXB_Simulation",			
			"CollectorType": 2,
			"DataStoreName": "User",
			"EngineeringUnits": "",
			"Comment": "",
			"SourceAddress": "$Constant",
			"CollectionInterval": 1000,
			"CollectorCompression": false,
			"LastModifiedUser": null,
			"EnumeratedSetName": "",
			"UserDefinedTypeName": "",
			"CalcType": 0,
			"IsStale": false,
			"HasAlias": false,
			"NumberOfElements": 0,
			"CollectionDisabled": false,
			"LastModified": 1496992712,
			"LastModifiedString": "2017-06-09T07:18:32Z"
		},
		{
			"Tagid": "88e1f448-643f-465a-95c2-d2bd08870547",
			"Tagname": "anilgwxb.Constant_1%Noise",
			"Description": "anilgwxb.Constant_1%Noise",
			"DataType": 3,
			"CollectorName": "ANILGWXB_Simulation",
			"CollectorType": 2,
			"DataStoreName": "User",
			"EngineeringUnits": "",
			"Comment": "",
			"SourceAddress": "$Constant_1%Noise",
			"CollectionInterval": 1000,
			"CollectorCompression": false,
			"LastModifiedUser": null,
			"EnumeratedSetName": "",
			"UserDefinedTypeName": "",
			"CalcType": 0,
			"IsStale": false,
			"HasAlias": false,
			"NumberOfElements": 0,
			"CollectionDisabled": false,
			"LastModified": 1496992712,
			"LastModifiedString": "2017-06-09T07:18:32Z"
			},
<SNIP>
	],
	"Links": {
		"first": "https://anilgwxb:8443/historian-rest-api/v1/tagslist?pageno=1&pagesize=4",
		"last": "https://anilgwxb:8443/historian-rest-api/v1/tagslist?pageno=258&pagesize=4",
		"prev": null,
		"next": "https://anilgwxb:8443/historian-rest-api/v1/tagslist?pageno=2&pagesize=4"
	}
}