Skip to content

Modify



POST /api/v1/dashboards/{dashboard_uuid}/modify

Overview

Modifies the attributes, tags, and visibility scope of the specified dashboard.

Before You Call and Usage Steps

First call Dashboard Details to read the current configuration, then submit the fields to change. When extend, mapping, or tagNames is provided, the corresponding content is replaced as a whole. Modifications to the same dashboard should be executed serially to prevent concurrent read-modify-write operations from overwriting each other. To adjust only the default query workspace, use Extend Configuration.

Route Parameters

Parameter Name Type Required Description
dashboard_uuid string Y UUID of the target dashboard.
Example: dsbd_example
How to obtain or fill in: Copy from the content.data[].uuid in the Dashboard List, or use content.uuid from the creation result.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or fill in: Obtain an OpenAPI Key with this operation permission from the API Key Management of the target workspace.

Body Request Parameters

Parameter Name Type Required Description
name string Display name of the dashboard.
Allows null: False
Example: 生产巡检
How to obtain or fill in: Use a name that is not occupied by other dashboards in the current workspace.
desc string Description of the dashboard.
Allows null: False
Allows empty string: True
Maximum length: 2048
Example: 生产服务巡检指标
How to obtain or fill in: Describe the purpose of this dashboard; pass an empty string to clear the description.
identifier string Custom identifier ID, up to 128 characters. This value and the UUID are used separately.
Allows null: False
Allows empty string: True
Maximum length: 128
Example: prod-check
How to obtain or fill in: Choose an identifier according to the caller's naming convention that is not used by other dashboards in this workspace.
extend json Extended configuration of the dashboard. Reuse existing fields as needed.
Allows null: False
Example: {}
How to obtain or fill in: Get the existing object from content.extend in the dashboard details.
mapping array Field mapping array for dashboard variables. Pass an empty array when there is no mapping.
Allows null: False
Example: []
How to obtain or fill in: Take the value from content.mapping of an existing dashboard or content.dashboardMapping of an export template.
tagNames array Submit the complete list of tags. Pass [] to remove all tag associations.
Allows null: False
Example: ["team:ops"]
How to obtain or fill in: Copy from content.tagInfo[].name in the dashboard details, or enter the names of the tags to associate.
isPublic int 1 public, 0 visible only to the creator identity, -1 custom permissions. If omitted, the original visibility scope is retained.
Allows null: False
Example: 1
How to obtain or fill in: Choose 1, 0, or -1 according to the target visibility scope.
permissionSet array Operation permission list used when isPublic=-1; can contain role (except owner), member, and team UUIDs.
Allows null: False
Example: ["role_example"]
How to obtain or fill in: Obtain the UUIDs from the Role List, Member List, or Team List.
readPermissionSet array Read permission list used when isPublic=-1; can contain role (except owner), member, and team UUIDs.
Allows null: False
Example: ["role_example"]
How to obtain or fill in: Obtain the UUIDs from the Role List, Member List, or Team List.

Additional Parameter Notes

