Create User View¶
POST /api/v1/dashboard/add
Overview¶
Create a single user view
Body Request Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
sourceDashboardUUID | string | Source view ID Can be null: False Can be empty string: True Maximum length: 128 |
|
name | string | Y | View name Can be null: False Maximum length: 256 |
desc | string | Description Example: Description1 Can be null: False Maximum length: 2048 |
|
identifier | string | Identifier id -- Identifier id added on December 25, 2024 Example: xxxx Can be null: False Can be empty string: True Maximum length: 128 |
|
templateInfos | json | Custom template data Example: {} Can be null: False Can be empty string: False |
|
dashboardBidding | json | Mapping, default is {} Example: {} Can be null: False |
|
specifyDashboardUUID | string | Specify the UUID for the new dashboard, must start with dsbd_custom_ followed by 32 lowercase letters or numbersExample: dsbd_custom_xxxx32 Can be null: False Can be empty string: False $matchRegExp: ^dsbd_custom_[a-z0-9]{32}$ |
Supplementary Parameter Explanation¶
Request body structure explanation
Parameter Name | Type | Description |
---|---|---|
name | string | Name |
desc | string | Description |
identifier | string | Identifier id -- Added on December 25, 2024 |
dashboardBidding | dict | Dashboard binding information |
sourceDashboardUUID | string | Clone dashboard or built-in user view UUID |
templateInfos | dict | Template information for cloning built-in system views |
Explanation of the built-in view field dashboardBidding
Internal support for op values in/wildcard
Example of dashboardBidding field:
{
"service": [
{
"value": [
"*"
],
"op": "in"
}
],
"app_id": [
{
"value": [
"test0"
],
"op": "wildcard"
}
],
"label": [
{
"value": [
"Do not delete"
],
"op": "in"
}
]
}
Request Example¶
curl 'https://openapi.guance.com/api/v1/dashboard/add' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Accept-Language: en' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json, text/plain, */*' \
--data-raw '{"name":"001 Bind Built-in View","dashboardBidding":{"service":[{"value":["*"],"op":"in"}],"app_id":[{"value":["test0"],"op":"wildcard"}],"label":[{"value":["Do not delete"],"op":"in"}]}}' \
--compressed
Response¶
{
"code": 200,
"content": {
"chartGroupPos": [],
"chartPos": [],
"createAt": 1713513331,
"createdWay": "manual",
"creator": "wsak_xxxx32",
"identifier": "",
"dashboardBidding": {
"app_id": [
{
"op": "wildcard",
"value": [
"test0"
]
}
],
"label": [
{
"op": "in",
"value": [
"Do not delete"
]
}
],
"service": [
{
"op": "in",
"value": [
"*"
]
}
]
},
"dashboardBindSet": [],
"declaration": {
"b": [
"asfawfgajfasfafgafwba",
"asfgahjfaf"
],
"business": "aaa",
"organization": "64fe7b4062f74d0007b46676"
},
"deleteAt": -1,
"desc": "",
"extend": {},
"iconSet": {},
"id": 5091,
"isPublic": 1,
"mapping": [],
"name": "001 Bind Built-in View",
"ownerType": "inner",
"status": 0,
"type": "CUSTOM",
"updateAt": 1713513331,
"updator": "wsak_xxxx32",
"uuid": "dsbd_xxxx32",
"workspaceUUID": "wksp_xxxx32"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-2FB0228E-1660-4557-AF7B-688176108C28"
}