Skip to content

Modify



POST /api/v1/dashboard/carousel/{carousel_uuid}/modify

Overview

Overwrite the name, dashboard list, and playback interval of an existing carousel.

Before Calling and Usage Steps

First read the original configuration from Carousel Details. When submitting, provide all three fields; fields kept at their original values must also be filled in. The API replaces the original list with dashboardUUIDs, and the original playback order is determined by the new array. After updating, you can read it again.

Route Parameters

Parameter Name Type Required Description
carousel_uuid string Y Carousel configuration UUID.
Example: csel_example
How to get or fill in: Under the same workspace and calling identity, copy content[].uuid from the Carousel List, or use content.uuid from the creation response.

Request Headers

Parameter Name 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 the required permissions from API Key management in the target workspace.

Body Request Parameters

Parameter Name Type Required Description
dashboardUUIDs array Y Non-empty array of dashboard UUIDs. The order passed in is saved on create and modify; on read, references that have been deleted or are not in the current workspace are cleaned up.
Allows null: False
Example: ["dsbd_example"]
How to get or fill in: Take values from content.data[].uuid in the Dashboard List response and fill them in the desired carousel order.
name string Y New carousel name, up to 256 characters.
Allows null: False
Maximum length: 256
Example: Production Inspection Carousel
How to get or fill in: You can keep the original name; when renaming, choose a name that is not used by other carousels of the current identity in this workspace.
intervalTime string Y Playback interval string, required for both create and modify.
Allows null: False
Example: 30s
How to get or fill in: Fill in a frontend-recognizable string according to the desired playback interval, for example 30s.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/dashboard/carousel/csel_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"dashboardUUIDs":["dsbd_example"],"name":"Production Inspection Carousel","intervalTime":"60s"}'

Response

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

Field Type Description
content.id integer Internal ID of the carousel record.
content.uuid string Carousel configuration UUID, used for details, modification, and deletion.
content.accountUUID string ID of the calling identity that owns the carousel.
content.workspaceUUID string UUID of the workspace that owns the carousel.
content.name string Carousel name.
content.intervalTime string Saved carousel interval string.
content.dashboardUUIDs array<string> Saved dashboard UUIDs, arranged in carousel order.
content.status integer Record status.
content.createAt number Creation time, in Unix seconds.
content.updateAt number Last update time, in Unix seconds. -1 if never updated.
content.deleteAt number Deletion time, in Unix seconds. -1 if not deleted.
content.creator string Creator identity ID.
content.updator string Identity ID of the last updater; an empty string if never updated.
content.declaration object or null Public declaration of the workspace.
{
  "code": 200,
  "content": {
    "id": 10,
    "uuid": "csel_example",
    "accountUUID": "wsak_example",
    "workspaceUUID": "wksp_example",
    "name": "Production Inspection Carousel",
    "intervalTime": "60s",
    "dashboardUUIDs": [
      "dsbd_example"
    ],
    "status": 0,
    "createAt": 1785427200,
    "updateAt": 1785427320,
    "deleteAt": -1,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "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 A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Fix the JSON according to content.reason, line, and column.
406 ft.MissingParameters The carousel name, dashboard list, or interval is empty Missing parameters Use a non-empty name, a non-empty UUID array, and a non-empty interval string.
404 ft.DashboardCarouselObjectNotExist The configuration has been deleted, does not exist, or does not belong to the current calling identity and workspace The carousel object does not exist Use the same Key to confirm from the carousel list that the configuration still exists, then use the actual UUID.
400 ft.DashboardCarouselNameRepeat The current identity already has another carousel with the same name, or a same-named configuration is being written concurrently The carousel name already exists Check the existing configurations. If a same-named configuration exists, rename it or operate on it directly; if same-named operations are concurrent, wait for the previous one to complete before retrying.

Feedback

Is this page helpful?