Cloud APIs
...
BSN.Cloud Main APIs
Main API version 2022/06

Tags Endpoints (2022/06)

7min
this endpoint allows you to retrieve data about tags on the network tag names, as well as all other entity properties, are case insensitive (but values can only differ by case) the server may return entity properties and tag keys with a different case than specified by the client in the request base url for these endpoints https //api bsn cloud/2022/06/rest/tags get /keys/ returns all tag names defined on a network that match a specified pattern required scope token bsn api main tags retrieve query string parameter pattern string string optional optional enter a value in this format "{datatype} \[\[sys] ]\[{objecttype}] <{tagkey}>" if this value is not entered, this will return all tags for all values see the definitions below for further guidance datatype is one of the supported data types these supported data types are boolean, numeric, string, datetime, timespan, numeric array, and string array, as described on filtering and sorting expressions in the main api docid 3l0afyd3xooe ytvfk2vs (but object is not supported) this value is optional sys lets you distinguish system tag (defined by system ) or custom tag (defined by customer ) this value is optional objecttype is either content or device tagkey can be skipped, or partially specified with a wildcard character like or ?, which will give you all of the tag keys matching this expression note that /tag/keys/ is unique in the scope of entities in that some of the values can be skipped or partially defined for example, \[content] \<m?dia> is a valid entry request example the example request parameters and headers are set as follows pattern is set to \[content] get /2022/06/rest/tags/keys/?pattern=%5bcontent%5d http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} accept application/json, application/vnd bsn error+json accept encoding gzip,deflate success response with body 200 200 returns all tag names defined on a network that match the pattern example \[ "string \[sys] \[content] \<contenttype>", "datetime \[sys] \[content] \<filelastmodifieddate>", "string \[sys] \[content] \<filename>", "number \[sys] \[content] \<filesize>", "number \[sys] \[content] \<id>", "string \[content] \<janedoe>", "string \[sys] \[content] \<physicalpath>", "string \[sys] \[content] \<thumbpath>", "datetime \[sys] \[content] \<uploaddate>", "string \[sys] \[content] \<virtualpath>" ] failure response 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 5xx any 500 code is an internal server error get /values/ returns all tag values defined on a network that match a specified pattern required scope token bsn api main tags retrieve query string parameter pattern string string optional optional enter a value in this format "{datatype} \[\[sys] ]\[{objecttype}] <{tagvalues}>" if this value is not entered, this will return all tags for all values see the definitions below for further guidance datatype is one of the supported data types these supported data types are boolean, numeric, string, datetime, timespan, numeric array, and string array, as described in filtering and sorting expressions in the main api docid 3l0afyd3xooe ytvfk2vs (but object is not supported) this value is optional sys lets you distinguish system tag (defined by system ) or custom tag (defined by customer ) this value is optional objecttype is either content or device tagvalues can be skipped, or partially specified with a wildcard character like or ?, which will give you all of the tag values matching this expression note that /tag/values/ is unique in the scope of entities in that some of the values can be skipped or partially defined for example, \[content] \<m?dia> is a valid entry request example the example request parameters and headers are set as follows pattern is set to \[sys] \[content] get /2022/06/rest/tags/values/?pattern=%5bsys%5d %5bcontent%5d http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} accept application/json, application/vnd bsn error+json accept encoding gzip,deflate success response with body 200 200 returns all tag values defined on a network that match the pattern example \[ "", "outside", "2024 01 01 00 00 00z", 12345 ] failure response 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 5xx any 500 code is an internal server error