mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Updated Filer Server API (markdown)
parent
e88dc33d2e
commit
58a1493642
|
@ -39,6 +39,10 @@ You can append to any HTTP API with &pretty=y to see a formatted json output.
|
||||||
| header: `Content-Type` | used for auto compression | empty |
|
| header: `Content-Type` | used for auto compression | empty |
|
||||||
| header: `Content-Disposition` | used as response content-disposition | empty |
|
| header: `Content-Disposition` | used as response content-disposition | empty |
|
||||||
| prefixed header: `Seaweed-` | example: `Seaweed-name1: value1`. Returned as `Seaweed-Name1: value1` in GET/HEAD response header. | empty |
|
| prefixed header: `Seaweed-` | example: `Seaweed-name1: value1`. Returned as `Seaweed-Name1: value1` in GET/HEAD response header. | empty |
|
||||||
|
|
||||||
|
| GET Parameter | Description | Default |
|
||||||
|
| ---- | -- | -- |
|
||||||
|
| metadata| get file metadata | empty |
|
||||||
### notice
|
### notice
|
||||||
* It is recommended to add retries when writing to Filer.
|
* It is recommended to add retries when writing to Filer.
|
||||||
* `AutoChunking` is not supported for method `PUT`. If the file length is greater than 256MB, only the leading 256MB in the `PUT` request will be saved.
|
* `AutoChunking` is not supported for method `PUT`. If the file length is greater than 256MB, only the leading 256MB in the `PUT` request will be saved.
|
||||||
|
@ -61,7 +65,6 @@ Examples:
|
||||||
> curl -T test.yaml http://localhost:8888/test.yaml?op=append # append to an file by PUT
|
> curl -T test.yaml http://localhost:8888/test.yaml?op=append # append to an file by PUT
|
||||||
{"name":"test.yaml","size":866}
|
{"name":"test.yaml","size":866}
|
||||||
> curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y" # list all files under /javascript/
|
> curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y" # list all files under /javascript/
|
||||||
curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y"
|
|
||||||
{
|
{
|
||||||
"Path": "/javascript",
|
"Path": "/javascript",
|
||||||
"Entries": [
|
"Entries": [
|
||||||
|
@ -118,6 +121,46 @@ curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y"
|
||||||
"LastFileName": "jquery-sparklines",
|
"LastFileName": "jquery-sparklines",
|
||||||
"ShouldDisplayLoadMore": false
|
"ShouldDisplayLoadMore": false
|
||||||
}
|
}
|
||||||
|
# get file metadata
|
||||||
|
> curl 'http://localhost:8888/test01.py?metadata&pretty=yes'
|
||||||
|
{
|
||||||
|
"FullPath": "/test01.py",
|
||||||
|
"Mtime": "2022-01-09T19:11:18+08:00",
|
||||||
|
"Crtime": "2022-01-09T19:11:18+08:00",
|
||||||
|
"Mode": 432,
|
||||||
|
"Uid": 1001,
|
||||||
|
"Gid": 1001,
|
||||||
|
"Mime": "text/x-python",
|
||||||
|
"Replication": "",
|
||||||
|
"Collection": "",
|
||||||
|
"TtlSec": 0,
|
||||||
|
"DiskType": "",
|
||||||
|
"UserName": "",
|
||||||
|
"GroupNames": null,
|
||||||
|
"SymlinkTarget": "",
|
||||||
|
"Md5": "px6as5eP7tF5YcgAv5m60Q==",
|
||||||
|
"FileSize": 1992,
|
||||||
|
"Extended": null,
|
||||||
|
"chunks": [
|
||||||
|
{
|
||||||
|
"file_id": "17,04fbb55507b515",
|
||||||
|
"size": 1992,
|
||||||
|
"mtime": 1641726678984876713,
|
||||||
|
"e_tag": "px6as5eP7tF5YcgAv5m60Q==",
|
||||||
|
"fid": {
|
||||||
|
"volume_id": 17,
|
||||||
|
"file_key": 326581,
|
||||||
|
"cookie": 1426568469
|
||||||
|
},
|
||||||
|
"is_compressed": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"HardLinkId": null,
|
||||||
|
"HardLinkCounter": 0,
|
||||||
|
"Content": null,
|
||||||
|
"Remote": null,
|
||||||
|
"Quota": 0
|
||||||
|
}
|
||||||
```
|
```
|
||||||
### GET files
|
### GET files
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue