列出¶
GET /api/v1/dashboard/carousel/list
概述¶
列出当前调用身份在工作空间内的轮播配置。
调用前和使用步骤¶
用创建时的工作空间及调用身份查询。列表按记录 ID 降序,无分页。读取会清理配置中已删除或不在这个工作空间的仪表板引用。复制结果的 uuid 调用轮播详情。
请求头¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| DF-API-KEY | string | Y | 工作空间的 OpenAPI 鉴权凭据。 例子: <DF-API-KEY>获取或填写方式: 从目标工作空间的 API Key 管理获取有该操作权限的 OpenAPI Key。 |
Query 请求参数¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| search | string | 按轮播名称做包含匹配,忽略大小写。省略或给空白值时列出全部可见结果。 允许 null: False 例子: 巡检获取或填写方式: 从已知轮播名称中选取关键词。 |
请求例子¶
curl --get 'https://openapi.guance.com/api/v1/dashboard/carousel/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode 'search=巡检'
响应¶
HTTP 200,application/json。下方示例展示可直接读取的主要字段。
| 字段 | 类型 | 说明 |
|---|---|---|
| content | array<object> |
配置列表。没有匹配记录时为空数组。 |
| 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 | 工作空间的公共声明。 |
{
"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": {}
}
],
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
错误响应¶
鉴权、限流和公共请求错误参见公共错误定义。
| HTTP 状态 | errorCode | 触发条件 | 消息或响应说明 | 处理方式 |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | 使用未声明的 Query 参数或参数违反规则 | 参数解析失败 | 核对 Query 参数表及示例。 |