GetJobDetail

更新时间:
复制 MD 格式

Call this API to retrieve the details of an asynchronous task by its jobId.

Operation description

Usage notes

This API retrieves data about asynchronous tasks created within the last 6 months. Supported task types include transcoding tasks, screenshot tasks, AI tasks, and workflow tasks.

QPS limit

The single user QPS limit for this API is 15 calls per second. Exceeding this limit throttles subsequent API calls, which may impact your business. Please call the API at a reasonable rate. For more information, see QPS limit.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vod:GetJobDetail

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

JobId

string

Yes

The job ID. To query a transcode task by its task ID, see GetTranscodeTask.

5c9dff***************59d50a967f5

JobType

string

Yes

The job type. Valid values are:

  • transcode

  • snapshot

  • ai

  • workflow

transcode

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

6708D849-F109-1A6C-AC91-************

JobType

string

The job type.

transcode

TranscodeJobDetail

object

Details of the transcode job. This parameter is returned only if JobType is transcode.

JobId

string

The job ID.

2dc1634e**********3f1d22d1a0174e

UserId

integer

The ID of the user who initiated the job.

139109*****84930

VideoId

string

The media asset ID.

30e5d7**********bd900764de7c0102

Status

string

The job status. Valid values:

  • Submitted: The job has been submitted.

  • Transcoding: The job is in progress.

  • TranscodeSuccess: The job completed successfully.

  • TranscodeFail: The job failed.

  • TranscodeCancelled: The job has been canceled.

TranscodeSuccess

TemplateId

string

The template ID.

dbfaaec9e**********bf0b81219244c

Definition

string

The definition.

HD

CreateTime

string

The time when the job was created, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2024-10-14T07:39:25Z

CompleteTime

string

The time when the job was completed, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2024-10-14T07:39:34Z

SnapshotJobDetail

object

Details of the snapshot job. This parameter is returned only if JobType is snapshot.

JobId

string

The job ID.

63df12s0**********4hdq249t82kr91

UserId

integer

The ID of the user who initiated the job.

139109*****84930

VideoId

string

The media asset ID.

30e5d7**********bd900764de7c0102

Status

string

The job status. Valid values:

  • Processing: The job is in progress.

  • Fail: The job failed.

  • Success: The job completed successfully.

Success

Trigger

string

The trigger. Valid values:

  • Auto: The job was automatically triggered by a workflow.

  • Manual: The job was submitted manually.

Auto

NormalConfig

string

The configuration for regular snapshots.

{"inl":0,"num":32,"tm":5,"wd":"352","ft":"normal","hg":"640"}

SpriteConfig

string

The configuration for sprites.

{"pad":"0","lines":"10","mgin":"0","cols":"10","ikcp":"false","hg":"68"}

CreateTime

string

The time when the job was created, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2024-10-14T07:39:25Z

CompleteTime

string

The time when the job was completed, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2024-10-14T07:39:45Z

AIJobDetail

object

Details of the AI job. This parameter is returned only if JobType is ai.

JobId

string

The job ID.

5c9dff751ba**********59d50a967f5

UserId

integer

The ID of the user who initiated the job.

139109*****84930

MediaId

string

The media asset ID.

30e5d7**********bd900764de7c0102

JobType

string

The type of the AI job.

AIVideoCensor

Status

string

The job status. Valid values:

  • reserved: The job has been submitted.

  • init: The job has started.

  • success: The job completed successfully.

  • fail: The job failed.

  • processing: The job is in progress.

  • analyzing: The job is being analyzed.

success

Trigger

string

The trigger. Valid values:

  • Auto: The job was automatically triggered by a workflow.

  • Manual: The job was submitted manually.

Auto

TemplateConfig

string

The template configuration.

{"AuditRange":["video","image-cover","text-title"],"AuditContent":["screen"],"AuditItem":["terrorism","porn"],"AuditAutoBlock":"no"}

CreateTime

string

The time when the job was created, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2024-10-14T07:39:25Z

CompleteTime

string

The time when the job was completed, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2024-10-14T07:39:46Z

WorkflowTaskDetail

object

Details of the workflow task. This parameter is returned only if JobType is workflow.

TaskId

string

The task ID.

46ecc024******92c8e26237e51

Status

string

The task status. Valid values:

  • Init: The task has started.

  • Processing: The task is in progress.

  • Succeed: The task succeeded.

  • Failed: The task failed.

  • Canceled: The task was canceled.

  • Skip: The task was skipped.

Succeed

TaskInput

string

The media asset information.

