🎨 Add kernel API /api/filetree/getIDsByHPath https://github.com/siyuan-note/siyuan/issues/9654

This commit is contained in:
Daniel 2023-11-15 09:08:41 +08:00
parent 8eb5e53f81
commit 38099e4892
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 115 additions and 2 deletions

30
API.md
View file

@ -415,7 +415,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
@ -439,7 +439,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
}
```
### Get human readable path based on ID
### Get human-readable path based on ID
* `/api/filetree/getHPathByID`
* Parameters
@ -461,6 +461,32 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
}
```
### Get IDs based on human-readable path
* `/api/filetree/getIDsByHPath`
* Parameters
```json
{
"path": "/foo/bar",
"notebook": "20210808180117-czj9bvb"
}
```
* `path`: Human-readable path
* `notebook`: Notebook ID
* Return value
```json
{
"code": 0,
"msg": "",
"data": [
"20200813004931-q4cu8na"
]
}
```
## Assets
### Upload assets