Updated on 2024-04-30 GMT+08:00
Querying Hosting Task Details (Not Available Soon)

Querying Hosting Task Details (Not Available Soon)

Function

Queries details about an OBS inventory hosting task

URI

GET /v1.0/{project_id}/asset/obs/host/stock/task/details

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

task_id

Yes

String

Task ID

page

No

Integer

Page number. The default value is 0.

size

No

Integer

Number of records on each page

The value defaults to 10 and ranges from 1 to 100.

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.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.

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.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Total number of tasks

task_id

String

Task ID

task_status

String

Task status

assets

Array of AssetDetails objects

Media asset information

Table 5 AssetDetails

Parameter

Type

Description

asset_id

String

Media asset ID assigned by VOD. This parameter can only be queried but cannot be modified.

asset_status

String

Media file status

  • CREATING: The file is being uploaded.

  • FAILED: Upload failed.

  • CREATED: The file has been uploaded.

  • PUBLISHED: The file has been published.

  • DELETED: The task has been deleted.

transcode_status

String

Transcoding status

  • UN_TRANSCODE: The file is not transcoded.

  • WAITING_TRANSCODE: The file is to be transcoded.

  • TRANSCODING: The file is being transcoded.

  • TRANSCODE_SUCCEED: Transcoding succeeded.

  • TRANSCODE_FAILED: Transcoding failed.

base_info

BaseInfo object

Basic media file information.

transcode_info

TranscodeInfo object

Information about the transcoded file

NOTE:

Such information can be queried only after the transcoding succeeded, and is unavailable when the transcoding is not performed, is being performed, or failed.

Table 6 BaseInfo

Parameter

Type

Description

title

String

Media file title

The value is UTF-8-encoded and contains a maximum of 128 characters.

video_name

String

Media asset file name

description

String

Media file description

The value contains a maximum of 1024 characters.

category_id

Long

Media asset category ID

category_name

String

Media asset category name

create_time

String

Time when the media file was created

The format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone.

last_modified

String

Time when the media file was last modified

The format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone.

video_type

String

Audio/Video file type

Possible values are:

  • Video files: MP4, TS, MOV, MXF, MPG, FLV, WMV, AVI, M4V, F4V, MPEG, 3GP, ASF, and MKV

  • Audio files: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, and MP2

tags

String

Media file tag

Each tag contains up to 16 characters and up to 16 tags are allowed.

Use commas (,) to separate tags. The values are UTF-8-encoded.

meta_data

MetaData object

Video metadata

It is generated after video parsing, including the packaging format, size, resolution, bitrate, and frame rate.

video_url

String

URL for accessing the original video file

sign_url

String

Temporary access URL of the original video file in OBS. A specific value is returned only when the API for Querying File Information is called.

cover_info_array

Array of CoverInfo objects

Cover information

subtitle_info

Array of SubtitleInfo objects

Subtitle information array

source_path

File_addr object

Media asset storage parameters.

output_path

File_addr object

Media asset storage parameters.

Table 7 CoverInfo

Parameter

Type

Description

cover_url

String

URL for downloading the cover file

Table 8 SubtitleInfo

Parameter

Type

Description

url

String

URL for downloading the subtitle file

id

Integer

Subtitle file ID

type

String

Subtitle file type

language

String

Subtitle file language

Table 9 File_addr

Parameter

Type

Description

bucket

String

OBS bucket name

location

String

Name of the region where the bucket is located. For example, the region name of CN North-Beijing4 is cn-north-4. The created bucket must be in the region of the VOD service.

object

String

File path

Table 10 TranscodeInfo

Parameter

Type

Description

template_group_name

String

Name of a transcoding template group

output

Array of Output objects

Array in the output file

  • HLS or DASH: The number of members in this array is n + 1, where n indicates the number of channels in the output file.

  • MP4: The number of members in this array is n, which indicates the number of channels in the output file.

exec_desc

String

Execution description

transcode_status

String

Transcoding status

