생성¶
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. 요청 매개변수 설명
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| name | string | Y | 스냅샷 이름 |
| type | String | Y | 스냅샷 유형, 로그 탐색기: Log |
| filterType | String | N | 스냅샷 필터 유형 |
| content | dict | Y | 스냅샷 내용 설정 |
| isForce | boolean | N | 동일 이름이 있을 때 강제 덮어쓰기 여부 |
2. content 매개변수 설명
| 매개변수명 | 유형 | 설명 |
|---|---|---|
| routeParams.source | string | 로그 탐색기: all |
| routeName | string | 라우트 이름, 로그 탐색기: Log |
| routeQuery.w | string | 쿼리 워크스페이스 |
| routeQuery.workspaceUUID | string | 다중 워크스페이스 쿼리 시 워크스페이스 UUID, 미전달 시 기본 워크스페이스 |
| 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"
}