Omitting a field retains its current value. After saving tags, you can call the details API again to read the complete associated tags.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/dashboards/dsbd_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"生产巡检 v2"}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.id integer Dashboard record number.
content.uuid string Dashboard UUID, used for details, modification, deletion, and rotation.
content.workspaceUUID string Workspace it belongs to.
content.name string Dashboard display name.
content.desc string Dashboard description.
content.identifier string External custom identifier, may be empty.
content.ownerType string Resource type ownership; usually node for dashboards.
content.type string Dashboard type, for example CUSTOM.
content.chartPos array<object> Chart layout array. The chartUUID of each item is the chart identifier, and pos is the layout object.
content.chartPos[].chartUUID string UUID of the associated chart.
content.chartPos[].pos object Chart size and position, for example x, y, w, h.
content.chartGroupPos array<string> Arrangement order of chart group identifiers.
content.iconSet object Icon settings.
content.isPublic integer 1 public, 0 visible only to the creator identity, -1 custom permissions.
content.extend object Extended configuration.
content.mapping array<object> Variable field mapping.
content.createdWay string Resource creation source.
content.dashboardBindSet array View binding configuration.
content.openPermissionSet boolean Whether custom permissions are currently enabled.
content.permissionSet array<string> List of UUIDs of operation permission subjects.
content.readPermissionSet array<string> List of UUIDs of read permission subjects.
content.tagInfo array<object> Tag information related to this response.
content.tagInfo[].id string Tag identifier, same as uuid.
content.tagInfo[].uuid string Tag UUID.
content.tagInfo[].name string Associated tag name.
content.tagInfo[].description string Tag description.
content.tagInfo[].colour string Tag color.
content.tagInfo[].scope array<string> Effective scope of the tag.
content.tagInfo[].tagPermissionInfo object Operation and read permission information attached when tag authorization exists.
content.status integer Record status.
content.creator string Creator identity ID.
content.updator string Identity ID of the most recent updater; may be empty if no update has occurred.
content.createAt number Creation time, in Unix seconds.
content.updateAt number Most recent update time, in Unix seconds. May be -1 if no update has occurred.
content.deleteAt number Deletion time, in Unix seconds. -1 if not deleted.
content.creatorInfo object Creator information; may be an empty object.
content.updatorInfo object Most recent updater information; may be an empty object.
content.declaration object or null Public declaration of the workspace.
content.old_name string Name before the update.
content.dashboardBidding object View binding data; an empty object when the dashboard has no related binding information.
{
  "code": 200,
  "content": {
    "id": 21,
    "uuid": "dsbd_example",
    "name": "生产巡检 v2",
    "desc": "生产服务巡检指标",
    "workspaceUUID": "wksp_example",
    "identifier": "prod-check",
    "ownerType": "node",
    "type": "CUSTOM",
    "chartPos": [],
    "chartGroupPos": [],
    "iconSet": {},
    "isPublic": 1,
    "extend": {},
    "mapping": [],
    "createdWay": "manual",
    "dashboardBindSet": [],
    "openPermissionSet": false,
    "permissionSet": [],
    "readPermissionSet": [],
    "tagInfo": [],
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785427200,
    "updateAt": 1785427320,
    "deleteAt": -1,
    "status": 0,
    "declaration": {},
    "creatorInfo": {},
    "updatorInfo": {},
    "old_name": "生产巡检",
    "dashboardBidding": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions 参数解析失败 Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid 请求 JSON 格式错误 Fix the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON syntax is valid but the request top level is not an object 部分 json 文件格式错误 Put the parameters in a JSON object.
404 ft.NotFoundView The target dashboard does not exist, has been deleted, or is not in the current workspace 未找到指定视图 Use a UUID returned by the dashboard list of the current workspace instead.
403 ft.ForbiddenDashboardOperation The calling identity cannot operate the target dashboard 您无仪表板【{}】操作权限 Check the dashboard's visibility scope, operation authorization, and the API Key used.
400 ft.TagScopeMismatch The tag name already exists, but its scope is incompatible with the scenario tags The message contains the tag name and scope, for example team:ops: ['monitor'] -> scene. Choose a tag name in the scenario or general scope, or use a different name.
406 ft.ExceedMaxCharacterLimit The tag name exceeds 128 characters {}超过最大字符长度限制 Shorten the tag name and submit again.
400 ft.ObjectParmeterExists The modified name duplicates another dashboard of the same kind {} 已存在 Use a different name or confirm the target UUID.
400 ft.IdentificationIdExists The new identifier is already used by another dashboard in the current workspace 标识ID已存在 Change the identifier and submit again.
400 ft.IndexDashboardForbiddenSetVisibleSet The target is the current home page dashboard, and a non-public scope was submitted 主页仪表板, 禁止设置可见范围 Keep it public. To restrict the scope, first adjust the workspace's home page settings.

Feedback

Is this page helpful?