列出¶
GET /api/v1/channel/quick_list
概述¶
获取当前工作空间的频道简化信息及当前调用身份的订阅状态。
调用前和使用步骤¶
使用目标工作空间有此接口权限的 API Key 调用,无需 Query 参数。结果直接位于 content 数组,不分页。默认频道在前,其余先按当前身份的置顶时间降序,再按创建时间降序。
请求头¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| DF-API-KEY | string | Y | 工作空间的 OpenAPI 鉴权凭据。 例子: <DF-API-KEY>获取或填写方式: 从目标工作空间的 API Key 管理获取有该操作权限的 OpenAPI Key。 |
参数补充说明¶
列表返回的 uuid 可直接用于本模块的修改、删除和订阅接口。
请求例子¶
响应¶
HTTP 200,application/json。下方示例展示可直接读取的主要字段。
| 字段 | 类型 | 说明 |
|---|---|---|
| content | array<object> |
频道列表,没有结果时为空数组。 |
| content[].id | integer | 数据库记录编号。请使用 uuid 操作频道。 |
| content[].uuid | string | 频道 UUID,供修改、删除或订阅使用。 |
| content[].workspaceUUID | string | 频道所属工作空间。 |
| content[].name | string | 频道名称。default 表示默认频道。 |
| content[].description | string | 频道描述。 |
| content[].notifyTarget | array<string> |
该频道直接配置的通知对象 UUID。 |
| content[].notifyTarget[] | string | 单个通知对象 UUID。 |
| content[].notifyUpgradeCfg | object | 升级通知配置,未配置时为空对象。 |
| content[].notifyUpgradeCfg.triggerTime | integer | 触发升级通知的等待时长,单位秒。 |
| content[].notifyUpgradeCfg.notifyTarget | array<string> |
升级通知对象 UUID 列表。 |
| content[].notifyUpgradeCfg.notifyTarget[] | string | 升级通知对象 UUID。 |
| content[].status | integer | 记录状态,正常为 0。 |
| content[].creator | string | 创建调用身份。 |
| content[].updator | string | 最近更新身份,未更新可为空字符串。 |
| content[].createAt | integer | 创建时间,Unix 秒。 |
| content[].updateAt | integer | 更新时间,Unix 秒,未更新为 -1。 |
| content[].deleteAt | integer | 删除时间,Unix 秒,未删除为 -1。 |
| content[].pinnedAt | integer | 当前调用身份的置顶时间,Unix 秒,未置顶为 -1。 |
| content[].subscribeType | string | 当前身份订阅类型:responsible 负责人,participate 参与人,attention 关注者;未订阅或已取消为空字符串。 |
| content[].declaration | object 或 null | 工作空间的公共声明。 |
{
"code": 200,
"content": [
{
"id": 42,
"uuid": "chan_example",
"workspaceUUID": "wksp_example",
"name": "生产异常",
"description": "生产异常协作频道",
"notifyTarget": [
"notify_example"
],
"notifyUpgradeCfg": {
"triggerTime": 300,
"notifyTarget": [
"notify_example"
]
},
"status": 0,
"creator": "wsak_example",
"updator": "",
"createAt": 1785427200,
"updateAt": -1,
"deleteAt": -1,
"pinnedAt": -1,
"subscribeType": "",
"declaration": {}
}
],
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
错误响应¶
鉴权、限流和公共请求错误参见公共错误定义。
没有频道时成功返回空数组。本接口没有额外的业务 Query 声明,鉴权和限流错误参见公共错误。