Skip to content
Docs

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_scopestring
  • scope_from_workspace_idstring · uuid

    Required only for workspace_scope when multiple roots exist.

  • workspace_idarray of string · uuid
  • namestring

    Exact tag name, ignoring case. Not a search.

  • pageinteger

    Default 1 · Min 1

  • page_sizeinteger

    Default 50 · Min 1

Responses

200OKapplication/json

Response schema

object PagedDatastreamTagSchema

  • itemsarray of objectrequired
    Items · DatastreamTagSchema
    • idstring · uuidrequired
    • namestringrequired
    • workspaceobjectrequired
      Attributes · WorkspaceMinimalSchema
      • idstring · uuidrequired
      • namestringrequired
    • 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 · uuidrequired
  • namestringrequired

    Up to 25 characters, unique within the workspace ignoring case. Leading and trailing spaces are dropped.

Responses

201Createdapplication/json

Response schema

object DatastreamTagCreatedSchema

  • idstring · uuidrequired
  • namestringrequired
  • workspaceobjectrequired
    Attributes · WorkspaceMinimalSchema
    • idstring · uuidrequired
    • namestringrequired
  • createdstring · date-timerequired
  • same_name_in_ancestor_workspacesarray of object

    Workspaces 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 · uuidrequired
    • namestringrequired

400Bad Requestapplication/json

Response schema

object ErrorSchema

  • detailstringrequired

409Conflictapplication/json

Response schema

object DatastreamTagConflictSchema

  • detailstringrequired
  • tagobjectrequired
    Attributes · DatastreamTagSchema
    • idstring · uuidrequired
    • namestringrequired
    • workspaceobjectrequired
      Attributes · WorkspaceMinimalSchema
      • idstring · uuidrequired
      • namestringrequired
    • 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 · uuidrequired
  • namestringrequired
  • workspaceobjectrequired
    Attributes · WorkspaceMinimalSchema
    • idstring · uuidrequired
    • namestringrequired
  • 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

  • namestringrequired

    The new name. Every datastream carrying the tag shows it. A change of case only is allowed.

Responses

200OKapplication/json

Response schema

object DatastreamTagSchema

  • idstring · uuidrequired
  • namestringrequired
  • workspaceobjectrequired
    Attributes · WorkspaceMinimalSchema
    • idstring · uuidrequired
    • namestringrequired
  • createdstring · date-timerequired

400Bad Requestapplication/json

Response schema

object ErrorSchema

  • detailstringrequired

409Conflictapplication/json

Response schema

object DatastreamTagConflictSchema

  • detailstringrequired
  • tagobjectrequired
    Attributes · DatastreamTagSchema
    • idstring · uuidrequired
    • namestringrequired
    • workspaceobjectrequired
      Attributes · WorkspaceMinimalSchema
      • idstring · uuidrequired
      • namestringrequired
    • 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 · uuidrequired
  • removed_from_datastreamsintegerrequired

    How many datastreams carried the tag and no longer do.

Was this page helpful?