全部产品
云市场

GetPrivateAccessUrls

更新时间:2017-10-27 14:04:52

描述

批量获取照片的私有访问地址

在服务可用的情况下,该接口总是返回Success,需要根据返回结果里面的Result来判断具体单张照片的处理结果。

支持的SDK版本:1.1.5+

请求参数

参数名 类型 是否必须 说明
Action String GetPrivateAccessUrls
PhotoId.1 Long 照片的唯一标识,如果有多张照片,请按照规则增加一个参数,比如2张照片,另外一个参数为PhotoId.2
StoreName String PhotoStore的名称
ZoomType String 缩放格式。支持OSS的新版缩放格式,OSS的自定义图片样式(以style开头)和original。original表示获取照片原始文件下载地址。
LibraryId String 照片库标识。采用AK认证时必选,采用STS认证时可选。了解不同认证方式的区别。

请求示例

  1. https://cloudphoto.cn-shanghai.aliyuncs.com/?Action=GetPrivateAccessUrls
  2. &PhotoId.1=859482148925661184
  3. &StoreName=cloudphoto-regression-store
  4. &ZoomType=style/medium
  5. &<公共请求参数>

返回参数

参数名 类型 说明
RequestId String 唯一标识本次请求的ID
Code String 响应状态码,Success表示成功的响应
Message String 响应状态详细描述
Action String GetPrivateAccessUrls
Results 数组 详见结果信息

Results

参数名 类型 说明
AccessUrl String 照片的访问地址
Code String 状态码,Success表示成功
Message String 详细信息
PhotoId Long 照片的唯一ID

返回示例

JSON格式

  1. {
  2. "Action":"GetPrivateAccessUrls",
  3. "Message":"success",
  4. "RequestId":"E4EEEDEB-E1C9-462A-898A-D3E01CBE4C3D",
  5. "Results":[
  6. {
  7. "Message":"success",
  8. "AccessUrl":"https://cps-pd-test.oss-cn-shanghai.aliyuncs.com/stores/cloudphoto-regression-store/data/YT6KGq4FQBahx9FkcYdXzgAAAC5wZDIE?Expires=1508832456&OSSAccessKeyId=STS.CWWHjf9g1WUzXyJKQLtCHEZmw&Signature=Un1TNfEAwT5A6AuVhBN6c%2FyriJs%3D&x-oss-process=style%2Fmedium&security-token=CAISkAJ1q6Ft5B2yfSjIopTiA9DS1LgQ4JeRWl%2F7r1EZeMxkqp%2FGlTz2IHxFe3NoAOEZs%2F4znWlV6foflr94T5hYSVTEatd3q5pW9Q66bpDfuse4tSOGFRk5Wjr9MQXy%2BeOPScebJYqvV5XAQlTAkTAJstmeXD6%2BXlujHISUgJp8FLo%2BVRW5ajw0b7U%2FZHEVyqkgOGDWKOymPzPzn2PUFzAIgAdnjn5l4qnNqa%2F1qDim1Q2gkLBE%2F9uvecn%2BMJMzYK0SCYnlgLZEEYPayzNV5hRw86N7sbdJ4z%2BvvKvGXwgOuU3fYrWJqIE2dVImOvUgaKdArenhk%2FZ8vfHfj4Tw1xFBMO9cTiDDXoekzdsTol0B%2F26DHxqAAZDFO4ySe9tXV9xvaZ0k%2FnTr4ZZsgCSdIFJCLlpXA4tTJ%2FvOd1mIed5ddGU1aADgv2ZX0ICdKxpGscFnh29Kp72RHdhUe3mPNirX%2Fu0Ks6pcsKBvxKxM5Bd64tByPyHT%2F%2B2aeP3aO7dNLlpTump5PlywzrwLeCQLix0A5zw5nAXE",
  9. "PhotoId":859482148925661184,
  10. "Code":"Success"
  11. }
  12. ],
  13. "Code":"Success"
  14. }

XML格式

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <GetPrivateAccessUrlsResponse>
  3. <Action>GetPrivateAccessUrls</Action>
  4. <Message>success</Message>
  5. <RequestId>1569FC21-1C98-4479-9722-0C34C127F965</RequestId>
  6. <Results>
  7. <Result>
  8. <Message>success</Message>
  9. <AccessUrl><![CDATA[https://cps-pd-test.oss-cn-shanghai.aliyuncs.com/stores/cloudphoto-regression-store/data/YT6KGq4FQBahx9FkcYdXzgAAAC5wZDIE?Expires=1508832458&OSSAccessKeyId=STS.CWWHjf9g1WUzXyJKQLtCHEZmw&Signature=9TNoPcUbFnftOa14AH5MJCV6UNQ%3D&x-oss-process=style%2Fmedium&security-token=CAISkAJ1q6Ft5B2yfSjIopTiA9DS1LgQ4JeRWl%2F7r1EZeMxkqp%2FGlTz2IHxFe3NoAOEZs%2F4znWlV6foflr94T5hYSVTEatd3q5pW9Q66bpDfuse4tSOGFRk5Wjr9MQXy%2BeOPScebJYqvV5XAQlTAkTAJstmeXD6%2BXlujHISUgJp8FLo%2BVRW5ajw0b7U%2FZHEVyqkgOGDWKOymPzPzn2PUFzAIgAdnjn5l4qnNqa%2F1qDim1Q2gkLBE%2F9uvecn%2BMJMzYK0SCYnlgLZEEYPayzNV5hRw86N7sbdJ4z%2BvvKvGXwgOuU3fYrWJqIE2dVImOvUgaKdArenhk%2FZ8vfHfj4Tw1xFBMO9cTiDDXoekzdsTol0B%2F26DHxqAAZDFO4ySe9tXV9xvaZ0k%2FnTr4ZZsgCSdIFJCLlpXA4tTJ%2FvOd1mIed5ddGU1aADgv2ZX0ICdKxpGscFnh29Kp72RHdhUe3mPNirX%2Fu0Ks6pcsKBvxKxM5Bd64tByPyHT%2F%2B2aeP3aO7dNLlpTump5PlywzrwLeCQLix0A5zw5nAXE]]></AccessUrl>
  10. <PhotoId>859482148925661184</PhotoId>
  11. <Code>Success</Code>
  12. </Result>
  13. </Results>
  14. <Code>Success</Code>
  15. </GetPrivateAccessUrlsResponse>