All Products
Search
Document Center

Intelligent Media Services:GetSnapshotJob

Last Updated:Dec 16, 2024

Queries the information about a snapshot job.

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
ice:GetSnapshotJob
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
JobIdstringYes

The ID of the snapshot job.

****d80e4e4044975745c14b****

Response parameters

ParameterTypeDescriptionExample
object

PlainResponse

RequestIdstring

The request ID.

******11-DB8D-4A9A-875B-275798******
SnapshotJobobject

The information about the snapshot job.

JobIdstring

The job ID.

****d80e4e4044975745c14b****
TriggerSourcestring

The request trigger source.

Valid values:

  • Console
  • Workflow
  • API
API
Namestring

The name of the job.

Typestring

Snapshot types

Valid values:

  • WebVtt
  • Sprite
  • Normal
Sprite
Inputobject

The input of the job.

Typestring

The type of the input file. Valid values:

  1. OSS: an Object Storage Service (OSS) object.
  2. Media: a media asset.
OSS
Mediastring

The input file. If Type is set to OSS, the URL of an OSS object is returned. If Type is set to Media, the ID of a media asset is returned. The URL of an OSS object can be in one of the following formats:

  1. oss://bucket/object
  2. http(s)://bucket.oss-[RegionId].aliyuncs.com/object In the URL, bucket specifies an OSS bucket that resides in the same region as the job, and object specifies the object URL in OSS.
oss://test-bucket/object.mp4
OssFileobject

The three key elements of OSS.

Bucketstring

The OSS bucket.

test-bucket
Locationstring

The OSS location.

oss-cn-shanghai
Objectstring

The OSS object.

object.mp4
Outputobject

The output of the job.

Typestring

The type of the output file. Valid values:

  1. OSS: an OSS object.
  2. Media: a media asset.
OSS
Mediastring

The output file. If Type is set to OSS, the URL of an OSS object is returned. If Type is set to Media, the ID of a media asset is returned. The URL of an OSS object can be in one of the following formats:

  1. oss://bucket/object
  2. http(s)://bucket.oss-[RegionId].aliyuncs.com/object

In the URL, bucket specifies an OSS bucket that resides in the same region as the job, and object specifies the object URL in OSS. If multiple static snapshots were captured, the object must contain the "{Count}" placeholder. In the case of a sprite, the object must contain the "{TileCount}" placeholder. The suffix of the WebVTT snapshot objects must be ".vtt".

http://test-bucket.oss-cn-shanghai.aliyuncs.com/output-{Count}.jpg
OssFileobject

The three key elements of OSS.

Bucketstring

The OSS bucket.

test-bucket
Locationstring

The OSS location.

oss-cn-shanghai
Objectstring

The OSS object.

output-{Count}.jpg
Countinteger

The number of snapshots.

8
Asyncboolean

Indicates whether the snapshots were captured in asynchronous mode. Default value: true.

true
TemplateIdstring

The template ID.

****d80e4e4044975745c14b****
TemplateConfigstring

The snapshot template configuration.

{"Type":"Normal","FrameType":"normal","Time":0,"Count":10}
PipelineIdstring

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

****d80e4e4044975745c14b****
Statusstring

The state of the job.

Valid values:

  • Init: The job is submitted.
  • Success: The job is successful.
  • Fail: The job failed.
Success
Codestring

Error codes

ResourceNotFound
Messagestring

The error message that is returned.

The specified resource for "Pipeline" could not be found.
SubmitTimestring

The time when the job was submitted.

2022-07-12T16:17:54Z
FinishTimestring

The time when the job was complete.

2022-07-12T16:30:54Z
UserDatastring

The user-defined parameters.

{"test parameter": "test value"}
CreateTimestring

The time when the job was created.

2022-07-12T16:17:54Z
ModifiedTimestring

The time when the job was last modified.

2022-07-12T16:30:54Z

Examples

Sample success responses

JSONformat

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "SnapshotJob": {
    "JobId": "****d80e4e4044975745c14b****",
    "TriggerSource": "API",
    "Name": "",
    "Type": "Sprite",
    "Input": {
      "Type": "OSS",
      "Media": "oss://test-bucket/object.mp4",
      "OssFile": {
        "Bucket": "test-bucket",
        "Location": "oss-cn-shanghai",
        "Object": "object.mp4"
      }
    },
    "Output": {
      "Type": "OSS",
      "Media": "http://test-bucket.oss-cn-shanghai.aliyuncs.com/output-{Count}.jpg",
      "OssFile": {
        "Bucket": "test-bucket",
        "Location": "oss-cn-shanghai",
        "Object": "output-{Count}.jpg"
      }
    },
    "Count": 8,
    "Async": true,
    "TemplateId": "****d80e4e4044975745c14b****",
    "TemplateConfig": "{\"Type\":\"Normal\",\"FrameType\":\"normal\",\"Time\":0,\"Count\":10}",
    "PipelineId": "****d80e4e4044975745c14b****",
    "Status": "Success",
    "Code": "ResourceNotFound",
    "Message": "The specified resource for \"Pipeline\" could not be found.",
    "SubmitTime": "2022-07-12T16:17:54Z",
    "FinishTime": "2022-07-12T16:30:54Z",
    "UserData": "{\"test parameter\": \"test value\"}",
    "CreateTime": "2022-07-12T16:17:54Z",
    "ModifiedTime": "2022-07-12T16:30:54Z"
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-07-15Add OperationView Change Details
2022-07-11Add OperationView Change Details