参照可能なワークスペース一覧¶
GET /api/v1/wksp_share/granted_ws_list
概要¶
現在の API Key が属するワークスペースからクエリ可能な、権限付与元のワークスペースを一覧表示します。
Query リクエストパラメータ¶
| パラメータ名 | 型 | 必須 | 説明 |
|---|---|---|---|
| namespace | commaArray | 権限付与済みのデータタイプで参照可能なワークスペースをフィルタリングします。複数の namespace は英語のカンマで区切ります。 空を許可: False |
|
| regionCode | string | 権限付与元のサイトでフィルタリングします。返却されたグループの regionCode は、query_data の query.targetRegion として使用できます。 空を許可: False |
|
| filterWsUUIDs | commaArray | 権限付与元のワークスペース UUID でフィルタリングします。複数の UUID は英語のカンマで区切ります。 空を許可: False |
|
| search | string | 名前で検索します。 空を許可: False |
|
| pageIndex | integer | ページ番号です。 空を許可: False 例: 10 $minValue: 1 |
|
| pageSize | integer | 1ページあたりの返却件数です。 空を許可: False 例: 10 $minValue: 1 $maxValue: 100 |
パラメータ補足説明¶
本APIは、query_data で対象ワークスペースの UUID と query.targetRegion を取得するための推奨APIです。
content[j].regionCodeは、そのグループ内の権限付与元ワークスペースが属するサイトを示します。そのままquery.targetRegionとして使用できます。グループ内のdata[k].regionCodeも同じ意味です。content[j].data内でworkspaceUUIDにより対象のワークスペースを特定し、同じグループのregionCodeを使用してください。toRegionCodeを対象サイトとして扱わないでください。これは権限付与先、つまり 現在の API Key が属するワークスペースが存在するサイトを示します。namespaceにより権限付与済みのデータタイプをフィルタリングできます。例えば、ログをクエリする場合はnamespace=loggingを指定します。- 本APIは
regionCodeのグループごとに独立してページネーションを行います。pageInfo.countは現在のページの件数のみです。初回はregionCodeを指定せずに対象サイトを特定できます。その後は、対象サイトごとにregionCodeを明示的に指定し、pageIndex=1から独立してページをめくってください。そのサイトのpageInfo.totalCountに達するか、pageIndex * pageSize >= totalCountを満たした時点で終了します。権限付与のuuidと(regionCode, workspaceUUID)による重複排除を推奨します。
具体的なリクエストの構成方法については、OpenAPI クロスサイトデータクエリ を参照してください。
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 は権限付与元サイトごとにグループ化された配列です。各要素の data は、そのサイトの現在のページにおける参照可能なワークスペース情報です。
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": "Development Environment(daily)",
"status": 0,
"toRegionCode": "testing",
"toRegionName": "Test Environment(testing)",
"toWorkspaceName": "【Doris】for Developer",
"toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
"type": [
"logging"
],
"updateAt": -1,
"updator": "",
"uuid": "grant_02b04aec78c74f869151e3e8c3e54dae",
"workspaceName": "daily for testing",
"workspaceUUID": "wksp_6e310e0c1cbd45b4a27a19bda0fd7582"
},
{
"authorizationCode": "52f146179ec54f4b920f28c800ae9b3e",
"createAt": 1749541984,
"creator": "acnt_c956fd23a9c2427b96ee372c88ea9b60",
"delayDeleteAt": -1,
"deleteAt": -1,
"id": 441,
"indexes": [
"*"
],
"regionCode": "daily",
"regionName": "Development Environment(daily)",
"status": 0,
"toRegionCode": "testing",
"toRegionName": "Test Environment(testing)",
"toWorkspaceName": "【Doris】for Developer",
"toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
"type": [
"logging",
"billing",
"dialtest",
"tracing"
],
"updateAt": -1,
"updator": "",
"uuid": "grant_5eab9ac478614c64a5ac5cdc9f363921",
"workspaceName": "Guance Cloud(Test Environment)Monitoring",
"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": "Development Environment(daily)"
},
{
"data": [
{
"authorizationCode": "b081a0bec4c34bc899b05ee99b64ea04",
"createAt": 1748240284,
"creator": "acnt_06d1380440d54f2d845cb1dd3c896e45",
"delayDeleteAt": -1,
"deleteAt": -1,
"id": 434,
"indexes": [],
"regionCode": "testing",
"regionName": "Test Environment(testing)",
"status": 0,
"toRegionCode": "testing",
"toRegionName": "Test Environment(testing)",
"toWorkspaceName": "【Doris】for Developer",
"toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
"type": [
"custom_object"
],
"updateAt": -1,
"updator": "",
"uuid": "grant_7419f57582664a2e8755ea63cab11491",
"workspaceName": "WayneTest Workspace",
"workspaceUUID": "wksp_dc1b82a836ba4f71a4c136c99f119a11"
},
{
"authorizationCode": null,
"createAt": 1747139040,
"creator": "acnt_154f255afd8644779c78d28411454772",
"delayDeleteAt": -1,
"deleteAt": -1,
"id": 426,
"indexes": [
"*"
],
"regionCode": "testing",
"regionName": "Test Environment(testing)",
"status": 0,
"toRegionCode": "testing",
"toRegionName": "Test Environment(testing)",
"toWorkspaceName": "【Doris】for Developer",
"toWorkspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
"type": [
"*"
],
"updateAt": -1,
"updator": "",
"uuid": "grant_14ea52f7b22c483785db5f783610dab2",
"workspaceName": "huangdong testing",
"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": "Test Environment(testing)"
}
],
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-900225FA-E0C1-44D4-BA1A-5C8F39F9D108"
}