mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
✨ 增加根据 ID 获取人类可读路径 API https://github.com/siyuan-note/siyuan/issues/4229
This commit is contained in:
parent
3f95cc192c
commit
a75a097b6e
2 changed files with 47 additions and 2 deletions
25
API.md
25
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 assets
|
||||
|
|
24
API_zh_CN.md
24
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"
|
||||
}
|
||||
```
|
||||
|
||||
## 资源文件
|
||||
|
||||
### 上传资源文件
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue