Querying Transcoding Template Groups
Function
This API is used to query transcoding template groups.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
GET /v1.0/{project_id}/asset/template-collection/transcodings
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
group_collection_id |
No |
String |
Template group ID. |
|
offset |
No |
Integer |
Offset. The default value is 0. This parameter is invalid when group_collection_id is specified. |
|
limit |
No |
Integer |
Number of records on each page. The value defaults to 10 and ranges from 1 to 100. This parameter is invalid when group_collection_id is specified. |
Request 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 the user token. |
|
Authorization |
No |
String |
Authentication information. This parameter is mandatory for AK/SK authentication. |
|
X-Sdk-Date |
No |
String |
Time when a request is sent. This parameter is mandatory for AK/SK authentication. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
template_group_collection_list |
Array of TemplateGroupCollection objects |
Template group information. |
|
total |
Integer |
Total number of records. |
|
Parameter |
Type |
Description |
|---|---|---|
|
group_collection_id |
String |
Template group ID. |
|
name |
String |
Template group name. |
|
description |
String |
Template description. |
|
template_group_list |
Array of TemplateGroup objects |
Transcoding template group list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
group_id |
String |
Template group ID. |
|
name |
String |
Template group name. |
|
status |
String |
Whether it is set as the default one.
1: It is set as the default one. |
|
type |
String |
Template group type.
|
|
auto_encrypt |
Integer |
Whether to automatically encrypt a file. The options include:
Default value: 0 Encryption and transcoding must be performed at the same time. If encryption is required, the transcoding parameters cannot be empty, and the transcoding output format must be HLS. |
|
quality_info_list |
Array of QualityInfo objects |
Image quality configuration. |
|
watermark_template_ids |
Array of strings |
Array of IDs for the associated watermark templates |
|
description |
String |
Template description. |
|
common |
Common object |
Parameters shared by the low-bitrate HD transcoding switch, low-bitrate HD transcoding version, and multi-stream encoding format. |
|
Parameter |
Type |
Description |
|---|---|---|
|
video |
VideoTemplateInfo object |
Video template information. |
|
audio |
AudioTemplateInfo object |
Audio template information. |
|
format |
String |
Format. |
|
Parameter |
Type |
Description |
|---|---|---|
|
quality |
String |
Video quality. |
|
width |
Integer |
Video width. |
|
height |
Integer |
Video height. |
|
bitrate |
Integer |
Bitrate. |
|
frame_rate |
Integer |
Frame rate (in FPS), which defaults to 1 indicating adaptive frame rate. |
|
Parameter |
Type |
Description |
|---|---|---|
|
sample_rate |
Integer |
Audio sampling rate. Possible values are:
Default value: 1 |
|
bitrate |
Integer |
Audio bitrate, in kbit/s. |
|
channels |
Integer |
Number of audio channels. The options include:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
pvc |
String |
Low-bitrate HD transcoding switch. |
|
pvc_version |
String |
Low-bitrate HD transcoding version. |
|
video_codec |
String |
Video codec. |
|
audio_codec |
String |
Audio codec. Possible values are:
Default value: 1 |
|
hls_interval |
Integer |
Segment file duration, which defaults to 5 seconds. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Example Requests
This example queries transcoding template groups.
GET https://{endpoint}/v1.0/{project_id}/asset/template-collection/transcodings
Example Responses
Status code: 200
Returned when the request succeeded.
{
"template_group_collection_list" : [ {
"group_collection_id" : "9751249d25f14587b212544d6fd8dcf8",
"name" : "test",
"template_group_list" : [ {
"group_id" : "9751249d25f14587b212544d6fd8dcf8",
"name" : "test112",
"status" : "0",
"type" : "custom_template_group",
"auto_encrypt" : 0,
"quality_info_list" : [ {
"video" : {
"quality" : "UNKNOW",
"width" : 0,
"height" : 0,
"bitrate" : 0,
"frame_rate" : 0
},
"audio" : null,
"format" : "UNKNOW"
} ],
"watermark_template_ids" : null,
"description" : null,
"common" : {
"pvc" : null,
"pvc_version" : null,
"video_codec" : null,
"audio_codec" : "AAC",
"hls_interval" : 0
}
} ]
} ],
"total" : 1
}
Status code: 400
Returned when the request failed.
{
"error_code" : "VOD.10053",
"error_msg" : "The request parameter is illegal, illegal field: {xx}."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Returned when the request succeeded. |
|
400 |
Returned when the request failed. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot