You need to enable JavaScript to run this app.
导航
GetLabelTree - 获取标签树信息
最近更新时间:2024.08.26 17:46:30首次发布时间:2024.07.10 15:50:06

请求说明

  • 请求方式:GET
  • 接口名称:GetLabelTree
  • 请求地址:https://console.volcengine.com/cdp/open_platform/openapi

请求参数

参数

类型

是否必选

示例值

描述

Authorization

String

HMAC-SHA256 Credential=BDPP2952f97532xxxxxx/20240716/cn/openPlatform/request, SignedHeaders=host;x-content-sha256;x-date, Signature=131f3d297eb22a7xxxxxx

详细介绍请查阅调用方式文档

X-Tenant

Int

1

项目ID

Query

参数

类型

是否必选

示例值

描述

ApiAction

String

GetLabelTree

对应“请求说明”中的“接口名称”

ApiVersion

String

2023-02-10

版本号: 2023-02-10

subjectId

Int

1

主体id(不传默认为1)

Body


返回参数

下表仅列出返回参数中data字段内容。

参数

类型

示例值

描述

id

Int

2

标签ID

preNodeId

Int

null

前端展示,排序相关

subjectId

Int

1

主体ID

projectId

Int

1

项目ID

name

String

123

标签名称

desc

String

""

标签描述

nodeType

String

normal

System: 系统标签 default : 未分类 Normal:其他的

createTime

String

2023-01-18 19:37:12

标签创建时间

updateTime

String

2023-01-18 19:37:12

标签修改时间

index

Int

0

排序,顺序相关

level

Int

2

排序,层级相关

labelCount

Int

0

当前标签树下的所有标签数量

display

Bool

true

前端展示,是否展示,前端搜索不符合时为false

subNodes

Object

[
                {
                    "id":3,
                    "preNodeId":2,
                    "subjectId":1,
                    "projectId":1,
                    "name":"222",
                    "desc":null,
                    "nodeType":"Normal",
                    "createTime":"2023-01-18 19:37:12",
                    "updateTime":"2023-01-18 19:37:12",
                    "index":0,
                    "level":2,
                    "labelCount":0,
                    "display":true,
                    "subNodes":[

                    ],
                    "labelInfos":[

                    ]
                }
            ],

子节点

labelInfos

Array

[ ]

结点所挂载标签实体列表,数组元素字段内容同data数组元素的字段内容

请求示例


返回示例

{
    "code":0,
    "msg":"成功",
    "data":[
        {
            "id":2,
            "preNodeId":null,
            "subjectId":1,
            "projectId":1,
            "name":"123",
            "desc":null,
            "nodeType":"Normal",
            "createTime":"2023-01-18 19:37:07",
            "updateTime":"2023-01-18 19:37:07",
            "index":0,
            "level":1,
            "labelCount":0,
            "display":true,
            "subNodes":[
                {
                    "id":3,
                    "preNodeId":2,
                    "subjectId":1,
                    "projectId":1,
                    "name":"222",
                    "desc":null,
                    "nodeType":"Normal",
                    "createTime":"2023-01-18 19:37:12",
                    "updateTime":"2023-01-18 19:37:12",
                    "index":0,
                    "level":2,
                    "labelCount":0,
                    "display":true,
                    "subNodes":[

                    ],
                    "labelInfos":[

                    ]
                }
            ],
            "labelInfos":[

            ]
        },
        {
            "id":-1,
            "preNodeId":null,
            "subjectId":1,
            "projectId":1,
            "name":"系统标签",
            "desc":null,
            "nodeType":"System",
            "createTime":"1970-01-01 00:00:00",
            "updateTime":"1970-01-01 00:00:00",
            "index":null,
            "level":1,
            "labelCount":1,
            "display":true,
            "subNodes":[

            ],
            "labelInfos":[
                {
                    "id":1,
                    "name":"主体1_全量",
                    "subjectId":1,
                    "projectId":1,
                    "orgId":1,
                    "entityId":1,
                    "entityType":"baseid",
                    "labelType":"mautag",
                    "dataType":"bigint",
                    "conf":null,
                    "creator":"admin",
                    "status":0,
                    "desc":"",
                    "createTime":"2023-01-10 20:12:31",
                    "updateTime":"2023-01-10 20:12:33",
                    "computeType":"realtime",
                    "isMautag":1,
                    "syncParams":{
                        "scheduleConf":{
                            "frequency":"d",
                            "scheduleTime":"00:00:00"
                        },
                        "syncType":1
                    },
                    "taskId":100000016,
                    "dimMetId":339,
                    "updater":"admin",
                    "dataSecurityLevel":"L3",
                    "createApiTask":false,
                    "env":null,
                    "syncStatus":null,
                    "syncTime":null,
                    "syncId":null,
                    "nodeId":-1,
                    "index":1,
                    "readable":true,
                    "isCollected":true,
                    "isTemplateLabel":false,
                    "isOnlineService":false,
                    "refreshFreqDetails":null,
                    "coverage":"100.00%"
                }
            ]
        },
        {
            "id":-2,
            "preNodeId":null,
            "subjectId":1,
            "projectId":1,
            "name":"未分类",
            "desc":null,
            "nodeType":"Default",
            "createTime":"1970-01-01 00:00:00",
            "updateTime":"1970-01-01 00:00:00",
            "index":null,
            "level":1,
            "labelCount":1,
            "display":true,
            "subNodes":[

            ],
            "labelInfos":[
                {
                    "id":23,
                    "name":"测试",
                    "subjectId":1,
                    "projectId":1,
                    "orgId":1,
                    "entityId":1,
                    "entityType":"baseid",
                    "labelType":"rule",
                    "dataType":"string",
                    "conf":null,
                    "creator":"admin",
                    "status":0,
                    "desc":"",
                    "createTime":"2023-01-17 13:58:50",
                    "updateTime":"2023-01-29 20:32:55",
                    "computeType":"offline",
                    "isMautag":0,
                    "syncParams":{
                        "scheduleConf":{
                            "frequency":"d",
                            "scheduleTime":"00:00:00"
                        },
                        "syncType":1
                    },
                    "taskId":100000070,
                    "dimMetId":664,
                    "updater":"admin",
                    "dataSecurityLevel":null,
                    "createApiTask":true,
                    "env":null,
                    "syncStatus":null,
                    "syncTime":null,
                    "syncId":null,
                    "nodeId":-2,
                    "index":12,
                    "readable":true,
                    "isCollected":false,
                    "isTemplateLabel":false,
                    "isOnlineService":false,
                    "refreshFreqDetails":"每天 时间: 00:00:00",
                    "coverage":"100.00%"
                }
            ]
        }
    ]
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

HTTP 状态码

错误码

错误信息

说明

400

invalidParameter

PARAMETER INVALID

参数非法,检查入参。