获取¶
GET /api/v1/notes_v2/{note_uuid}/get
概述¶
获取新版笔记详情。
路由参数¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| note_uuid | string | Y | Studio 新版笔记 UUID |
参数补充说明¶
使用 URL 中的 note_uuid 获取笔记详情。该接口会返回 Markdown 正文 content、NbookDB 笔记路径 path、标题、标签、公开状态以及当前 etag。
- 编辑页建议保存本次返回的
etag。 - 响应中的
path可用于展示或和其他系统做笔记定位;创建、修改和删除接口仍不需要传path。 - 修改或删除时可把该
etag作为ifMatch提交,用于避免覆盖他人更新。 - 如果当前 API Key 无权访问该笔记,会按资源不存在或无权限返回。
请求例子¶
响应¶
{
"code": 200,
"content": {
"noteUUID": "nbnote_xxx",
"title": "A",
"content": "# A",
"path": "manual/nbnote_xxx.md",
"tags": [
"ops"
],
"tagKV": {
"host": "127.0.0.1"
},
"isPublic": 1,
"createdSource": "manual",
"etag": "etag_xxx",
"version": 1
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-XXXX"
}