添加¶
POST /api/v1/wksp_share/add
概述¶
Body 请求参数¶
参数名 | 类型 | 必选 | 说明 |
---|---|---|---|
workspaceUUID | commaArray | Y | 被授权的空间 ID 允许为空: False |
type | array | Y | 数据类型, ["*"] 表示全部 例子: ['metric', 'keyevent', 'network', 'rum', 'dialtest', 'billing', 'logging', 'tracing', 'object', 'custom_object', 'profiling', 'llm'] 允许为空: True |
indexes | array | Y | 索引名, [""]表示全部 例子: [''] 允许为空: False |
regionCode | string | 被授权的空间所属站点 Code, 默认当前站点 允许为空: False 允许为空字符串: True |
参数补充说明¶
1. 请求参数说明
参数名 | 说明 |
---|---|
regionCode | 被授权站点 code (可通过 workspace/website/list 接口获取), 数据访问配置的站点信息, 默认授权当前站点的数据 |
workspaceUUID | 被授权的空间 uuid |
type | 授权类型,["*"]表示全部,可选类型: ["metric","keyevent","network","rum","dialtest","billing","logging","tracing","object","custom_object","profiling","llm"] |
indexes | 被授权的日志索引名 |
请求例子¶
curl 'https://openapi.guance.com/api/v1/wksp_share/add' \
-H 'Content-Type: application/json' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw '{"regionCode":"testing","workspaceUUID":"wksp_a810008c0e4e4e70ad9222c01f083287","type":["*"],"indexes":["*"]}' \
--compressed
响应¶
{
"code": 200,
"content": {
"authorizationCode": null,
"createAt": 1757572382,
"creator": "wsak_7e0689c908774efda1b345c20c5d23d7",
"declaration": {
"asd": "aa,bb,cc,1,True",
"asdasd": "dawdawd",
"business": "aaa",
"dd": "dd",
"fawf": "afawf",
"organization": "64fe7b4062f74d0007b46676"
},
"delayDeleteAt": -1,
"deleteAt": -1,
"id": 468,
"indexes": [
"*"
],
"name": "doris testing",
"regionCode": "testing",
"status": 0,
"toRegionCode": "testing",
"toWorkspaceName": "doris testing",
"toWorkspaceUUID": "wksp_a810008c0e4e4e70ad9222c01f083287",
"type": [
"*"
],
"updateAt": -1,
"updator": "",
"uuid": "grant_2ee1f355abf84a038f4aacb9319fd747",
"workspaceName": "testing workspace",
"workspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-AF6A234D-7804-4A1C-BC38-7861088BA6B5"
}