跳转至

获取



GET /api/v1/dashboard/carousel/{carousel_uuid}/get

概述

读取指定轮播配置及其仪表板名称。

调用前和使用步骤

从轮播列表取轮播 UUID。读取时会清理无效的仪表板引用。若有历史失效引用,本次 dashboardUUIDs 可能仍含旧值,以 dashboardInfo 为已解析到的有效仪表板;再次读取可见清理后的列表。

路由参数

参数名 类型 必选 说明
carousel_uuid string Y 轮播配置 UUID。
例子: csel_example
获取或填写方式: 在同一工作空间和调用身份下,从轮播列表的 content[].uuid 复制,也可用创建响应的 content.uuid。

请求头

参数名 类型 必选 说明
DF-API-KEY string Y 工作空间的 OpenAPI 鉴权凭据。
例子: <DF-API-KEY>
获取或填写方式: 从目标工作空间的 API Key 管理获取有该操作权限的 OpenAPI Key。

请求例子

curl --get 'https://openapi.guance.com/api/v1/dashboard/carousel/csel_example/get' \
  -H 'DF-API-KEY: <DF-API-KEY>'

响应

HTTP 200,application/json。下方示例展示可直接读取的主要字段。

字段 类型 说明
content.id integer 轮播记录的内部编号。
content.uuid string 轮播配置 UUID,供详情、修改、删除使用。
content.accountUUID string 轮播所属调用身份的 ID。
content.workspaceUUID string 轮播所属工作空间的 UUID。
content.name string 轮播名称。
content.intervalTime string 已保存的轮播间隔字符串。
content.dashboardUUIDs array<string> 保存的仪表板 UUID,按轮播顺序排列。
content.status integer 记录状态。
content.createAt number 创建时间,Unix 秒。
content.updateAt number 最近更新时间,Unix 秒。没有更新时为 -1。
content.deleteAt number 删除时间,Unix 秒。未删除时为 -1。
content.creator string 创建者身份 ID。
content.updator string 最近更新者身份 ID,未更新时为空字符串。
content.declaration object 或 null 工作空间的公共声明。
content.dashboardInfo array<object> 按轮播顺序排列。每项是一个单键映射,键为仪表板 UUID,值为仪表板名称。
{
  "code": 200,
  "content": {
    "id": 10,
    "uuid": "csel_example",
    "accountUUID": "wsak_example",
    "workspaceUUID": "wksp_example",
    "name": "生产巡检轮播",
    "intervalTime": "30s",
    "dashboardUUIDs": [
      "dsbd_example"
    ],
    "status": 0,
    "createAt": 1785427200,
    "updateAt": -1,
    "deleteAt": -1,
    "creator": "wsak_example",
    "updator": "",
    "declaration": {},
    "dashboardInfo": [
      {
        "dsbd_example": "生产巡检"
      }
    ]
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

错误响应

鉴权、限流和公共请求错误参见公共错误定义。

HTTP 状态 errorCode 触发条件 消息或响应说明 处理方式
404 ft.DashboardCarouselObjectNotExist 配置已删除、不存在或不属于当前调用身份及工作空间 该轮播对象不存在 用同一 Key 从轮播列表确认配置仍存在,再使用实际 UUID。

文档评价

文档内容是否对您有帮助?