mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-22 14:04:28 +02:00
Updated Filer Server API (markdown)
1 parent
36ade3d359
commit
7eb72d1308
1 file changed
+21
-19
+21
-19
@@ -3,24 +3,26 @@ You can append to any HTTP API with &pretty=y to see a formatted json output.
|
||||
### POST/PUT/GET files
|
||||
```bash
|
||||
# Basic Usage:
|
||||
//create or overwrite the file, the directories /path/to will be automatically created
|
||||
POST /path/to/file
|
||||
PUT /path/to/file
|
||||
//create or overwrite the file, the filename in the multipart request will be used
|
||||
POST /path/to/
|
||||
//create or append the file
|
||||
POST /path/to/file?op=append
|
||||
PUT /path/to/file?op=append
|
||||
//get the file content
|
||||
GET /path/to/file
|
||||
//return a json format subdirectory and files listing
|
||||
GET /path/to/
|
||||
Accept: application/json
|
||||
//create or overwrite the file, the directories /path/to will be automatically created
|
||||
POST /path/to/file
|
||||
PUT /path/to/file
|
||||
//create or overwrite the file, the filename in the multipart request will be used
|
||||
POST /path/to/
|
||||
//create or append the file
|
||||
POST /path/to/file?op=append
|
||||
PUT /path/to/file?op=append
|
||||
//get the file content
|
||||
GET /path/to/file
|
||||
|
||||
//return a json format subdirectory and files listing
|
||||
GET /path/to/
|
||||
Accept: application/json
|
||||
|
||||
# options for POST a file:
|
||||
// set file TTL
|
||||
POST /path/to/file?ttl=1d
|
||||
// set file mode when creating or overwriting a file
|
||||
POST /path/to/file?mode=0755
|
||||
// set file TTL
|
||||
POST /path/to/file?ttl=1d
|
||||
// set file mode when creating or overwriting a file
|
||||
POST /path/to/file?mode=0755
|
||||
```
|
||||
| POST/PUT Parameter | Description | Default |
|
||||
| ---- | -- | -- |
|
||||
@@ -118,8 +120,8 @@ curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y"
|
||||
### GET files
|
||||
|
||||
```bash
|
||||
//get file with a different content-disposition
|
||||
GET /path/to/file?response-content-disposition=attachment%3B%20filename%3Dtesting.txt
|
||||
//get file with a different content-disposition
|
||||
GET /path/to/file?response-content-disposition=attachment%3B%20filename%3Dtesting.txt
|
||||
```
|
||||
| GET Parameter | Description | Default |
|
||||
| ---- | -- | -- |
|
||||
|
||||
Reference in new issue
Block a user