All Products
Search
Document Center

ApsaraVideo Media Processing:QuerySnapshotJobList

Last Updated:Jul 17, 2023

Queries snapshot jobs.

Operation Description

The status of the snapshot jobs that you want to query.

  • Submitted: The job was submitted.
  • Snapshoting: The job is being processed.
  • Success: The job was successfully processed.
  • Fail: The job failed.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
SnapshotJobIdsstringNo

The beginning of the time range within which the creation time of snapshot jobs to be queried is.

  • Specify the time in the ISO 8601 standard in the
  • YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.
72dfa5e679ab4be9a3ed9974c736****
NextPageTokenstringNo

The end of the time range within which the creation time of snapshot jobs to be queried is.

  • Specify the time in the ISO 8601 standard in the
  • YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.
cc6cbef8e8d5481ca536f5d2a466****
MaximumPageSizelongNo

The ID of the MPS queue to which the snapshot jobs that you want to query are submitted. To obtain the ID, you can log on to the MPS console and choose Global Settings > Pipelines in the left-side navigation pane.

30
StatestringNo

The information about the snapshot jobs.

Snapshoting
StartOfJobCreatedTimeRangestringNo

The time when the job was created.

2014-01-10T12:00:00Z
EndOfJobCreatedTimeRangestringNo

The snapshot configuration.

2014-01-12T12:00:00Z
PipelineIdstringNo

The start time for taking snapshots. Unit: milliseconds.

b11c171cced04565b1f38f1ecc39****

Response parameters

ParameterTypeDescriptionExample
object

The tiling configuration.

SnapshotJobListobject []

The distance between images.

  • Default value: 0.
  • Unit: pixel.
CreationTimestring

The stride of a single image.

2021-06-30T12:34:29Z
SnapshotConfigobject

The height of a single image. The default value is the height of the output snapshot.

Timestring

The width of a single image. The default value is the width of the output snapshot.

4
TileOutobject

The margin width of the tiled image.

  • Default value: 0.
  • Unit: pixel.
Paddingstring

The number of columns that the tiled image can contain. Default value: 10.

0
Colorstring

Indicates whether the single images are retained. Default value: true.

black
CellSelStepstring

The number of rows that the tiled image can contain. Default value: 10.

3
CellHeightstring

The interval for taking snapshots.

  • If this Interval parameter is specified in the request, snapshots are taken at intervals. The value must be greater than 0.
  • Unit: seconds.
  • Default value: 10.
8
CellWidthstring

The type of the snapshot. Valid values:

  • normal: normal frames.
  • intra: I-frames.
  • Default value: intra.
8
Marginstring

The width of the output snapshot.

0
Columnsstring

The height of the output snapshot.

10
IsKeepCellPicstring

The Object Storage Service (OSS) output file of the snapshot job.

false
Linesstring

The Alibaba Cloud Resource Name (ARN) of the specified RAM role. Format: acs:ram::$accountID:role/$roleName.

10
Intervalstring

The OSS object that is generated as the output file of the snapshot job.

10
FrameTypestring

The ID of the region in which the output OSS bucket is located.

intra
Widthstring

The OSS bucket that stores the output file.

8
Heightstring

The number of snapshots to take. If the Num parameter is set in the request, snapshots are taken at intervals.

8
OutputFileobject

The OSS output file of the tiling job.

RoleArnstring

The ARN of the specified RAM role. Format: acs:ram::$accountID:role/$roleName.

acs:ram::1:role/testrole
Objectstring

The OSS object that is generated as the output file of the tiling job.

example.png
Locationstring

The ID of the region in which the output OSS bucket is located.

example-location
Bucketstring

The OSS bucket that stores the output file.

example
Numstring

The status of the snapshot job.

  • Submitted: The job was submitted.
  • Snapshoting: The job is being processed.
  • Success: The job was successfully processed.
  • Fail: The job failed.
10
TileOutputFileobject

The error message returned when the job fails. This parameter is not returned if the job is successfully processed.

RoleArnstring

The message sent by MNS to notify the user of the job result.

acs:ram::1:role/testrole
Objectstring

The ID of the message. This parameter is not returned if the job fails.

example.png
Locationstring

The error message returned when the job fails. This parameter is not returned if the job is successfully processed.

example-location
Bucketstring

The error code returned when the job fails. This parameter is not returned if the job is successfully processed.

