列出¶
GET /api/v1/notes/list
概述¶
列出当前工作空间中可见的旧版笔记。
调用前和使用步骤¶
支持按名称过滤,无分页。可列出公开笔记和由当前调用身份创建的私有笔记。默认收藏项在前,其余按创建时间降序。用结果项的 uuid 调用详情或导出。
请求头¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| DF-API-KEY | string | Y | 工作空间的 OpenAPI 鉴权凭据。 例子: <DF-API-KEY>获取或填写方式: 从目标工作空间的 API Key 管理获取有该操作权限的 OpenAPI Key。 |
Query 请求参数¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| search | string | 名称包含匹配。省略或填空白时不按名称筛选。 允许 null: False 例子: 巡检获取或填写方式: 从笔记名称取关键词,使用 URL 编码传入。 |
参数补充说明¶
响应中的 data 是完整匹配列表,直接读取其中各项的 uuid。
请求例子¶
curl --get 'https://openapi.guance.com/api/v1/notes/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode 'search=巡检'
响应¶
HTTP 200,application/json。下方示例展示可直接读取的主要字段。
| 字段 | 类型 | 说明 |
|---|---|---|
| content.data | array<object> |
符合条件的笔记;没有结果时为 []。 |
| content.data[].id | integer | 笔记记录编号。 |
| content.data[].uuid | string | 笔记 UUID,用于查询、修改、导入和删除。 |
| content.data[].name | string | 笔记名称。 |
| content.data[].workspaceUUID | string | 所属工作空间。 |
| content.data[].isPublic | integer | 可见范围,1 为公开,0 为仅创建身份。 |
| content.data[].extend | object | 笔记扩展配置。 |
| content.data[].status | integer | 笔记当前状态。 |
| content.data[].creator | string | 创建者身份 ID。 |
| content.data[].updator | string | 最近更新者身份 ID,未更新时可为空。 |
| content.data[].createAt | number | 创建时间,Unix 秒。 |
| content.data[].updateAt | number | 最近更新时间,Unix 秒。未更新时可为 -1。 |
| content.data[].deleteAt | number | 删除时间,Unix 秒。未删除时为 -1。 |
| content.data[].pos | array<object> |
图表的顺序引用数组。 |
| content.data[].pos[].chartUUID | string | 图表 UUID。 |
| content.data[].creatorInfo | object | 创建者信息,未找到时为空对象。 |
| content.data[].updatorInfo | object | 最近更新者信息,未找到时为空对象。 |
| content.data[].creatorInfo.uuid | string | 查询到对应身份时可能提供。身份标识。 |
| content.data[].creatorInfo.status | integer | 查询到对应身份时可能提供。账号状态。 |
| content.data[].creatorInfo.wsAccountStatus | integer | 查询到对应身份时可能提供。空间成员状态。 |
| content.data[].creatorInfo.username | string | 查询到对应身份时可能提供。账号登录名称。 |
| content.data[].creatorInfo.name | string | 查询到对应身份时可能提供。显示名称。 |
| content.data[].creatorInfo.iconUrl | string | 查询到对应身份时可能提供。头像 URL。 |
| content.data[].creatorInfo.email | string | 查询到对应身份时可能提供。账号邮箱。API Key 身份可能返回其标识。 |
| content.data[].creatorInfo.mobile | string | 查询到对应身份时可能提供。联系方式。 |
| content.data[].creatorInfo.countryCode | string | 查询到对应身份时可能提供。手机号国家或地区代码。 |
| content.data[].creatorInfo.acntWsNickname | string | 查询到对应身份时可能提供。工作空间内昵称。 |
| content.data[].updatorInfo.uuid | string | 查询到对应身份时可能提供。身份标识。 |
| content.data[].updatorInfo.status | integer | 查询到对应身份时可能提供。账号状态。 |
| content.data[].updatorInfo.wsAccountStatus | integer | 查询到对应身份时可能提供。空间成员状态。 |
| content.data[].updatorInfo.username | string | 查询到对应身份时可能提供。账号登录名称。 |
| content.data[].updatorInfo.name | string | 查询到对应身份时可能提供。显示名称。 |
| content.data[].updatorInfo.iconUrl | string | 查询到对应身份时可能提供。头像 URL。 |
| content.data[].updatorInfo.email | string | 查询到对应身份时可能提供。账号邮箱。API Key 身份可能返回其标识。 |
| content.data[].updatorInfo.mobile | string | 查询到对应身份时可能提供。联系方式。 |
| content.data[].updatorInfo.countryCode | string | 查询到对应身份时可能提供。手机号国家或地区代码。 |
| content.data[].updatorInfo.acntWsNickname | string | 查询到对应身份时可能提供。工作空间内昵称。 |
| content.data[].isFavourited | boolean | 调用身份是否已收藏。 |
| content.declaration | object 或 null | 工作空间的公共声明。 |
{
"code": 200,
"content": {
"data": [
{
"id": 11,
"uuid": "note_example",
"name": "生产巡检笔记",
"workspaceUUID": "wksp_example",
"isPublic": 1,
"pos": [],
"extend": {},
"status": 0,
"creator": "wsak_example",
"updator": "",
"createAt": 1785427200,
"updateAt": -1,
"deleteAt": -1,
"creatorInfo": {},
"updatorInfo": {},
"isFavourited": false
}
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
错误响应¶
鉴权、限流和公共请求错误参见公共错误定义。
| HTTP 状态 | errorCode | 触发条件 | 消息或响应说明 | 处理方式 |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | 使用未声明的 Query 参数或参数违反规则 | 参数解析失败 | 核对 Query 参数表及示例。 |