Datastream Tags¶
5 operations in the Adverity Connect API. Replace {{INSTANCE}} and {{KEY}} in the examples with your instance and API key. How authentication works.
List datastream tags¶
GET/api/v1/datastream-tags/
API key permissionDatastream: Read-onlydatastream:read
Tags of the workspaces the API key can see, sorted by name. A tag belongs to one workspace, and its name is unique there ignoring case. The same name in another workspace, parent and child included, is a separate tag. Attach tags to datastreams with POST /api/v1/datastreams/tags/.
Query parameters
workspace_scopestringscope_from_workspace_idstring · uuidRequired only for
workspace_scopewhen multiple roots exist.workspace_idarray of string · uuidnamestringExact tag name, ignoring case. Not a search.
pageintegerDefault
1· Min1page_sizeintegerDefault
50· Min1
Responses
200OKapplication/json
Response schema
object PagedDatastreamTagSchema
itemsarray of objectrequiredItems · DatastreamTagSchema
idstring · uuidrequirednamestringrequiredworkspaceobjectrequiredAttributes · WorkspaceMinimalSchema
idstring · uuidrequirednamestringrequired
createdstring · date-timerequired
countintegerrequired
Create a datastream tag¶
POST/api/v1/datastream-tags/
API key permissionDatastream: Writedatastream:write
Create a tag in one workspace. A tag belongs to one workspace, and its name is unique there ignoring case. The same name in another workspace, parent and child included, is a separate tag. Attach tags to datastreams with POST /api/v1/datastreams/tags/. A name the workspace already has returns 409 with the existing tag.
Request bodyrequired
application/json
Body schema
object DatastreamTagCreateSchema
workspace_idstring · uuidrequirednamestringrequiredUp to 25 characters, unique within the workspace ignoring case. Leading and trailing spaces are dropped.
Responses
201Createdapplication/json
Response schema
object DatastreamTagCreatedSchema
idstring · uuidrequirednamestringrequiredworkspaceobjectrequiredAttributes · WorkspaceMinimalSchema
idstring · uuidrequirednamestringrequired
createdstring · date-timerequiredsame_name_in_ancestor_workspacesarray of objectWorkspaces above this one, among those the key can see, that already have a tag with this name. Those are separate tags: a datastream only carries tags of its own workspace.
Items · WorkspaceMinimalSchema
idstring · uuidrequirednamestringrequired
400Bad Requestapplication/json
Response schema
object ErrorSchema
detailstringrequired
409Conflictapplication/json
Response schema
object DatastreamTagConflictSchema
detailstringrequiredtagobjectrequiredAttributes · DatastreamTagSchema
idstring · uuidrequirednamestringrequiredworkspaceobjectrequiredAttributes · WorkspaceMinimalSchema
idstring · uuidrequirednamestringrequired
createdstring · date-timerequired
Get a datastream tag¶
GET/api/v1/datastream-tags/{tag_id}/
API key permissionDatastream: Read-onlydatastream:read
Path parameters
tag_idstring · uuidrequired
Responses
200OKapplication/json
Response schema
object DatastreamTagSchema
idstring · uuidrequirednamestringrequiredworkspaceobjectrequiredAttributes · WorkspaceMinimalSchema
idstring · uuidrequirednamestringrequired
createdstring · date-timerequired
Rename a datastream tag¶
PATCH/api/v1/datastream-tags/{tag_id}/
API key permissionDatastream: Writedatastream:write
Every datastream carrying the tag shows the new name. Their history keeps the old one. A name another tag of the workspace has returns 409 with that tag. The workspace of a tag cannot change.
Path parameters
tag_idstring · uuidrequired
Request bodyrequired
application/json
Body schema
object DatastreamTagUpdateSchema
namestringrequiredThe new name. Every datastream carrying the tag shows it. A change of case only is allowed.
Responses
200OKapplication/json
Response schema
object DatastreamTagSchema
idstring · uuidrequirednamestringrequiredworkspaceobjectrequiredAttributes · WorkspaceMinimalSchema
idstring · uuidrequirednamestringrequired
createdstring · date-timerequired
400Bad Requestapplication/json
Response schema
object ErrorSchema
detailstringrequired
409Conflictapplication/json
Response schema
object DatastreamTagConflictSchema
detailstringrequiredtagobjectrequiredAttributes · DatastreamTagSchema
idstring · uuidrequirednamestringrequiredworkspaceobjectrequiredAttributes · WorkspaceMinimalSchema
idstring · uuidrequirednamestringrequired
createdstring · date-timerequired
Delete a datastream tag¶
DELETE/api/v1/datastream-tags/{tag_id}/
API key permissionDatastream: Writedatastream:write
Deletes the tag and removes it from every datastream, each of which gets a history entry.
Path parameters
tag_idstring · uuidrequired
Responses
200OKapplication/json
Response schema
object DatastreamTagDeletedSchema
idstring · uuidrequiredremoved_from_datastreamsintegerrequiredHow many datastreams carried the tag and no longer do.