example
Statestring

The information about the job input.

Snapshoting
Messagestring

The ARN of the specified RAM role. Format: acs:ram::$accountID:role/$roleName.

The resource operated InputFile is bad
MNSMessageResultobject

The OSS object that is used as the input file.

MessageIdstring

The ID of the region in which the input OSS bucket is located.

799454621135656C7F815F198A76****
ErrorMessagestring

The OSS bucket that stores the input file.

The resource operated InputFile is bad
ErrorCodestring

The number of snapshots that were taken.

InvalidParameter
Inputobject

The number of snapshots that are contained in the tiled image.

RoleArnstring

The custom data.

acs:ram::1:role/testrole
Objectstring

The error code returned when the job fails. This parameter is not returned if the job is successfully processed.

example.flv
Locationstring

The ID of the MPS queue to which the snapshot job was submitted.

example-location
Bucketstring

The ID of the snapshot job.

example
Countstring

The ID of the request.

1
TileCountstring

The snapshot job IDs that do not exist. This parameter is not returned if all specified snapshot jobs are found.

7
UserDatastring

The token that is used to retrieve the next page of the query results. The value is a 32-bit UUID. If the returned query results cannot be displayed within one page, this parameter is returned. The value of this parameter is updated for each query.

testid-001
Codestring

You can call this operation to query up to 10 snapshot jobs at a time.

Limits on QPS

You can call this operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

InvalidParameter
PipelineIdstring

The start time for taking snapshots. Unit: milliseconds.

b11c171cced04565b1f38f1ecc39****
Idstring

The OSS output file of the tiling job.

cc6cbef8e8d5481ca536f5d2a466****
RequestIdstring

The ID of the snapshot job.

34BCAB31-2833-43A7-9FBD-B34302AB23EQ
NonExistSnapshotJobIdsarray

The OSS object that is generated as the output file of the tiling job.

string

The interval for taking snapshots.

  • If this Interval parameter is specified in the request, snapshots are taken at intervals. The value must be greater than 0.
  • Unit: seconds.
  • Default value: 10.
c6d973c33d1c4b21bc39907d3b29****
NextPageTokenstring

The OSS object that is used as the input file.

b11c171cced04565b1f38f1ecc39****

Examples

Sample success responses

JSONformat

{
  "SnapshotJobList": {
    "SnapshotJob": [
      {
        "CreationTime": "2021-06-30T12:34:29Z",
        "SnapshotConfig": {
          "Time": "4",
          "TileOut": {
            "Padding": "0",
            "Color": "black",
            "CellSelStep": "3",
            "CellHeight": "8",
            "CellWidth": "8",
            "Margin": "0",
            "Columns": "10",
            "IsKeepCellPic": "false",
            "Lines": "10"
          },
          "Interval": "10",
          "FrameType": "intra",
          "Width": "8",
          "Height": "8",
          "OutputFile": {
            "RoleArn": "acs:ram::1:role/testrole",
            "Object": "example.png",
            "Location": "example-location",
            "Bucket": "example"
          },
          "Num": "10",
          "TileOutputFile": {
            "RoleArn": "acs:ram::1:role/testrole",
            "Object": "example.png",
            "Location": "example-location",
            "Bucket": "example"
          }
        },
        "State": "Snapshoting",
        "Message": "The resource operated InputFile is bad",
        "MNSMessageResult": {
          "MessageId": "799454621135656C7F815F198A76****",
          "ErrorMessage": "The resource operated InputFile is bad",
          "ErrorCode": "InvalidParameter"
        },
        "Input": {
          "RoleArn": "acs:ram::1:role/testrole",
          "Object": "example.flv",
          "Location": "example-location",
          "Bucket": "example"
        },
        "Count": "1",
        "TileCount": "7",
        "UserData": "testid-001",
        "Code": "InvalidParameter",
        "PipelineId": "b11c171cced04565b1f38f1ecc39****",
        "Id": "cc6cbef8e8d5481ca536f5d2a466****"
      }
    ]
  },
  "RequestId": "34BCAB31-2833-43A7-9FBD-B34302AB23EQ",
  "NonExistSnapshotJobIds": {
    "String": [
      "c6d973c33d1c4b21bc39907d3b29****"
    ]
  },
  "NextPageToken": "b11c171cced04565b1f38f1ecc39****"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history