Skip to content

Modify



POST /api/v1/viewer/{viewer_uuid}/modify

Overview

Modify the display information, extension configuration, tags, or bindings of an existing Explorer.

Before Calling and Usage Steps

First, use Explorer details to verify the current content. Submit only the fields that need to be changed. When you submit extend, tagNames, or dashboardBindSet, the entire field is replaced; tagNames=[] clears the original associations. If tagNames is not passed, the original tags are retained. The tagInfo in the response may be an empty array, which you can verify using the details. Configuration updates for the same Explorer should be performed serially.

Path Parameters

Parameter Name Type Required Description
viewer_uuid string Y UUID of the target Explorer in the current workspace.
Example: dsbd_view_example
How to obtain or enter: Obtain it from content.data[].uuid in the Explorer list; you can also use content.uuid from the creation response.

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 enter: Obtain an OpenAPI Key with the required operation permission from API Key Management in the target workspace.

Body Request Parameters

Parameter Name Type Required Description
name string Explorer name, up to 64 characters.
Null allowed: False
Maximum length: 64
Example: 主机巡检查看器
How to obtain or enter: Choose a name that is not used by another Explorer in this workspace.
desc string Explorer description, up to 2048 characters.
Null allowed: False
Empty string allowed: True
Maximum length: 2048
Example: 主机巡检与状态核对
How to obtain or enter: Describe the purpose of the Explorer; an empty string clears the description.
type string Explorer type.
Null allowed: False
Maximum length: 32
Example: CUSTOM
How to obtain or enter: CUSTOM is generally used. When modifying, you can obtain content.type from the details and continue using it.
extend json Explorer extension information. Submit the complete object.
Null allowed: False
Example: {}
How to obtain or enter: Obtain it from content.extend in the Explorer details or dashboardExtend in the template.
pathName string Compatible path name. The current Explorer entity does not store this field separately.
Null allowed: False
Maximum length: 32
Example: host
How to obtain or enter: Older clients may include this field; new integrations should omit it.
tagNames array Complete tag list. Pass [] to clear it.
Null allowed: False
Example: ["team:ops"]
How to obtain or enter: Copy from content.tagInfo[].name in the existing Explorer details, or enter the use case tags to associate.
tagNames[*] string Single tag name, up to 128 characters.
Null allowed: False
Maximum length: 128
Example: team:ops
How to obtain or enter: Copy from content.tagInfo[].name in the existing Explorer details, or enter the use case tags to associate.
dashboardBindSet array Array of view binding information to be saved for the Explorer.
Null allowed: False
Empty string allowed: False
Example: []
How to obtain or enter: Obtain the complete binding list from content.dashboardBindSet in the Explorer details. If no binding is required, you can submit an empty list.

Additional Parameter Notes

When a field is omitted, its current value is retained. After updating, you can call the details endpoint to check the configuration.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/viewer/dsbd_view_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 Explorer record ID.
content.uuid string Explorer UUID.
content.workspaceUUID string Workspace to which it belongs.
content.name string Explorer name.
content.desc string Explorer description.
content.identifier string Custom identifier, which can be empty.
content.ownerType string Ownership of the Explorer resource, usually viewer.
content.type string Explorer type, for example CUSTOM.
content.isPublic integer Visibility scope of the current resource. 1 is public, and 0 is visible only to the creator identity.
content.chartPos array<object> Chart layout array, 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, and h.
content.chartGroupPos array<string> Chart group arrangement order.
content.iconSet object Icon configuration.
content.extend object Explorer extension information.
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 operation permission principals in the record.
content.readPermissionSet array<string> UUIDs of read permission principals in the record.
content.tagInfo array<object> Associated tag information.
content.tagInfo[].id string Identifier identical to the tag UUID.
content.tagInfo[].uuid string Tag UUID.
content.tagInfo[].name string Tag name.
content.tagInfo[].description string Tag description.
content.tagInfo[].colour string Tag color.
content.tagInfo[].scope array<string> Scope in which the tag takes effect.
content.tagInfo[].tagPermissionInfo object Read/write authorization information when present.
content.status integer Record status.
content.creator string Creator identity ID.
content.updator string Most recent updater identity ID, which can be empty.
content.createAt number Creation time, in Unix seconds.
content.updateAt number Update time, in Unix seconds. Can be -1 when not updated.
content.deleteAt number Deletion time, in Unix seconds. Is -1 when not deleted.
content.creatorInfo object Creator identity information; an empty object if not found.
content.updatorInfo object Most recent 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. For an API Key identity, its identifier may be returned.
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 in 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. For an API Key identity, its identifier may be returned.
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 in the workspace.
content.old_name string Name before the update.
content.dashboardBidding object Returned view association configuration, which can be empty.
content.declaration object or null Public declaration of the workspace.
{
  "code": 200,
  "content": {
    "id": 25,
    "uuid": "dsbd_view_example",
    "name": "主机巡检查看器 v2",
    "desc": "主机巡检与状态核对",
    "workspaceUUID": "wksp_example",
    "identifier": "",
    "ownerType": "viewer",
    "type": "CUSTOM",
    "isPublic": 1,
    "chartPos": [],
    "chartGroupPos": [],
    "iconSet": {},
    "extend": {},
    "mapping": [],
    "dashboardBindSet": [],
    "createdWay": "manual",
    "openPermissionSet": false,
    "permissionSet": [],
    "readPermissionSet": [],
    "tagInfo": [],
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785427200,
    "updateAt": 1785427320,
    "deleteAt": -1,
    "old_name": "主机巡检查看器",
    "dashboardBidding": {},
    "creatorInfo": {},
    "updatorInfo": {},
    "declaration": {}
  },
  "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 Field type or value does not conform to the declaration, or an undeclared top-level field is included Parameter parsing failed Verify the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError JSON syntax is valid, but the request top level is not an object Partial JSON file format error Pass the parameters as a JSON object.
404 ft.NotFoundView The target does not exist, has been deleted, or is not in the current workspace The specified view was not found Use the Explorer list in the same workspace to reconfirm a valid UUID.
400 ft.TagScopeMismatch A tag with the same name already exists, but its scope is incompatible with the use case The message includes the tag name and the existing and target scopes. Use a use case or general tag instead.
400 ft.ObjectParmeterExists The new name is already used by another Explorer in the current workspace {} already exists Choose an Explorer name that is not in use.

Feedback

Is this page helpful?