All Products
Search
Document Center

ApsaraVideo Media Processing:QuerySnapshotJobList

Last Updated:Dec 26, 2024

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.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
mts:QuerySnapshotJobListlist
*All Resources
*
    none
none

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.

SnapshotJobListarray<object>

The distance between images.

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

The background color.

  • Default value: black.
  • You can set the Color parameter to a color keyword or random in the request.
Note If you want to set the background color to black, you can specify the color keyword in one of the following three formats: Black, black, and #000000.
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.

Stringstring

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
2024-04-24The response structure of the API has changedView Change Details
2024-04-10The internal configuration of the API is changed, but the call is not affectedView Change Details