跳转至

可查看空间列表



GET /api/v1/wksp_share/granted_ws_list

概述

可查看 空间列出

Query 请求参数

参数名 类型 必选 说明
namespace commaArray 过滤出 具有对应 namespace 查看权限的 空间
允许为空: False
regionCode string 站点过滤, 表示可以查看那个站点的 哪些空间
允许为空: False
filterWsUUIDs commaArray 空间UUID, 多个空间使用 , 号隔开
允许为空: False
search string 名称搜索
允许为空: False
pageIndex integer 页码
允许为空: False
例子: 10
$minValue: 1
pageSize integer 每页返回数量
允许为空: False
例子: 10
$minValue: 1
$maxValue: 100

参数补充说明

1. 返回参数说明:

参数名 参数说明
regionCode 授权站点
regionName 授权站点名
workspaceName 授权空间名称
workspaceUUID 授权空间UUID
toRegionCode 被授权空间站点
toRegionName 被授权空间站点名
toWorkspaceName 被授权空间名称
toWorkspaceUUID 被授权空间UUID
type 空间授权类型,network,object,dialtest,billing,logging,tracing,metric,rum,keyevent,custom_object,security,profiling,*表示全部类型授权
indexes 授权日志索引名, *表示全部

注意:返回 content 为数组, 数组元素为单个站点的 所有可查看空间信息

2. 示列说明: 被授权方 可以查看 授权方 授权的数据 下面示列中 XX 空间授权给 YY 空间 日志 testing 索引查看权限, 即 YY 空间 可以查看 XX 空间的 日志 testing 索引数据

 {
          "createAt": 1749542060,
          "creator": "acnt_c956fd23a9c2427b96ee372c88ea9b60",
          "creatorInfo": {

          },
          "delayDeleteAt": -1,
          "deleteAt": -1,
          "id": 442,
          "indexes": [
              "testing"
          ],
          "regionCode": "daily",
          "regionName": "开发环境(daily)",
          "status": 0,
          "toRegionCode": "testing",
          "toRegionName": "测试环境(testing)",
          "toWorkspaceName": "YY",
          "toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
          "type": [
              "logging"
          ],
          "updateAt": -1,
          "updator": "",
          "updatorInfo": {

          },
          "uuid": "grant_02b04aec78c74f869151e3e8c3e54dae",
          "workspaceName": "XX",
          "workspaceUUID": "wksp_6e310e0c1cbd45b4a27a19bda0fd7582"
}

请求例子

curl 'https://openapi.guance.com/api/v1/wksp_share/granted_ws_list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed 

响应

{
    "code": 200,
    "content": [
        {
            "data": [
                {
                    "authorizationCode": "4248e561808c42868397a7a695a2d654",
                    "createAt": 1749542060,
                    "creator": "acnt_c956fd23a9c2427b96ee372c88ea9b60",
                    "delayDeleteAt": -1,
                    "deleteAt": -1,
                    "id": 442,
                    "indexes": [
                        "mysql",
                        "*"
                    ],
                    "regionCode": "daily",
                    "regionName": "开发环境(daily)",
                    "status": 0,
                    "toRegionCode": "testing",
                    "toRegionName": "测试环境(testing)",
                    "toWorkspaceName": "【Doris】开发测试一起用_改个名字",
                    "toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
                    "type": [
                        "logging"
                    ],
                    "updateAt": -1,
                    "updator": "",
                    "uuid": "grant_02b04aec78c74f869151e3e8c3e54dae",
                    "workspaceName": "daily环境空间-测试用",
                    "workspaceUUID": "wksp_6e310e0c1cbd45b4a27a19bda0fd7582"
                },
                {
                    "authorizationCode": "52f146179ec54f4b920f28c800ae9b3e",
                    "createAt": 1749541984,
                    "creator": "acnt_c956fd23a9c2427b96ee372c88ea9b60",
                    "delayDeleteAt": -1,
                    "deleteAt": -1,
                    "id": 441,
                    "indexes": [
                        "*"
                    ],
                    "regionCode": "daily",
                    "regionName": "开发环境(daily)",
                    "status": 0,
                    "toRegionCode": "testing",
                    "toRegionName": "测试环境(testing)",
                    "toWorkspaceName": "【Doris】开发测试一起用_改个名字",
                    "toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
                    "type": [
                        "logging",
                        "billing",
                        "dialtest",
                        "tracing"
                    ],
                    "updateAt": -1,
                    "updator": "",
                    "uuid": "grant_5eab9ac478614c64a5ac5cdc9f363921",
                    "workspaceName": "观测云(测试环境)监控",
                    "workspaceUUID": "wksp_dbfb60524bf44dfea84a4e1d73484e41"
                }
            ],
            "declaration": {
                "asd": "aa,bb,cc,1,True",
                "asdasd": "dawdawd",
                "business": "aaa",
                "dd": "dd",
                "fawf": "afawf",
                "organization": "64fe7b4062f74d0007b46676"
            },
            "pageInfo": {
                "count": 2,
                "pageIndex": 1,
                "pageSize": 100,
                "totalCount": 2
            },
            "regionCode": "daily",
            "regionName": "开发环境(daily)"
        },
        {
            "data": [
                {
                    "authorizationCode": "b081a0bec4c34bc899b05ee99b64ea04",
                    "createAt": 1748240284,
                    "creator": "acnt_06d1380440d54f2d845cb1dd3c896e45",
                    "delayDeleteAt": -1,
                    "deleteAt": -1,
                    "id": 434,
                    "indexes": [],
                    "regionCode": "testing",
                    "regionName": "测试环境(testing)",
                    "status": 0,
                    "toRegionCode": "testing",
                    "toRegionName": "测试环境(testing)",
                    "toWorkspaceName": "【Doris】开发测试一起用_改个名字",
                    "toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
                    "type": [
                        "custom_object"
                    ],
                    "updateAt": -1,
                    "updator": "",
                    "uuid": "grant_7419f57582664a2e8755ea63cab11491",
                    "workspaceName": "Wayne测试工作空间",
                    "workspaceUUID": "wksp_dc1b82a836ba4f71a4c136c99f119a11"
                },
                {
                    "authorizationCode": null,
                    "createAt": 1747139040,
                    "creator": "acnt_154f255afd8644779c78d28411454772",
                    "delayDeleteAt": -1,
                    "deleteAt": -1,
                    "id": 426,
                    "indexes": [
                        "*"
                    ],
                    "regionCode": "testing",
                    "regionName": "测试环境(testing)",
                    "status": 0,
                    "toRegionCode": "testing",
                    "toRegionName": "测试环境(testing)",
                    "toWorkspaceName": "【Doris】开发测试一起用_改个名字",
                    "toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
                    "type": [
                        "*"
                    ],
                    "updateAt": -1,
                    "updator": "",
                    "uuid": "grant_14ea52f7b22c483785db5f783610dab2",
                    "workspaceName": "huangdong的测试空间",
                    "workspaceUUID": "wksp_aef7103dc5a44397a9f4d0442517a15e"
                }
            ],
            "declaration": {
                "asd": "aa,bb,cc,1,True",
                "asdasd": "dawdawd",
                "business": "aaa",
                "dd": "dd",
                "fawf": "afawf",
                "organization": "64fe7b4062f74d0007b46676"
            },
            "pageInfo": {
                "count": 100,
                "pageIndex": 1,
                "pageSize": 100,
                "totalCount": 107
            },
            "regionCode": "testing",
            "regionName": "测试环境(testing)"
        }
    ],
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-900225FA-E0C1-44D4-BA1A-5C8F39F9D108"
} 

文档评价

文档内容是否对您有帮助? ×