Create a Viewer¶
POST /api/v1/viewer/add
Overview¶
Create a viewer
Body Request Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
ownerType | string | View classification type, defaults to viewer Example: viewer Can be empty: False |
|
templateUUID | string | View template UUID Can be empty: False Can be an empty string: True Maximum length: 128 |
|
sourceDashboardUUID | string | Source view ID Can be empty: False Can be an empty string: True Maximum length: 128 |
|
name | string | Y | Viewer name Can be empty: False Maximum length: 64 |
desc | string | Description Example: Description1 Can be empty: False Can be an empty string: True Maximum length: 2048 |
|
type | string | Type, defaults to CUSTOM Example: CUSTOM Can be empty: False Maximum length: 32 |
|
extend | json | Additional data for the viewer, defaults to {} Example: {} Can be empty: False |
|
templateInfos | json | Custom template data Example: {} Can be empty: False Can be an empty string: False |
|
isImport | boolean | Whether it is an imported viewer Can be empty: False |
|
tagNames | array | Names of tags Can be empty: False |
|
tagNames[*] | string | Tag name Can be empty: False Maximum length: 128 |
Additional Parameter Notes¶
Request Example¶
curl 'https://openapi.guance.com/api/v1/viewer/add' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"add_viewer","templateInfos":{},"isImport":false,"tagNames":[],"extend":{"index":"tracing"}}' \
--compressed
Response¶
{
"code": 200,
"content": {
"chartGroupPos": [],
"chartPos": [],
"createAt": 1677661673,
"createdWay": "manual",
"creator": "wsak_xxxxx",
"dashboardBindSet": [],
"deleteAt": -1,
"extend": {
"index": "tracing"
},
"iconSet": {},
"id": null,
"isPublic": 1,
"mapping": [],
"name": "add_viewer",
"ownerType": "viewer",
"status": 0,
"tag_info": [
{
"id": "tag_xxxx32",
"name": "Function"
},
{
"id": "tag_xxxx32",
"name": "Host"
},
{
"id": "tag_xxxx32",
"name": "Profile"
},
{
"id": "tag_xxxx32",
"name": "data"
},
{
"id": "tag_xxxx32",
"name": "ok"
},
{
"id": "tag_xxxx32",
"name": "ui"
},
{
"id": "tag_xxxx32",
"name": "Personal"
},
{
"id": "tag_xxxx32",
"name": "For"
},
{
"id": "tag_xxxx32",
"name": "Built-in"
},
{
"id": "tag_xxxx32",
"name": "Security Check"
},
{
"id": "tag_xxxx32",
"name": "APM"
},
{
"id": "tag_xxxx32",
"name": "Log"
},
{
"id": "tag_xxxx32",
"name": "User Analysis"
},
{
"id": "tag_xxxx32",
"name": "Alibaba"
},
{
"id": "tag_xxxx32",
"name": "Alibaba Cloud Monitoring"
}
],
"type": "CUSTOM",
"updateAt": 1677661673,
"updator": "wsak_xxxxx",
"uuid": "dsbd_xxxx32",
"workspaceUUID": "wksp_xxxx32"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-7EB1D391-C7BA-47BA-A535-DEE932554366"
}