All Products
Search
Document Center

Intelligent Media Services:ListCustomTemplates

Last Updated:Dec 16, 2024

Queries a list of custom templates.

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

Request parameters

ParameterTypeRequiredDescriptionExample
TypestringYes

The template type. Valid values:

  • 1: transcoding template.
  • 2: snapshot template.
  • 3: animated image template.
  • 4. image watermark template.
  • 5: text watermark template.
  • 6: subtitle template.
  • 7: AI-assisted content moderation template.
  • 8: AI-assisted intelligent thumbnail template.
  • 9: AI-assisted intelligent erasure template.
1
SubtypestringNo

The subtype ID of the template.

  • Valid values for transcoding templates:

    • 1 (Normal): regular template.
    • 2 (AudioTranscode): audio transcoding template.
    • 3 (Remux): container format conversion template.
    • 4 (NarrowBandV1): Narrowband HD 1.0 template.
    • 5 (NarrowBandV2): Narrowband HD 2.0 template.
  • Valid values for snapshot templates:

    • 1 (Normal): regular template.
    • 2 (Sprite): sprite template.
    • 3 (WebVtt): WebVTT template.
  • Valid values for AI-assisted content moderation templates:

    • 1 (Video): video moderation template.
    • 2 (Audio): audio moderation template.
    • 3 (Image): image moderation template.
  • Valid values for AI-assisted intelligent erasure templates:

    • 1 (VideoDelogo): logo erasure template.
    • 2 (VideoDetext): subtitle erasure template.
2
NamestringNo

The template name.

test-template
TemplateIdstringNo

The template ID.

****96e8864746a0b6f3****
PageNumberintegerNo

The page number.

1
PageSizeintegerNo

The number of entries per page.

20
OrderBystringNo

The order in which the entries are sorted. Valid values:

  • CreateTimeDesc: sorted by creation time in descending order.
  • CreateTimeAsc: sorted by creation time in ascending order.
CreateTimeDesc

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

The total number of templates.

20
CustomTemplateListarray<object>

The queried templates.

CustomTemplateobject

The information about the custom template.

TemplateIdstring

The template ID.

****20b48fb04483915d4f2cd8ac****
TemplateNamestring

The template name.

test-template
Typeinteger

The type ID of the template.

1
TypeNamestring

The type name of the template.

TranscodeTemplate
Subtypeinteger

The subtype ID of the template.

2
SubtypeNamestring

The subtype name of the template.

AudioTranscode
Statusstring

The template state.

Valid values:

  • Normal
Normal
IsDefaultboolean

Indicates whether the template is the default template.

Valid values:

  • true
  • false
true
TemplateConfigstring

The template parameters.

{"Container":{"Format":"mp3"},"Audio":{"Codec":"mp3","Bitrate":"64","Samplerate":"22050","Channels":"2"}}
CreateTimestring

The time when the template was created.

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

The time when the template was last modified.

2022-07-12T16:17:54Z

Examples

Sample success responses

JSONformat

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "Total": 20,
  "CustomTemplateList": [
    {
      "TemplateId": "****20b48fb04483915d4f2cd8ac****",
      "TemplateName": "test-template",
      "Type": 1,
      "TypeName": "TranscodeTemplate",
      "Subtype": 2,
      "SubtypeName": "AudioTranscode",
      "Status": "Normal",
      "IsDefault": true,
      "TemplateConfig": "{\"Container\":{\"Format\":\"mp3\"},\"Audio\":{\"Codec\":\"mp3\",\"Bitrate\":\"64\",\"Samplerate\":\"22050\",\"Channels\":\"2\"}}",
      "CreateTime": "2022-07-12T16:17:54Z",
      "ModifiedTime": "2022-07-12T16:17:54Z",
      "FrontendHint": {
        "TranscodeTemplateHint": {
          "BitrateControlType": ""
        }
      }
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-07-18The request parameters of the API has changed. The response structure of the API has changedView Change Details
2022-07-11Add OperationView Change Details