FDS Restful API
ListBuckets related api supported by FDS
Version: 1.0.0
/
GET
Summary: get Bucket list
Description:
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
authorization | header | authentication info,The calculation method is referred to the relevant document of signature verification | Yes | string |
Date | header | request time | Yes | string |
authorizedBuckets | query | if including this request parameter, the returned bucket list contains all the authorized buckets | No | string |
Responses
Code | Description | Schema |
---|---|---|
200 | bucket list | ListAllBucketsResult |
Models
Name | Type | Description | Required |
---|---|---|---|
owner | OwnerBean | No | |
buckets | [ BucketBean ] | No |
Name | Type | Description | Required |
---|---|---|---|
id | string | owner ID | No |
displayName | string | owner name | No |
Name | Type | Description | Required |
---|---|---|---|
name | string | bucket name | No |
orgId | string | owner ID | No |
Initializing
# 1. list all the Buckets the user created
curl -v -XGET\
-H 'authorization: Galaxy-V2 54xxxxxx45:NgxxxxxxxxxDWI=' \
-H 'Date: Mon, 20 Feb 2017 03:21:04 GMT' \
'https://cnbj0.fds.api.xiaomi.com'
> GET / HTTP/1.1
> User-Agent: curl/7.35.0
> Host: cnbj0.fds.api.xiaomi.com
> Accept: */*
> authorization: Galaxy-V2 54xxxxxx45:NgxxxxxxxxxDWI=
> Date: Mon, 20 Feb 2017 03:21:04 GMT
>
< HTTP/1.1 200 OK
* Server Tengine is not blacklisted
< Server: Tengine
< Date: Mon, 20 Feb 2017 03:24:12 GMT
< Content-Type: application/json
< Content-Length: 1609
< Connection: keep-alive
< Access-Control-Allow-Credentials: true
< Access-Control-Max-Age: 1728000
< Access-Control-Allow-Methods: GET, POST, PUT, HEAD, DELETE, OPTIONS
< Access-Control-Allow-Headers: DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Content-MD5
< Access-Control-Expose-Headers: content-md5, upload-time, x-xiaomi-meta-content-length
<
{"buckets":[{"creationTime":0,"name":"fds-demo","numObjects":0,"orgId":"180835","usedSpace":0}],"owner":{"id":"180835"}}
# 2. list all the authorized Buckets,the output format is as above
curl -v -XGET\
-H 'authorization: Galaxy-V2 54xxxxxx45:Fgxxxxxxxxxx=' \
-H 'Date: Mon, 20 Feb 2017 03:21:04 GMT' \
'https://cnbj0.fds.api.xiaomi.com?authorizedBuckets'