开发者社区> 问答> 正文

云相册的API PhotoStore接口ListPhotoStores怎么使用



描述


获取已创建的PhotoStore的列表

请求参数

参数名类型是否必须说明
ActionStringListPhotoStores


请求示例https://cloudphoto.cn-shanghai.aliyuncs.com/?Action=ListPhotoStores
&<公共请求参数>





返回参数

参数名类型说明
RequestIdString唯一标识本次请求的ID
CodeString响应状态码,Success表示成功的响应
MessageString响应状态详细描述
ActionStringListPhotoStores
PhotoStoresPhotoStore[]PhotoStore数组


PhotoStores

参数名类型说明
BucketsBucket[]Bucket数组
CtimeString创建的时间戳,单位:毫秒
DefaultQuotaIntegerPhotoStore默认每个用户可使用的存储空间,单位为GB
IdStringPhotoStore的Id
MtimeString最后修改的时间戳,单位:毫秒
NameStringPhotoStore的名称
RemarkString备注


Buckets

参数名类型说明
NameStringOSS Bucket的名称
RegionStringOSS Bucket所在的地域
StateString保留字段:OSS Bucket的状态, 目前总是返回active,表示启用


返回示例


JSON格式 {
    "Action":"ListPhotoStores",
    "Message":"success",
    "RequestId":"EF2C0958-E3D3-470B-A138-2DEAFEAE1CBE",
    "Code":"Success",
    "PhotoStores":[
        {
            "Name":"cloudphoto-demo",
            "Mtime":1499930072000,
            "Id":822227915239337984,
            "Ctime":1499930072000,
            "Buckets":[
                {
                    "Name":"cloudphoto-demo",
                    "Region":"cn-shanghai",
                    "State":"active"
                }
            ],
            "Remark":"this photostore is for demo purpose only.",
            "DefaultQuota":0
        },
        {
            "Name":"fannong-0707",
            "Mtime":1499406806000,
            "Id":820033178730246144,
            "Ctime":1499406806000,
            "Buckets":[
                {
                    "Name":"django-storage-sh",
                    "Region":"cn-shanghai",
                    "State":"active"
                }
            ],
            "Remark":"这个PhotoStore是从django-storage这个账号里面建立的。",
            "DefaultQuota":0
        }
    ]
}


XML格式 <?xml version="1.0" encoding="UTF-8"?>
<ListPhotoStoresResponse>
  <Action>ListPhotoStores</Action>
  <Message>success</Message>
  <RequestId>E71E2764-3B22-4055-BB9A-BE71A547BA52</RequestId>
  <PhotoStores>
    <PhotoStore>
      <Name>cloudphoto-demo</Name>
      <Mtime>1499930072000</Mtime>
      <Ctime>1499930072000</Ctime>
      <Id>822227915239337984</Id>
      <Buckets>
        <Bucket>
          <Name>cloudphoto-demo</Name>
          <Region>cn-shanghai</Region>
          <State>active</State>
        </Bucket>
      </Buckets>
      <Remark>this photostore is for demo purpose only.</Remark>
      <DefaultQuota>0</DefaultQuota>
    </PhotoStore>
    <PhotoStore>
      <Name>fannong-0707</Name>
      <Mtime>1499406806000</Mtime>
      <Ctime>1499406806000</Ctime>
      <Id>820033178730246144</Id>
      <Buckets>
        <Bucket>
          <Name>django-storage-sh</Name>
          <Region>cn-shanghai</Region>
          <State>active</State>
        </Bucket>
      </Buckets>
      <Remark><![CDATA[这个PhotoStore是从django-storage这个账号里面建立的。]]></Remark>
      <DefaultQuota>0</DefaultQuota>
    </PhotoStore>
  </PhotoStores>
  <Code>Success</Code>
</ListPhotoStoresResponse>

展开
收起
云栖大讲堂 2017-10-27 11:23:09 1826 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
Spring Boot2.0实战Redis分布式缓存 立即下载
CUDA MATH API 立即下载
API PLAYBOOK 立即下载