Skip to content

Get



GET /api/v1/tag/{tag_uuid}/get

Overview

Reads the complete saved entity and scope of the specified tag.

Prerequisites and Usage Steps

Returns a non-deleted tag in the current workspace, including entity status and timestamps, but not the list's tagPermissionInfo or identity summary. If the tag is missing, belongs to another workspace, or has been deleted, returns ObjectNotExists. Historical empty scope values are normalized to ["all"]; this does not mean null can be passed in new requests.

Route Parameters

Parameter Type Required Description
tag_uuid string Y UUID of a tag in the current workspace, not a tag name, list page number, or resource UUID.
Example: tag_example
How to obtain or enter: Obtain it from content.data[].uuid in the Tag List.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI key with the required permission from API Key Management in the target workspace.

Additional Parameter Notes

Data Notes

  • Response Parameters
Parameter type Description
name string Tag name
description string Description information for the field
color string Color type agreed between frontend and backend, default,style_key1,style_key2 ~~
  • Color type mapping for the color field:
    {
        "default": {"background": "#CCE6FF", "color": "rgba(0,0,0,0.8)"},
        "style_key1": {"background": "#3333FE", "color": "#FFFFFF"},
        "style_key2": {"background": "#428BCA", "color": "#FFFFFF"},
        "style_key3": {"background": "#364450", "color": "#FFFFFF"},
        "style_key4": {"background": "#E0E1FF", "color": "rgba(0,0,0,0.8)"},
        "style_key5": {"background": "#9400D3", "color": "#FFFFFF"},
        "style_key6": {"background": "#EDDBFF", "color": "rgba(0,0,0,0.8)"},
        "style_key7": {"background": "#CC328B", "color": "#FFF"},
        "style_key8": {"background": "#FCDEF0", "color": "rgba(0,0,0,0.8)"},
        "style_key9": {"background": "#DC143D", "color": "#FFFFFF"},
        "style_key10": {"background": "#FCBABA", "color": "rgba(0,0,0,0.8)"},
        "style_key11": {"background": "#BD0B48", "color": "#FFFFFF"},
        "style_key12": {"background": "#FDECD2", "color": "rgba(0,0,0,0.8)"},
        "style_key13": {"background": "#FFC29C", "color": "rgba(0,0,0,0.8)"},
        "style_key14": {"background": "#ED9120", "color": "#FFFFFF"},
        "style_key15": {"background": "#CD5B44", "color": "#FFFFFF"},
        "style_key16": {"background": "#FAF570", "color": "rgba(0,0,0,0.8)"},
        "style_key17": {"background": "#C29953", "color": "#FFFFFF"},
        "style_key18": {"background": "#02B140", "color": "#FFFFFF"},
        "style_key19": {"background": "#D5F4D5", "color": "rgba(0,0,0,0.8)"},
        "style_key20": {"background": "#009966", "color": "#FFFFFF"},
        "style_key21": {"background": "#023220", "color": "#FFFFFF"},
        "style_key22": {"background": "#E7E7E7", "color": "rgba(0,0,0,0.8)"},
        "style_key23": {"background": "#808080", "color": "#FFFFFF"}
    }
    

Request Example

curl --get 'https://openapi.guance.com/api/v1/tag/tag_example/get' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.id integer Entity record ID; the list id is a UUID string, see the list fields.
content.uuid string Tag UUID prefixed with tag_.
content.workspaceUUID string Workspace to which it belongs.
content.name string Tag name.
content.description string Purpose description.
content.colour string Color representation.
content.scope array<string> Normalized scope; historical null/empty scope values are returned as ["all"].
content.scope[] string One of all/scene/monitor/dialing/security/infrastructure/catalog.
content.status integer 0: valid; 3: deleted; other historical statuses are based on actual data.
content.creator string Creator identity.
content.updator string Last modifier identity.
content.createAt integer Creation time in Unix seconds.
content.updateAt integer Update time in Unix seconds; -1 if never updated.
content.deleteAt integer Deletion time in Unix seconds; -1 if not deleted.
content.declaration object Common declaration.
{
  "code": 200,
  "content": {
    "id": 100,
    "uuid": "tag_example",
    "workspaceUUID": "wksp_example",
    "name": "production",
    "description": "生产资源统一标记。",
    "colour": "default",
    "scope": [
      "scene",
      "monitor"
    ],
    "status": 0,
    "creator": "wsak_example",
    "updator": "",
    "createAt": 1785427200,
    "updateAt": -1,
    "deleteAt": -1,
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
404 ft.ObjectNotExists No corresponding valid tag exists in the current workspace, or it has been deleted The specified object does not exist Obtain a valid UUID from the current workspace list.
500 ft.InternalServerError Failed to read or format the response for the tag, reference/permission, or identity profile Internal error Verify the workspace and query conditions, retry later, and provide the traceId if the failure persists.

Feedback

Is this page helpful?