Possible values are:

  • UN_TRANSCODE: The file is not transcoded.

  • WAITING_TRANSCODE: The file is to be transcoded.

  • TRANSCODING: The file is being transcoded.

  • TRANSCODE_SUCCEED: Transcoding succeeded.

  • TRANSCODE_FAILED: Transcoding failed.

Table 11 Output

Parameter

Type

Description

play_type

String

Protocol type

Possible values are:

  • hls

  • dash

  • mp4

url

String

Streaming URL

group_id

String

Transcoding group ID.

group_name

String

Transcoding group name.

encrypted

Integer

Whether the stream is encrypted

Possible values are:

  • 0: not encrypted

  • 1: encrypted

quality

String

Definition

Possible values are:

  • FLUENT: smooth

  • SD: standard definition (SD)

  • HD: high definition (HD)

  • FULL_HD: ultra-high-definition (UHD)

meta_data

MetaData object

Video metadata

It is generated after video parsing, including the packaging format, size, resolution, bitrate, and frame rate.

Table 12 MetaData

Parameter

Type

Description

pack_type

String

Video container format

Possible values are:

  • MP4

  • TS

  • MOV

  • MXF

  • MPG

  • FLV

  • WMV

  • MP3

  • WMA

  • APE

  • FLAC

  • AAC

  • AC3

  • MMF

  • AMR

  • M4A

  • M4R

  • OGG

  • WAV

  • WV

  • MP2

  • AVI

  • F4V

  • M4V

  • MPEG

  • HLS

  • DASH

codec

String

Video encoding format.

Options:

  • MPEG-2

  • MPEG-4

  • H.264

  • H.265

  • WMV

  • Vorbis

  • AAC

  • AC-3

  • AMR

  • APE

  • FLAC

  • MP3

  • MP2

  • WMA

  • PCM

  • ADPCM

  • WavPack

NOTE:

If unknown is returned for codec, the current audio/video encoding format sent by the user cannot be parsed.

duration

Long

Video duration.

If the value of the original video duration is not an integer, the value of this field is rounded up.

video_size

Long

Video file size

Unit: byte

width

Long

Video width, in pixels

  • Possible values for H.264: a multiple of 2 between 32 and 3840

  • Possible values for H.265: a multiple of 4 between 320 and 3840

hight

Long

Video height, in pixels.

  • Possible values for H.264: a multiple of 2 between 32 and 2,160

  • Possible values for H.265: a multiple of 4 between 240 and 2,160

bit_rate

Long

Average video bitrate

frame_rate

Long

Frame rate, in FPS

Possible values are:

  • FRAMERATE_AUTO = 1,

  • FRAMERATE_10 = 2,

  • FRAMERATE_15 = 3,

  • FRAMERATE_2397 = 4, // 23.97 fps

  • FRAMERATE_24 = 5,

  • FRAMERATE_25 = 6,

  • FRAMERATE_2997 = 7, // 29.97 fps

  • FRAMERATE_30 = 8,

  • FRAMERATE_50 = 9,

  • FRAMERATE_60 = 10 The default value is 1.

Unit: FPS

quality

String

Definition

Possible values are:

  • FULL_HD: ultra-high-definition (UHD)

  • HD: high definition (HD)

  • SD: standard definition (SD)

  • FLUENT: smooth

  • AD: adaptive

  • 2K

  • 4K

audio_channels

Integer

Number of audio channels

Status code: 403

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Example Requests

Queries details about an inventory hosting task.

GET https://{endpoint}/v1.0/{project_id}/asset/obs/host/stock/task/details?task_id={task_id}

Example Responses

Status code: 200

The information is returned when the request succeeds.

{
  "total" : 0,
  "task_id" : "973",
  "task_status" : "SUCCEED",
  "assets" : [ ]
}

Status code: 403

The information is returned when the request fails.

{
  "error_code" : "VOD.10053",
  "error_msg" : "The request parameter is illegal, illegal field: {xx}."
}

Status Codes

Status Code

Description

200

The information is returned when the request succeeds.

403

The information is returned when the request fails.

Error Codes

See Error Codes.