全部产品
存储与CDN 数据库 安全 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 阿里云办公 培训与认证 物联网

GetThumbnail

更新时间:2017-09-20 17:52:14

描述

获取照片的缩略图地址,地址的有效期为1小时。

请求参数

参数名 类型 是否必须 说明
Action String GetThumbnail
PhotoId Long 照片的唯一标识
StoreName String PhotoStore的名称
ZoomType String OSS的新版缩略图格式,比如image/resize,h_100将图片缩略成高度为100,宽度按比例处理。更多缩放格式请参考OSS的新版缩放格式
LibraryId String 照片库标识。采用AK认证时必选,采用STS认证时可选。了解不同认证方式的区别。

请求示例

  1. https://cloudphoto.cn-shanghai.aliyuncs.com/?Action=GetThumbnail
  2. &PhotoId=822879673959591936
  3. &StoreName=cloudphoto-demo
  4. &ZoomType=image/resize,h_100
  5. &LibraryId=alice-001
  6. &<公共请求参数>

返回参数

参数名 类型 说明
RequestId String 唯一标识本次请求的ID
Code String 响应状态码,Success表示成功的响应
Message String 响应状态详细描述
Action String GetThumbnail
ThumbnailUrl String 图片缩略图的下载地址

返回示例

JSON格式

  1. {
  2. "Action":"GetThumbnail",
  3. "Message":"success",
  4. "RequestId":"95F81B72-12C7-4AC4-89B7-2FB9F2696DD7",
  5. "Code":"Success",
  6. "ThumbnailUrl":"http://cloudphoto-demo.img-cn-shanghai.aliyuncs.com/stores/cloudphoto-demo/data/ZUBaS964T3OYtqaal9MaZwAAAApwZDIE%40300w_300h_2o?Expires=1500091060&OSSAccessKeyId=STS.FoGkyomEnL5oiHy1aJ3jpusyU&Signature=VNlRDk4McBHevu5QeZ7US2sKHD0%3D&security-token=CAISkAJ1q6Ft5B2yfSjIp6zyIMPbgJpP%2B%2FeEa27I1WEfP%2BVcmrbStzz2IH9PdXRuCe4esv00mmlW7PYelr94T5hYSVTEatd3q5pW9Q66bpDfuse4tTjOFj0ZWjr9MQXy%2BeOPScebJYqvV5XAQlTAkTAJstmeXD6%2BXlujHISUgJp8FLo%2BVRW5ajw0b7U%2FZHEVyqkgOGDWKOymPzPzn2PUFzAIgAdnjn5l4qnNqa%2F1qDim1QekkL5F%2F9%2Brf8b9M5YwYa0SCYnlgLZEEYPayzNV5hRw86N7sbdJ4z%2BvvKvGXAIAvkvWbbKIq4YxdVEjNvQgaKdArenhk%2FZ8vfHfj4Tw1xFBMO9cTiDDXoekzdsTol0B%2F26DHxqAARn%2Fi1CNr7skp0WWXB9gdt1zE4fgxQGK7sRoSBQFs5vRffWu6WKUGdipTB24%2F3x%2B05FjIUJqBajZBUY6r0HvcChWlzoS%2FelZG0ANkCrnkjRAK7aKc6eW44dOmV8WaLiuW%2F%2FOTSo%2BCyAdfyeq%2B5jRV8hipnBpuy8%2FR5B9fAYl%2FPwr"
  7. }

XML格式

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <GetThumbnailResponse>
  3. <Action>GetThumbnail</Action>
  4. <Message>success</Message>
  5. <RequestId>9D552BFC-2582-4899-84A2-E74C1BF4AF75</RequestId>
  6. <ThumbnailUrl><![CDATA[http://cloudphoto-demo.img-cn-shanghai.aliyuncs.com/stores/cloudphoto-demo/data/ZUBaS964T3OYtqaal9MaZwAAAApwZDIE%40300w_300h_2o?Expires=1500091061&OSSAccessKeyId=STS.GiB8eHBKg6vW2weopJQQHwjNj&Signature=o7eUTDT3jMEBohv9c8EMvSQrThw%3D&security-token=CAISkAJ1q6Ft5B2yfSjIpqr3c9%2F8r5RGgbS8MFHUi3AfXd5kmK%2FliDz2IH9PdXRuCe4esv00mmlW7PYelr94T5hYSVTEatd3q5pW9Q66bpDfuse4tXHKFj0ZWjr9MQXy%2BeOPScebJYqvV5XAQlTAkTAJstmeXD6%2BXlujHISUgJp8FLo%2BVRW5ajw0b7U%2FZHEVyqkgOGDWKOymPzPzn2PUFzAIgAdnjn5l4qnNqa%2F1qDim1QekkL5F%2F9%2Brf8b9M5YwYa0SCYnlgLZEEYPayzNV5hRw86N7sbdJ4z%2BvvKvGXAIAvkvWbbKIq4YxdVEjNvQgaKdArenhk%2FZ8vfHfj4Tw1xFBMO9cTiDDXoekzdsTol0B%2F26DHxqAASMZ%2BwKcaBwU0gS%2B%2FYPaecXKYsoSFTyMhTM0v43YXXOZf18vRokrybrxe5HsDhamGv4KVKfvQ%2FEDeGCSX%2BP%2BSUiWMrOThZgPxZtfNcBMsOffg8FEfEZ9sJtZN%2FE5ssN3HUjVLqRMCcauKiGNpmfiMGQQ1hn3xq%2FhNUfrz0o15RHX]]></ThumbnailUrl>
  7. <Code>Success</Code>
  8. </GetThumbnailResponse>
本文导读目录