가져오기¶
POST /api/v1/notes/{notes_uuid}/import
개요¶
notes_uuid로 지정된 노트를 템플릿 구조로 내보냅니다. 조건에 따라 내보낼 템플릿의 노트 이름을 설정할 수 있습니다.
라우트 매개변수¶
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| notes_uuid | string | Y | 노트 UUID |
Body 요청 매개변수¶
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| templateInfo | json | 노트 템플릿 예시: {} 빈 값 허용: False |
매개변수 추가 설명¶
요청 예시¶
curl 'https://openapi.guance.com/api/v1/notes/notes_xxxx32/import' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"templateInfo": {"main": {"charts": [{"extend": {}, "name": "", "queries": [{"query": {"content": "## Guance Cloud\nSystem Observability Platform for the Cloud Era\n### Temporary Note\nSupport in Markdown Insert real-time charts in documents for data analysis,Combine Lock Time,Locate data situation at a specified time,Quickly Create Data Report、Analysis Report"}}], "type": "text"}, {"extend": {"fixedTime": null, "settings": {"chartType": "line", "colors": [], "compareTitle": "", "compareType": "", "density": "medium", "fixedTime": "", "isPercent": false, "isTimeInterval": true, "levels": [], "openCompare": false, "openStack": false, "showFieldMapping": false, "showLine": false, "showTitle": true, "stackType": "time", "timeInterval": "default", "titleDesc": "", "units": [], "xAxisShowType": "time"}}, "name": "New Chart", "queries": [{"color": "", "datasource": "dataflux", "name": "", "qtype": "dql", "query": {"alias": "", "code": "A", "dataSource": "datakit", "field": "cpu_usage", "fieldFunc": "last", "fieldType": "float", "fill": null, "filters": [], "funcList": [], "groupBy": [], "groupByTime": "", "namespace": "metric", "q": "M::`datakit`:(LAST(`cpu_usage`)) ", "queryFuncs": [], "type": "simple"}, "type": "sequence", "unit": ""}], "type": "sequence"}]}}}' \
--compressed
응답¶
{
"code": 200,
"content": {
"createAt": 1642588739,
"creator": "acnt_xxxx32",
"deleteAt": -1,
"id": 185,
"name": "My Notes",
"pos": [],
"status": 0,
"updateAt": 1642588739,
"updator": "acnt_xxxx32",
"uuid": "notes_xxxx32",
"workspaceUUID": "wksp_xxxx32"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-63D3E8C7-D34F-40D8-B969-CED589F51AB2"
}