Acceldata
ADOC

Last updated: Oct 16, 2026 06:59 UTC

Tags and Labels Guide

This guide describes how to manage asset tags and asset labels in Acceldata Data Observability Cloud (ADOC) with the Python SDK. Tags are named markers attached to catalog assets. Labels are key-value metadata pairs you can use for ownership, environment, or other custom attributes.

Deprecation Notice

This page covers the legacy Tags and Labels SDK operations from acceldata-sdk. These methods are deprecated as of ADOC 26.8.0 and will be removed after three releases. Use acceldata-sdk-python for all tag operations. For more information, see Unified Tags.

Asset tags

Asset tags are catalog-level tags associated with a single asset. You can work with them on AdocClient (by numeric asset ID) or on an AssetResource returned from client.get_asset(...).

Method

Description

get_asset_tags(asset_id)

List tags on an asset.

add_asset_tag(asset_id, payload)

Add a tag to an asset.

These methods return AssetTagInfo objects with fields such as name, id, classification, enabled, and processing_status. Use tag.to_dict() for the full API-shaped payload.

List and add tags with the client

from acceldata.models.api.catalog.asset_tag_request import AssetTagRequest
asset_id = 77428678
tag_name = "my-tag"
tags = client.get_asset_tags(asset_id)
print([t.to_dict() for t in tags])
if not any(t.name == tag_name for t in tags):
    tag = client.add_asset_tag(asset_id, AssetTagRequest(name=tag_name))
    print(tag.to_dict())

AssetTagRequest accepts name (create or reference by name) or id (reference an existing tag by numeric ID).

List and add tags with an asset resource

If you already have an AssetResource, call the same operations without passing asset_id again:

asset = client.get_asset(asset_id)
tags = asset.get_asset_tags()
print([t.to_dict() for t in tags])
if not any(t.name == tag_name for t in tags):
    tag = asset.add_asset_tag(AssetTagRequest(name=tag_name))
    print(tag.to_dict())

AdocClient.get_asset_tags and AssetResource.get_asset_tagsreturn the same tag names for a given asset.

Asset labels

Asset labels are key-value pairs stored on a catalog asset. Read them with get_asset_labels, and set or update them with add_asset_labels.

Method

Description

get_asset_labels(asset_id)

List labels on an asset.

add_asset_labels(asset_id, payload)

Set or update labels.

Each label is a Label with key and value. The update call accepts one or more labels in a single request.

List and add labels with the client

from acceldata.models.api.catalog.asset_label_request import AssetLabelRequest
from acceldata.models.api.catalog.label import Label
labels = client.get_asset_labels(asset_id)
print([label.to_dict() for label in labels])
updated = client.add_asset_labels(
    asset_id,
    AssetLabelRequest(labels=[Label(key="team", value="data-platform")]),
)
print([label.to_dict() for label in updated])

Add multiple labels

updated = client.add_asset_labels(
    asset_id,
    AssetLabelRequest(
        labels=[
            Label(key="team", value="data-platform"),
            Label(key="environment", value="production"),
        ]
    ),
)

List and add labels with an asset resource

asset = client.get_asset(asset_id)

labels = asset.get_asset_labels()
updated = asset.add_asset_labels(
    AssetLabelRequest(labels=[Label(key="team", value="data-platform")]),
)