Updated Filer Server API (markdown)

Chris Lu 2020-09-19 11:41:39 -07:00
parent 0bdaeeda7b
commit 3967defc1d

@ -100,7 +100,6 @@ curl -X POST "http://localhost:8888/test/"
```
### List files under a directory
This is for embedded filer only.
Some folder can be very large. To efficiently list files, we use a non-traditional way to iterate files. Every pagination you provide a "lastFileName", and a "limit=x". The filer locate the "lastFileName" in O(log(n)) time, and retrieve the next x files.
@ -133,6 +132,12 @@ curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y&l
}
```
| Parameter | Description | Default |
| ---- | -- | -- |
| limit | how many file to show | 100 |
| lastFileName | the last file in previous batch | empty |
# Deletion
## Delete a file
@ -153,3 +158,10 @@ curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y&l
// see https://github.com/chrislusf/seaweedfs/pull/1153
> curl -X DELETE http://localhost:8888/path/to?recursive=true&skipChunkDeletion=true
```
| Parameter | Description | Default |
| ---- | -- | -- |
| recursive | if "recursive=true", recursively delete all files and folders | filer recursiveDelete option |
| ignoreRecursiveError | if "ignoreRecursiveError=true", ignore errors in recursive mode | false |
| skipChunkDeletion | if "skipChunkDeletion=true", do not delete file chunks on volume servers | false |