コンテンツにスキップ

作成



POST /api/v1/snapshots/create

概要

スナップショットを作成します。

Body リクエストパラメータ

パラメータ名 タイプ 必須 説明
name string Y スナップショット名
空を許可: False
type string Y スナップショットの種類
空を許可: False
filterType string スナップショットフィルタータイプ
空を許可: False
content json Y ユーザー設定データ
空を許可: False
isForce boolean 同名の場合は強制上書き
空を許可: False

パラメータ補足説明

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

パラメータ名 type 必須 説明
name string Y スナップショット名
type String Y スナップショットタイプ, ログエクスプローラー: Log
filterType String N スナップショットフィルタータイプ
content dict Y スナップショット内容設定
isForce boolean N 同名の場合は強制上書きするかどうか

2. content パラメータの説明

パラメータ名 type 説明
routeParams.source string ログエクスプローラー: all
routeName string ルート名, ログエクスプローラー: Log
routeQuery.w string クエリのワークスペース
routeQuery.workspaceUUID string マルチワークスペースクエリのワークスペースID。このパラメータを指定しない場合、デフォルトで現在のワークスペース
routeQuery.time string クエリの時間, 例1: "15m", 例2: "1730697199573,1730698099573"
routeQuery.query string エクスプローラーのクエリ文
routeQuery.cols string エクスプローラーの表示列
routeQuery.viewType string エクスプローラーの表示モード。リストモード view、または分析モード analyze
routeQuery.index string ログクエリのインデックス
routeQuery.snapshotName string スナップショット名

content フィールドの例

{
  "routeParams": {
    "source": "all"
  },
  "routeName": "Log",
  "routeQuery": {
    "w": "wksp_4b57c7bab38e4a2d9630f675dc20015d",
    "time": "1730697199573,1730698099573",
    "query": "host:izbp152ke14timzud0du15z",
    "workspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d,wksp_ed134a6485c8484dbd0e58ce9a9c6115",
    "cols": "time,message,app_id",
    "viewType": "view",
    "index": "default,keyongxing,match_index",
    "snapshotName": "test2"
  }
}


リクエスト例

curl 'https://openapi.guance.com/api/v1/snapshots/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"jj_test1","type":"Log","content":{"routeParams":{"source":"all"},"routeName":"Log","routeQuery":{"w":"wksp_4b57c7bab38e4a2d9630f675dc20015d","time":"45m","query":"host:izbp152ke14timzud0du15z","cols":"time,message,app_id","viewType":"view","index":"default,keyongxing","snapshotName":"jj_test1"}}}' \
--compressed

レスポンス

{
    "code": 200,
    "content": {
        "accountUUID": "wsak_45d8e5f33d544a41848802d1c4cb17c5",
        "content": {
            "routeName": "Log",
            "routeParams": {
                "source": "all"
            },
            "routeQuery": {
                "cols": "time,message,app_id",
                "index": "default,keyongxing",
                "query": "host:izbp152ke14timzud0du15z",
                "snapshotName": "jj_test11",
                "time": "45m",
                "viewType": "view",
                "w": "wksp_4b57c7bab38e4a2d9630f675dc20015d"
            }
        },
        "createAt": 1730715753,
        "creator": "wsak_45d8e5f33d544a41848802d1c4cb17c5",
        "declaration": {
            "asd": "aa,bb,cc,1,True",
            "asdasd": "dawdawd",
            "business": "aaa",
            "dd": "dd",
            "fawf": "afawf",
            "organization": "64fe7b4062f74d0007b46676"
        },
        "deleteAt": -1,
        "id": null,
        "isHidden": 0,
        "isPublic": 1,
        "name": "jj_test11",
        "rules": {
            "roles": [
                "wsAdmin"
            ],
            "rules": {
                "rum": [
                    {
                        "rule_info": {
                            "rule": "",
                            "sources": [
                                "wksp_4b57c7bab38e4a2d9630f675dc20015d:dcl_test_2",
                                "wksp_4b57c7bab38e4a2d9630f675dc20015d:322242342342",
                                "wksp_4b57c7bab38e4a2d9630f675dc20015d:23"
                            ]
                        },
                        "rule_uuid": "lqrl_fc28066143434d66b57a02f79334208d"
                    }
                ]
            },
            "sensitiveDataMaskRules": {
                "backup_log": {},
                "billing": {},
                "custom_object": {},
                "custom_object_history": {},
                "keyevent": {},
                "logging": {},
                "metric": {},
                "network": {},
                "object": {},
                "object_history": {},
                "profiling": {},
                "rum": {},
                "security": {},
                "tracing": {},
                "unrecovered_event": {}
            }
        },
        "status": 0,
        "type": "Log",
        "updateAt": null,
        "updator": null,
        "uuid": "snap_4831741647084ef2bcee5fa3c7e19342",
        "workspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-52822E10-1F3C-499D-B54B-2F5BFCCD5C45"
} 

フィードバック

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