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