{\"Type\":\"Media\",\"Media\":\"00f985a50ae371f0ad1c4106e0ea0102\",\"Title\":\"2.mp4\",\"StorageLocation\":\"yiming-pre.oss-cn-shanghai.aliyuncs.com\"}

CreateTime

string

The time when the task was created, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2025-03-27T08:15:46Z

FinishTime

string

The time when the task finished, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2025-03-27T08:20:19Z

ActivityResults

string

The processing results of each node in the workflow, in JSON format.

{\"VodSnapshot_123\":{\"ActivityId\":\"VodSnapshot\",\"ActivityInstanceId\":\"c8cf62d53bef4e04bf703976bae6d0b9\",\"EndTime\":\"2025-03-27T08:15:51Z\",\"Result\":\"{\\\"RequestId\\\":\\\"8B3649AF-5A6B-1099-BEB6-164D81067398\\\",\\\"EventType\\\":\\\"SnapshotComplete\\\",\\\"UserId\\\":1797131669910763,\\\"MessageBody\\\":{\\\"Status\\\":\\\"success\\\",\\\"VideoId\\\":\\\"00f985a50ae371f0ad1c4106e0ea0102\\\",\\\"EventType\\\":\\\"SnapshotComplete\\\",\\\"EventTime\\\":\\\"2025-03-27T08:15:50Z\\\",\\\"TriggerSource\\\":\\\"{\\\\\\\"ActivityInstanceId\\\\\\\":\\\\\\\"c8cf62d53bef4e04bf703976bae6d0b9\\\\\\\",\\\\\\\"BizType\\\\\\\":\\\\\\\"ice-workflow\\\\\\\"}\\\"}}\",\"StartTime\":\"2025-03-27T08:15:47Z\",\"Status\":\"Succeed\"},\"Translate_zh_en\":{\"ActivityId\":\"VodTranslation\",\"ActivityInstanceId\":\"c043a872bb044763a3d293a5c2458b50\",\"EndTime\":\"2025-03-27T08:20:19Z\",\"Result\":\"{\\\"Type\\\":\\\"VideoTranslationAll\\\",\\\"Success\\\":false}\",\"StartTime\":\"2025-03-27T08:15:46Z\",\"Status\":\"Failed\"},\"Act_Start\":{\"ActivityId\":\"start\",\"ActivityInstanceId\":\"8a9402f4ff064084bf496707fb2d664a\",\"Result\":\"{\\\"Type\\\":\\\"Media\\\",\\\"bizType\\\":6,\\\"Media\\\":\\\"00f985a50ae371f0ad1c4106e0ea0102\\\",\\\"Title\\\":\\\"2.mp4\\\",\\\"taskInput\\\":\\\"{\\\\\\\"Type\\\\\\\":\\\\\\\"Media\\\\\\\",\\\\\\\"Media\\\\\\\":\\\\\\\"00f985a50ae371f0ad1c4106e0ea0102\\\\\\\"}\\\",\\\"userTaskInput\\\":\\\"{\\\\\\\"Type\\\\\\\":\\\\\\\"Media\\\\\\\",\\\\\\\"Media\\\\\\\":\\\\\\\"00f985a50ae371f0ad1c4106e0ea0102\\\\\\\",\\\\\\\"Title\\\\\\\":\\\\\\\"2.mp4\\\\\\\",\\\\\\\"StorageLocation\\\\\\\":\\\\\\\"yiming-pre.oss-cn-shanghai.aliyuncs.com\\\\\\\"}\\\",\\\"StorageLocation\\\":\\\"yiming-pre.oss-cn-shanghai.aliyuncs.com\\\",\\\"callerUid\\\":1797131669910763,\\\"CUR_NODE_NAME\\\":\\\"Act_Start\\\"}\",\"StartTime\":\"2025-03-27T08:15:45Z\",\"Status\":\"Succeed\"},\"VodDynamicImage_123\":{\"ActivityId\":\"VodDynamicImage\",\"ActivityInstanceId\":\"26e8dab82ab84110b1150f146caf633c\",\"EndTime\":\"2025-03-27T08:15:55Z\",\"Result\":\"{\\\"RequestId\\\":\\\"7120B5D5-430F-14AD-8922-577F072DDD64\\\",\\\"EventType\\\":\\\"DynamicImageComplete\\\",\\\"UserId\\\":1797131669910763,\\\"MessageBody\\\":{\\\"Status\\\":\\\"success\\\",\\\"VideoId\\\":\\\"00f985a50ae371f0ad1c4106e0ea0102\\\",\\\"EventType\\\":\\\"DynamicImageComplete\\\",\\\"EventTime\\\":\\\"2025-03-27T08:15:52Z\\\",\\\"TriggerSource\\\":\\\"{\\\\\\\"ActivityInstanceId\\\\\\\":\\\\\\\"26e8dab82ab84110b1150f146caf633c\\\\\\\",\\\\\\\"BizType\\\\\\\":\\\\\\\"ice-workflow\\\\\\\"}\\\"}}\",\"StartTime\":\"2025-03-27T08:15:47Z\",\"Status\":\"Succeed\"}}

UserData

string

The user data. This is a JSON string that supports settings such as message callbacks and upload acceleration.

{"MessageCallback":{"CallbackURL":"http://example.aliyundoc.com"},"Extend":{"localId":"*****","test":"www"}}

Workflow

object

Details of the workflow.

WorkflowId

string

The workflow ID.

vw_09d6*****b5c5b19a0c891e02

Name

string

The name of the workflow.

All_Activity_New_1_app-1000000

Status

string

The workflow status. Valid values:

  • Active: The workflow is active.

  • Inactive: The workflow is inactive.

  • Deleted: The workflow has been deleted.

Active

Type

string

The workflow type. By default, this parameter is not populated.

CreateTime

string

The time when the workflow was created, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2025-03-26T05:50:14Z

ModifiedTime

string

The time when the workflow was last modified, in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

2025-03-26T07:51:55Z

AppId

string

The application ID.

app-1000000

Examples

Success response

JSON format

{
  "RequestId": "6708D849-F109-1A6C-AC91-************",
  "JobType": "transcode",
  "TranscodeJobDetail": {
    "JobId": "2dc1634e**********3f1d22d1a0174e",
    "UserId": 0,
    "VideoId": "30e5d7**********bd900764de7c0102",
    "Status": "TranscodeSuccess",
    "TemplateId": "dbfaaec9e**********bf0b81219244c",
    "Definition": "HD",
    "CreateTime": "2024-10-14T07:39:25Z",
    "CompleteTime": "2024-10-14T07:39:34Z"
  },
  "SnapshotJobDetail": {
    "JobId": "63df12s0**********4hdq249t82kr91",
    "UserId": 0,
    "VideoId": "30e5d7**********bd900764de7c0102",
    "Status": "Success",
    "Trigger": "Auto",
    "NormalConfig": "{\"inl\":0,\"num\":32,\"tm\":5,\"wd\":\"352\",\"ft\":\"normal\",\"hg\":\"640\"}",
    "SpriteConfig": "{\"pad\":\"0\",\"lines\":\"10\",\"mgin\":\"0\",\"cols\":\"10\",\"ikcp\":\"false\",\"hg\":\"68\"}",
    "CreateTime": "2024-10-14T07:39:25Z",
    "CompleteTime": "2024-10-14T07:39:45Z"
  },
  "AIJobDetail": {
    "JobId": "5c9dff751ba**********59d50a967f5",
    "UserId": 0,
    "MediaId": "30e5d7**********bd900764de7c0102",
    "JobType": "AIVideoCensor",
    "Status": "success",
    "Trigger": "Auto",
    "TemplateConfig": "{\"AuditRange\":[\"video\",\"image-cover\",\"text-title\"],\"AuditContent\":[\"screen\"],\"AuditItem\":[\"terrorism\",\"porn\"],\"AuditAutoBlock\":\"no\"}",
    "CreateTime": "2024-10-14T07:39:25Z",
    "CompleteTime": "2024-10-14T07:39:46Z\n"
  },
  "WorkflowTaskDetail": {
    "TaskId": "46ecc024******92c8e26237e51",
    "Status": "Succeed",
    "TaskInput": "{\\\"Type\\\":\\\"Media\\\",\\\"Media\\\":\\\"00f985a50ae371f0ad1c4106e0ea0102\\\",\\\"Title\\\":\\\"2.mp4\\\",\\\"StorageLocation\\\":\\\"yiming-pre.oss-cn-shanghai.aliyuncs.com\\\"}",
    "CreateTime": "2025-03-27T08:15:46Z",
    "FinishTime": "2025-03-27T08:20:19Z",
    "ActivityResults": "{\\\"VodSnapshot_123\\\":{\\\"ActivityId\\\":\\\"VodSnapshot\\\",\\\"ActivityInstanceId\\\":\\\"c8cf62d53bef4e04bf703976bae6d0b9\\\",\\\"EndTime\\\":\\\"2025-03-27T08:15:51Z\\\",\\\"Result\\\":\\\"{\\\\\\\"RequestId\\\\\\\":\\\\\\\"8B3649AF-5A6B-1099-BEB6-164D81067398\\\\\\\",\\\\\\\"EventType\\\\\\\":\\\\\\\"SnapshotComplete\\\\\\\",\\\\\\\"UserId\\\\\\\":1797131669910763,\\\\\\\"MessageBody\\\\\\\":{\\\\\\\"Status\\\\\\\":\\\\\\\"success\\\\\\\",\\\\\\\"VideoId\\\\\\\":\\\\\\\"00f985a50ae371f0ad1c4106e0ea0102\\\\\\\",\\\\\\\"EventType\\\\\\\":\\\\\\\"SnapshotComplete\\\\\\\",\\\\\\\"EventTime\\\\\\\":\\\\\\\"2025-03-27T08:15:50Z\\\\\\\",\\\\\\\"TriggerSource\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"ActivityInstanceId\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"c8cf62d53bef4e04bf703976bae6d0b9\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"BizType\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"ice-workflow\\\\\\\\\\\\\\\"}\\\\\\\"}}\\\",\\\"StartTime\\\":\\\"2025-03-27T08:15:47Z\\\",\\\"Status\\\":\\\"Succeed\\\"},\\\"Translate_zh_en\\\":{\\\"ActivityId\\\":\\\"VodTranslation\\\",\\\"ActivityInstanceId\\\":\\\"c043a872bb044763a3d293a5c2458b50\\\",\\\"EndTime\\\":\\\"2025-03-27T08:20:19Z\\\",\\\"Result\\\":\\\"{\\\\\\\"Type\\\\\\\":\\\\\\\"VideoTranslationAll\\\\\\\",\\\\\\\"Success\\\\\\\":false}\\\",\\\"StartTime\\\":\\\"2025-03-27T08:15:46Z\\\",\\\"Status\\\":\\\"Failed\\\"},\\\"Act_Start\\\":{\\\"ActivityId\\\":\\\"start\\\",\\\"ActivityInstanceId\\\":\\\"8a9402f4ff064084bf496707fb2d664a\\\",\\\"Result\\\":\\\"{\\\\\\\"Type\\\\\\\":\\\\\\\"Media\\\\\\\",\\\\\\\"bizType\\\\\\\":6,\\\\\\\"Media\\\\\\\":\\\\\\\"00f985a50ae371f0ad1c4106e0ea0102\\\\\\\",\\\\\\\"Title\\\\\\\":\\\\\\\"2.mp4\\\\\\\",\\\\\\\"taskInput\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"Type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Media\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Media\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"00f985a50ae371f0ad1c4106e0ea0102\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"userTaskInput\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"Type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Media\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Media\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"00f985a50ae371f0ad1c4106e0ea0102\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"2.mp4\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"StorageLocation\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"yiming-pre.oss-cn-shanghai.aliyuncs.com\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"StorageLocation\\\\\\\":\\\\\\\"yiming-pre.oss-cn-shanghai.aliyuncs.com\\\\\\\",\\\\\\\"callerUid\\\\\\\":1797131669910763,\\\\\\\"CUR_NODE_NAME\\\\\\\":\\\\\\\"Act_Start\\\\\\\"}\\\",\\\"StartTime\\\":\\\"2025-03-27T08:15:45Z\\\",\\\"Status\\\":\\\"Succeed\\\"},\\\"VodDynamicImage_123\\\":{\\\"ActivityId\\\":\\\"VodDynamicImage\\\",\\\"ActivityInstanceId\\\":\\\"26e8dab82ab84110b1150f146caf633c\\\",\\\"EndTime\\\":\\\"2025-03-27T08:15:55Z\\\",\\\"Result\\\":\\\"{\\\\\\\"RequestId\\\\\\\":\\\\\\\"7120B5D5-430F-14AD-8922-577F072DDD64\\\\\\\",\\\\\\\"EventType\\\\\\\":\\\\\\\"DynamicImageComplete\\\\\\\",\\\\\\\"UserId\\\\\\\":1797131669910763,\\\\\\\"MessageBody\\\\\\\":{\\\\\\\"Status\\\\\\\":\\\\\\\"success\\\\\\\",\\\\\\\"VideoId\\\\\\\":\\\\\\\"00f985a50ae371f0ad1c4106e0ea0102\\\\\\\",\\\\\\\"EventType\\\\\\\":\\\\\\\"DynamicImageComplete\\\\\\\",\\\\\\\"EventTime\\\\\\\":\\\\\\\"2025-03-27T08:15:52Z\\\\\\\",\\\\\\\"TriggerSource\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"ActivityInstanceId\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"26e8dab82ab84110b1150f146caf633c\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"BizType\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"ice-workflow\\\\\\\\\\\\\\\"}\\\\\\\"}}\\\",\\\"StartTime\\\":\\\"2025-03-27T08:15:47Z\\\",\\\"Status\\\":\\\"Succeed\\\"}}",
    "UserData": "{\"MessageCallback\":{\"CallbackURL\":\"http://example.aliyundoc.com\"},\"Extend\":{\"localId\":\"*****\",\"test\":\"www\"}}",
    "Workflow": {
      "WorkflowId": "vw_09d6*****b5c5b19a0c891e02",
      "Name": "All_Activity_New_1_app-1000000",
      "Status": "Active",
      "Type": "",
      "CreateTime": "2025-03-26T05:50:14Z",
      "ModifiedTime": "2025-03-26T07:51:55Z",
      "AppId": "app-1000000"
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.