Updated on 2024-07-04 GMT+08:00

Querying Video Production Tasks

Function

Queries video production tasks. You can query virtual avatar video production tasks and photo-based virtual human video production tasks.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/digital-human-videos

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Offset where the query starts.

limit

No

Integer

Number of items displayed on each page.

state

No

String

Task status. By default, all statuses are selected.

Multiple statuses can be queried. Use commas (,) to separate them,

for example, state=CREATING,PUBLISHED.

sort_key

No

String

Sorting field. Currently, only create_time is supported.

sort_dir

No

String

Sorting mode.

  • asc: ascending order

  • desc: descending order

asc is used by default.

create_until

No

String

Filter the records whose creation time is not later than the entered time.

create_since

No

String

Filter the records whose creation time is not earlier than the entered time.

script_id

No

String

Script ID.

asset_name

No

String

Output video asset name.

job_type

No

String

Task type.

  • 2D_DIGITAL_HUMAN_VIDEO: virtual avatar video production task

  • PHOTO_DIGITAL_HUMAN_VIDEO: photo-based virtual human video production

job_id

No

String

Task ID.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token. This parameter is mandatory when token authentication is used.

You can obtain the token by calling the IAM API used to obtain a user token.

Value of X-Subject-Token in the response header.

Authorization

No

String

Authentication information. This parameter is mandatory for AK/SK authentication.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory for AK/SK authentication.

The format is YYYYMMDD'T'HHMMSS'Z'.

X-Project-Id

No

String

Project ID. This parameter is mandatory for AK/SK authentication.

X-App-UserId

No

String

Third-party user ID, which does not allow Chinese characters.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 5 Response body parameters

Parameter

Type

Description

count

Integer

Total number of video production tasks.

jobs

Array of DigitalHumanVideo objects

Video production task list.

Table 6 DigitalHumanVideo

Parameter

Type

Description

job_id

String

Task ID.

state

String

Task status. Options:

  • WAITING: The task is waiting for execution.

  • PROCESSING: The task is being processed.

  • SUCCEED: Task execution succeeded.

  • FAILED: Task execution failed.

  • CANCELED: The task has been canceled.

  • BLOCK: The task has been frozen.

job_type

String

Task type.

  • 2D_DIGITAL_HUMAN_VIDEO: virtual avatar video production task

  • PHOTO_DIGITAL_HUMAN_VIDEO: photo-based virtual human video production

start_time

String

Start time of virtual human video production.

end_time

String

End time of virtual human video production.

duration

Float

Virtual human video duration.

output_asset_config

OutputAssetInfo object

Output asset information.

error_info

ErrorResponse object

Error message.

create_time

String

Task creation time.

lastupdate_time

String

Task update time.

Table 7 OutputAssetInfo

Parameter

Type

Description

asset_id

String

Output video asset ID.

asset_name

String

Output video asset name.

cover_url

String

Video thumbnail URL.

preview_video_url

String

URL for downloading a preview video. The validity period of the URL is 24 hours.

NOTE:
  • Virtual avatar videos do not support preview.

Table 8 ErrorResponse

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 404

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://{endpoint}/v1/0d697589d98091f12f92c0073501cd79/digital-human-videos

Example Responses

Status code: 200

The information is returned when the request succeeds.

{
  "count" : 1,
  "jobs" : [ {
    "job_id" : "26f06524-4f75-4b3a-a853-b649a21aaf66",
    "state" : "SUCCEED",
    "start_time" : "2022-01-18T16:29:36Z",
    "end_time" : "2022-01-18T16:30:36Z",
    "duration" : 60,
    "output_asset_config" : {
      "asset_id" : "942e65a5fd219a2e01fb08d881cfadb9",
      "asset_name" : "One Day",
      "cover_url" : "https://{endpoint}/0d697589d98091f12f92c0073501cd79/942e65a5fd219a2e01fb08d881cfadb9/20d367508e62d3d4ad608cedbe81bd35.png?AccessKeyId=XCQKTA8IWQPCAUQS4SDA&Expires=1671241457&Signature=zVGMVbI5ji9rr8epD1Cir5OGIRk%3D"
    },
    "error_info" : null,
    "create_time" : "2022-11-30T06:59:56Z",
    "lastupdate_time" : "2022-11-30T07:00:09Z"
  } ]
}

Status code: 400

{
  "error_code" : "MSS.00000003",
  "error_msg" : "Invalid parameter"
}

Status code: 401

{
  "error_code" : "MSS.00000001",
  "error_msg" : "Unauthorized"
}

Status code: 404

{
  "error_code" : "MSS.00000002",
  "error_msg" : "Not Found"
}

Status code: 500

{
  "error_code" : "MSS.00000004",
  "error_msg" : "Internal Error"
}

Status Codes

Status Code

Description

200

The information is returned when the request succeeds.

400

Parameters error, including the error code and its description.

401

Authentication is not performed or fails.

404

No content.

500

Internal service error.

Error Codes

See Error Codes.