コンテンツにスキップ

追加



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', 'agent_monitor']
空を許可: True
indexes array Y インデックス名、[""] はすべてを表す
例: ['
']
空を許可: False
regionCode string 権限付与先のワークスペースが属するサイトコード、デフォルトは現在のサイト
空を許可: False
空文字列を許可: True
conditions json フィルター条件
空を許可: False
conditions.metric array メトリクスタイプのフィルター条件
空を許可: False
conditions.tracing array アプリケーションパフォーマンスモニタリング(APM)タイプのフィルター条件
空を許可: False
conditions.rum array リアルユーザーモニタリング(RUM)タイプのフィルター条件
空を許可: False

パラメータ補足説明

1. リクエストパラメータの説明

パラメータ名 説明
regionCode 権限付与先サイトコード(workspace/website/list API で取得可能)。データアクセス設定のサイト情報。デフォルトでは現在のサイトのデータを権限付与
workspaceUUID 権限付与先のワークスペース UUID
type 権限付与タイプ。["*"] はすべてを表す。オプションのタイプ: ["metric","keyevent","network","rum","dialtest","billing","logging","tracing","object","custom_object","profiling","llm","agent_monitor"]
indexes 権限付与先のログインデックス名
conditions 権限範囲のフィルター条件

2. conditions フィールドの説明

パラメータ名 type 必須 説明
metric array N メトリクスタイプのフィルター条件
tracing array N アプリケーションパフォーマンスモニタリング(APM)タイプのフィルター条件
rum array N リアルユーザーモニタリング(RUM)タイプのフィルター条件

3. conditions.metric / conditions.tracing / conditions.rum パラメータの説明

key タイプ 必須 説明
metric[#] dict conditions.metric / conditions.tracing / conditions.rum 配列内のフィルター条件要素
metric[#].op string フィールド名とフィールド値の論理演算子 in, not in
metric[#].name string フィールド名
metric[#].logic string 同一タイプ内の複数フィルター条件グループの論理関係演算子 or, and。同一タイプ内の論理関係演算子は同じである必要がある
metric[#].value array フィールド値

4. conditions のサンプルは以下の通り

{
  "metric": [
    {
      "name": "host",
      "value": [
        "host1",
        "host2"
      ],
      "op": "in",
      "logic": "and"
    },
    {
      "name": "service",
      "value": [
        "guance"
      ],
      "op": "not in",
      "logic": "and"
    }
  ],
  "tracing": [
    {
      "name": "service",
      "value": [
        "kodo"
      ],
      "op": "in",
      "logic": "and"
    }
  ],
  "rum": [
    {
      "name": "app_id",
      "value": [
        "app_x"
      ],
      "op": "not in",
      "logic": "and"
    }
  ]
}


リクエスト例

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"
}

フィードバック

このページは役に立ちましたか?