This commit is contained in:
Daniel 2023-05-23 09:01:37 +08:00
parent 68a674b11e
commit e4229f2bad
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 82 additions and 1 deletions

24
API.md
View file

@ -42,6 +42,7 @@
* [Get file](#Get-file)
* [Put file](#Put-file)
* [Remove file](#Remove-file)
* [Rename file](#Rename-file)
* [List files](#List-files)
* [Export](#Export)
* [Export Markdown](#Export-Markdown)
@ -1003,6 +1004,29 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
}
```
### Rename file
* `/api/file/renameFile`
* Parameters
```json
{
"path": "/data/assets/image-20230523085812-k3o9t32.png",
"newPath": "/data/assets/test-20230523085812-k3o9t32.png"
}
```
* `path`: the file path under the workspace path
* `newPath`: the new file path under the workspace path
* Return value
```json
{
"code": 0,
"msg": "",
"data": null
}
```
### List files
* `/api/file/readDir`