FDS Restful API

ListBuckets related api supported by FDS

Version: 1.0.0

/

GET

Summary:

获取创建的Bucket列表

Description:
Parameters
Name Located in Description Required Schema
authorization header 认证信息,计算方式参考签名认证相关文档 Yes string
Date header 请求时间 Yes string
authorizedBuckets query 如果包含这个请求参数,返回的bucket列表里包含所有被授权的bucket No string
Responses
Code Description Schema
200 bucket列表 ListAllBucketsResult

Models

ListAllBucketsResult

Name Type Description Required
owner OwnerBean No
buckets [ BucketBean ] No

OwnerBean

拥有者信息

Name Type Description Required
id string 拥有者ID No
displayName string 拥有者名字 No

BucketBean

bucket信息

Name Type Description Required
name string bucket名字 No
orgId string 拥有者ID No

命令行示例

# 1. 列出所有自己创建的Bucket
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. 列出所有被授权的Bucket,输出格式同上
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'

results matching ""

    No results matching ""