Modify¶
POST /api/v1/dashboard/{dashboard_uuid}/modify
Overview¶
Update the name, description, identifier, or binding conditions of a built-in view.
Prerequisites and Usage Steps¶
First call Built-in View Details to save the existing dashboardBidding and name. Omitting dashboardBidding or submitting an empty object deletes the existing binding. If you only change fields such as the name and want to keep the binding, you must also submit the complete dashboardBidding returned by the details API. After modifying, verify the result with the details API again.
Route Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| dashboard_uuid | string | Y | UUID of the built-in view in the current workspace. Example: dsbd_inner_exampleHow to get or fill in: Obtain it from content.data[].uuid in the Built-in View List, or use content.uuid from the create response. |
Request Headers¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential of the workspace. Example: <DF-API-KEY>How to get or fill in: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace. |
Body Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| dashboardBidding.* | array | The property value is an array of match conditions for the corresponding field. Example: [{"op": "in", "value": ["web-01"]}]How to get or fill in: Use Built-in View Details to read the current binding, or confirm the field values from data such as logs or objects that need to jump to the view. |
|
| dashboardBidding.*[].op | string | in matches one of the given values; wildcard matches by wildcard pattern. When the source field value is not empty, a standalone * matches all values. Multiple conditions are handled as any-match. Example: inHow to get or fill in: Prefer the matching method of that field in the details result. |
|
| dashboardBidding.*[].value | array | String array. When the workspace restricts left wildcards, avoid the *example form. Example: ["web-01"]How to get or fill in: Select actual values from that field in the raw data. To match tags, use label, which matches df_label in the raw data. |
|
| name | string | Name of the built-in view, up to 256 characters. Allow null: False Maximum length: 256 Example: Host Details Built-in ViewHow to get or fill in: Enter a name that is not used by another built-in view in the current workspace. |
|
| desc | string | Description of the built-in view, up to 2048 characters. Allow null: False Maximum length: 2048 Example: View running status by hostHow to get or fill in: Enter the purpose of this view. |
|
| identifier | string | The built-in view identifier must be unique within the same workspace, up to 128 characters, and can be empty. Allow null: False Allow empty string: True Maximum length: 128 Example: host-overviewHow to get or fill in: A custom stable identifier. Before modifying, obtain the current identifier via the details API. |
|
| dashboardBidding | json | Complete binding conditions. Submitting a non-empty object replaces the whole binding; omitting it or passing {} deletes the binding. Allow null: False Example: {"host": [{"op": "in", "value": ["web-01"]}]}How to get or fill in: Use Built-in View Details to read the current binding, or confirm the field values from data such as logs or objects that need to jump to the view. |
Additional Parameter Notes¶
When changing the identifier, also update the calls that depend on it. When keeping the binding, replace the sample values with your own details result.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/dashboard/dsbd_inner_example/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"Host Details Built-in View v2","dashboardBidding":{"host":[{"op":"in","value":["web-01"]}]}}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.id | integer | Record ID of the built-in view. |
| content.uuid | string | UUID of the built-in view. |
| content.workspaceUUID | string | Workspace it belongs to. |
| content.name | string | Name of the built-in view. |
| content.desc | string | Description of the built-in view. |
| content.identifier | string | Custom identifier; can be empty. |
| content.ownerType | string | Resource ownership of the built-in view; for built-in views this is inner. |
| content.type | string | Type of the built-in view, for example CUSTOM. |
| content.isPublic | integer | Details access scope. 1 is public; 0 means only the creating identity can access. |
| content.chartPos | array<object> |
Array of chart layouts, containing chartUUID and the layout object pos. |
| content.chartPos[].chartUUID | string | UUID of the referenced chart. |
| content.chartPos[].pos | object | Position and size of the layout, such as x, y, w, h. |
| content.chartGroupPos | array<string> |
Arrangement order of chart groups. |
| content.iconSet | object | Icon configuration. |
| content.extend | object | Extended information of the built-in view. |
| content.mapping | array<object> |
Variable field mapping information. |
| content.dashboardBindSet | array | View binding configuration. |
| content.createdWay | string | Source of resource creation. |
| content.openPermissionSet | boolean | Permission configuration switch for the entity record. |
| content.permissionSet | array<string> |
UUIDs of the subjects with operation permission in the record. |
| content.readPermissionSet | array<string> |
UUIDs of the subjects with read permission in the record. |
| content.status | integer | Record status. |
| content.creator | string | Identity ID of the creator. |
| content.updator | string | Identity ID of the last updater; can be empty. |
| content.createAt | number | Creation time in Unix seconds. |
| content.updateAt | number | Update time in Unix seconds. Can be -1 if never updated. |
| content.deleteAt | number | Deletion time in Unix seconds. -1 if not deleted. |
| content.creatorInfo | object | Creator identity information; an empty object if not found. |
| content.updatorInfo | object | Last updater identity information; an empty object if not found. |
| content.creatorInfo.uuid | string | May be provided when the corresponding identity is found. Identity identifier. |
| content.creatorInfo.status | integer | May be provided when the corresponding identity is found. Account status. |
| content.creatorInfo.wsAccountStatus | integer | May be provided when the corresponding identity is found. Workspace member status. |
| content.creatorInfo.username | string | May be provided when the corresponding identity is found. Login name. |
| content.creatorInfo.name | string | May be provided when the corresponding identity is found. Display name. |
| content.creatorInfo.iconUrl | string | May be provided when the corresponding identity is found. Avatar URL. |
| content.creatorInfo.email | string | May be provided when the corresponding identity is found. Account email. An API Key identity may return its identifier. |
| content.creatorInfo.mobile | string | May be provided when the corresponding identity is found. Contact information. |
| content.creatorInfo.countryCode | string | May be provided when the corresponding identity is found. Country or region code of the mobile number. |
| content.creatorInfo.acntWsNickname | string | May be provided when the corresponding identity is found. Nickname within the workspace. |
| content.updatorInfo.uuid | string | May be provided when the corresponding identity is found. Identity identifier. |
| content.updatorInfo.status | integer | May be provided when the corresponding identity is found. Account status. |
| content.updatorInfo.wsAccountStatus | integer | May be provided when the corresponding identity is found. Workspace member status. |
| content.updatorInfo.username | string | May be provided when the corresponding identity is found. Login name. |
| content.updatorInfo.name | string | May be provided when the corresponding identity is found. Display name. |
| content.updatorInfo.iconUrl | string | May be provided when the corresponding identity is found. Avatar URL. |
| content.updatorInfo.email | string | May be provided when the corresponding identity is found. Account email. An API Key identity may return its identifier. |
| content.updatorInfo.mobile | string | May be provided when the corresponding identity is found. Contact information. |
| content.updatorInfo.countryCode | string | May be provided when the corresponding identity is found. Country or region code of the mobile number. |
| content.updatorInfo.acntWsNickname | string | May be provided when the corresponding identity is found. Nickname within the workspace. |
| content.old_name | string | Name before the update. |
| content.dashboardBidding | object | Binding condition object. An empty object when there is no binding. |
| content.dashboardBidding.* | array<object> |
Array of match conditions organized by the actual source field. |
| content.dashboardBidding.*[].op | string | Match operator. |
| content.dashboardBidding.*[].value | array<string> |
Array of match values. |
| content.tagInfo | array<object> |
Currently returns an empty array for built-in views. |
| content.declaration | object or null | Public declaration of the workspace. |
{
"code": 200,
"content": {
"id": 72,
"uuid": "dsbd_inner_example",
"name": "Host Details Built-in View v2",
"desc": "View running status by host",
"workspaceUUID": "wksp_example",
"identifier": "host-overview",
"ownerType": "inner",
"type": "CUSTOM",
"isPublic": 1,
"chartPos": [],
"chartGroupPos": [],
"iconSet": {},
"extend": {},
"mapping": [],
"dashboardBindSet": [],
"createdWay": "manual",
"openPermissionSet": false,
"permissionSet": [],
"readPermissionSet": [],
"status": 0,
"creator": "wsak_example",
"updator": "wsak_example",
"createAt": 1785427200,
"updateAt": 1785427320,
"deleteAt": -1,
"old_name": "Host Details Built-in View",
"dashboardBidding": {
"host": [
{
"op": "in",
"value": [
"web-01"
]
}
]
},
"tagInfo": [],
"creatorInfo": {},
"updatorInfo": {},
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | Field type or value does not match the declaration, or undeclared fields are included | Parameter parsing failed | Check field names, types, and lengths against the parameter table. |
| 400 | ft.RequestJsonFormatError | Request JSON syntax is invalid | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | The JSON top level is not an object | json file format error | Put the fields in a single JSON object. |
| 404 | ft.NotFoundView | The target does not exist, has been deleted, or does not belong to this workspace | The specified view was not found | Obtain a still-valid UUID from the built-in view list in the same workspace. |
| 403 | ft.ForbiddenOperationResource | The API Key has no valid operation permission on the target view | No operation permission | Confirm the workspace ownership and API Key permissions, or contact the resource creator. |
| 406 | ft.ParameterCheckFailed | The workspace restricts left wildcards and a binding value matches a wildcard condition starting with * | Left* matching is not supported for fuzzy matching in query configurations | Remove the leading * from the value or use an exact value. This restriction applies to wildcard or to conditions whose field name starts with * or -*; a standalone * does not trigger this validation. The content of the error response is true. |
| 400 | ft.IdentificationIdExists | The identifier is already used by another built-in view in the same workspace | Identifier ID already exists | Choose an unused identifier, or omit this field to keep the original value. |
| 400 | ft.ObjectParmeterExists | The new name is already used by another built-in view in the current workspace | {} already exists |
Use a name that has not been used yet. |