All Products
Search
Document Center

ListSnapshots

Last Updated: Mar 04, 2019

Description

You can call this operation to query the snapshot data of a specified media.

Note: If a video has been snapshot multiple times, the data of the latest successful snapshot is returned.

Request parameters

NameTypeRequiredDescription
ActionStringYesThe operation that you want to perform. Set the value to ListSnapshots.
VideoIdStringYesThe video ID.
SnapshotTypeStringNoThe returned snapshot type. Default value: CoverSnapshot.
Valid values:
  • CoverSnapshot: indicates thumbnail snapshots.
  • NormalSnapshot: indicates normal snapshots initiated through the SubmitSnapshotJob operation.
  • SpriteSnapshot: indicates sprite snapshots initiated through the SubmitSnapshotJob operation.
  • SpriteOriginSnapshot: indicates the original snapshots that compose a sprite snapshot.
AuthTimeout StringNoThe expiration time of the snapshot address. Unit: seconds. Default value: 3600. Minimum value: 3600. If the specified value is smaller than 3600, the default value is used. This parameter is valid only when URL signing is enabled.
PageNo LongNoThe page number. Default value: 1.
PageSize LongNoThe number of data records per page. Default value: 20. Maximum value: 100.

Response parameters

NameTypeDescription
RequestIdStringThe GUID generated by Alibaba Cloud for the request.
MediaSnapshotMediaSnapshotThe snapshot data of the media.

Examples

Sample requests

  1. https://vod.cn-shanghai.aliyuncs.com?Action=ListSnapshots&Video=d3e680e618708fef7cefbf2cae7cc931&SnapshotType=NormalSnapshot&pageNo=1&pageSize=20

Sample responses

JSON format

  1. {
  2. "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  3. "MediaSnapshot":{
  4. "Total": 100,
  5. "Regular": "http://image.com/snapshot/sample{SnapshotCount}.jpg",
  6. "CreationTime":"2017-12-20T12:23:45Z",
  7. "JobId": "ad90a501b1b94ba6afb72374ad005046",
  8. "Snapshots":[
  9. {
  10. "Index": 1,
  11. "Url":"http://image.com/snapshot/sample00001.jpg"
  12. }
  13. ]
  14. }
  15. }
  16. }

Error codes

Error codeError messageHTTP status codeDescription
InvalidVideo.NotFoundThe video does not exist.404The error message returned when the specified video does not exist.
NoSuchResourceThe specified resource %s does not exist.404The error message returned when the specified resource does not exist.
Forbidden.IllegalStatusStatus of the video is illegal.400The error message returned when the video status is invalid. You can only query the snapshot data of videos in the UploadSucc, Normal, Checking, or Blocked status.