Tagslist API
The Tags List API GET
method retrieves the list of tags.
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 Name | Data Type | Default | Description |
---|---|---|---|
calctype | Integer | -1 | Returns exact match of calc type (0,1,2). |
collectiondisabled | Boolean | If ignored, all types considered. | Must be only true / false, else error out. |
collectioninterval | Integer | 0 means all intervals | If collectorinterval = 0 consider all intervals, else exact match. |
collectorcompression | Boolean | * | Returns exact match of collector compression (true/false). |
collectorname | String | * | Default * means consider all. |
collectortype | Integer | 0 means consider all collector types | Returns exact match of collector type. |
comment | String | * | Default * means consider all. |
datastorename | String | * | Default * means consider all. |
datatype | Integer | 0 means consider all data types | Returns exact match of data type. |
description | String | * | Default * means consider all. |
egudescription | String | * | Default * means consider all. |
enumeratedset | String | * | Default * means consider all. |
hasalias | Boolean | If ignored, all types considered. | Must be only true / false, else error out. |
isstale | Boolean | If ignored, all types considered. | Must be only true / false, else error out. |
lastmodified | String | 1970-01-01T00:00:00.000Z | >= is applied so that last modified tag is returned in the result set. |
lastmodifieduser | String | * | Default * means consider all. |
numberofelements | Integer | 0 | If 0, ignore this parameter else returns exact match of number of elements. |
pageno | Integer | 1 Must be > | If invalid, no data is returned. |
pagesize | Integer | 128
Max Min | If out of range, returns error. |
sourceaddress | String | * | Default * means consider all. |
tagname | String | * | Default * means consider all. |
userdefinedtypename | String | * | Default * means consider all. |
Tags List Pagination Parameters
Parameter | Value |
---|---|
pagesize
| Current page size. |
pageno
| Current page number |
totalcount
| Total result other than current page. |
Links to URLs | All URLs are part of the HTTP response headers.
|
Sample cURL commands
METHOD | GET |
---|---|
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
pageno
is ignored and pagesize
is defaulted to 128, all tags are considered:<baseurl>/v1/tagslist
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
tagid
- Stringtagname
- Stringdescription
- Stringdatatype
- Integercollectorname
- Stringcollectortype
- Integerdatastorename
- Stringegudescription
- Stringcomment
- Stringsourceaddress
- Stringsourceaddress
- Stringcollectioninterval
- Integercollectorcompression
- Booleanlastmodifieduser
- Stringenumeratedset
- Stringuserdefinedtypename
- Stringcalctype
- Integerisstale
- Booleanlastmodified
- Longlastmodified
- LonglastmodifiedString
String In readable formathas alias
- Booleannumberofelements
- Integercollectiondisabled
- Boolean
{
"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"
}
}