An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: 增加根据 ID 获取人类可读路径 API https://github.com/siyuan-note/siyuan/issues/4229
Liang Dinga75a097b6e11
diff --git a/API.md b/API.mdindex 7fb061a405..aec298e00c 100644--- a/API.md+++ b/API.md@@ -18,6 +18,7 @@* [Remove a document](#Remove-a-document)* [Move a document](#Move-a-document)* [Get human-readable path based on path](#Get-human-readable-path-based-on-path)+ * [Get human-readable path based on ID](#Get-human-readable-path-based-on-ID)* [Assets](#Assets)* [Upload assets](#Upload-assets)* [Blocks](#Blocks)@@ -396,7 +397,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T}```-### Get human-readable path based on path+### Get human readable path based on path* `/api/filetree/getHPathByPath`* Parameters@@ -420,6 +421,28 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T}```+### Get human readable path based on ID++* `/api/filetree/getHPathByID`+* Parameters++ ```json+ {+ "id": "20210917220056-yxtyl7i"+ }+ ```++ * `id`:Block ID+* Return value++ ```json+ {+ "code": 0,+ "msg": "",+ "data": "/foo/bar"+ }+ ```+## Assets### Upload assetsdiff --git a/API_zh_CN.md b/API_zh_CN.mdindex c38ccb2820..2c6e291f0a 100644--- a/API_zh_CN.md+++ b/API_zh_CN.md@@ -30,7 +30,7 @@* [设置块属性](#设置块属性)* [获取块属性](#获取块属性)* [SQL](#SQL)- * [SQL 查询](#SQL-查询)+ * [执行 SQL 查询](#执行-SQL-查询)* [模板](#模板)* [渲染模板](#渲染模板)* [导出](#导出)@@ -420,6 +420,28 @@}```+### 根据 ID 获取人类可读路径++* `/api/filetree/getHPathByID`+* 参数++ ```json+ {+ "id": "20210917220056-yxtyl7i"+ }+ ```++ * `id`:块 ID+* 返回值++ ```json+ {+ "code": 0,+ "msg": "",+ "data": "/foo/bar"+ }+ ```+## 资源文件### 上传资源文件