All Products
Search
Document Center

Intelligent Media Services:ListTemplates

Last Updated:Dec 06, 2024

Queries a list of templates that meet the specified conditions. You can query templates based on information such as the template status and creation source.

Operation description

A template is an encapsulation of the timeline of a media editing and production job. You can define a common timeline as a template. When you have the same requirements, you need to only specify key parameters and materials to produce videos.

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

Request parameters

ParameterTypeRequiredDescriptionExample
TypestringNo

The template type.

Valid values:

  • Timeline
  • VETemplate
Timeline
StatusstringNo

The template state.

Valid values:

  • UploadFailed: Failed to upload the video.
  • ProcessFailed: Failed to process the advanced template.
  • Available: The template is available.
  • Uploading: The video is being uploaded.
  • Created: The template is created but not ready for use.
  • Processing: The advanced template is being processed.
Available
CreateSourcestringNo

The source from which the template was created.

Valid values:

  • AliyunConsole
  • WebSDK
  • OpenAPI
OpenAPI
KeywordstringNo

The search keyword. You can use the template ID or title as the keyword to search for templates.

****20b48fb04483915d4f2cd8ac****
SortTypestringNo

The sorting parameter. By default, the query results are sorted by creation time in descending order.

Valid values:

  • CreationTime:Asc: sorted by creation time in ascending order.
  • CreationTime:Desc: sorted by creation time in descending order.
CreationTime:Desc

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

The total number of entries returned.

100
Templatesarray<object>

The queried templates.

Templatesobject

The template information.

TemplateIdstring

The template ID.

****20b48fb04483915d4f2cd8ac****
Namestring

The template name.

Typestring

The template type.

Valid values:

  • Timeline: regular template.
  • VETemplate: advanced template.
Timeline
Configstring

The template configurations.

PreviewMediastring

The preview media asset.

****20b48fb04483915d4f2cd8ac****
Statusstring

The template state.

Valid values:

  • UploadFailed: Failed to upload the video.
  • ProcessFailed: Failed to process the advanced template.
  • Available: The template is available.
  • Uploading: The video is being uploaded.
  • Created: The template is created but not ready for use.
  • Processing: The advanced template is being processed.
Available
CreateSourcestring

The source from which the template was created.

Valid values:

  • AliyunConsole
  • WebSDK
  • OpenAPI
OpenAPI
ModifiedSourcestring

The source from which the template was modified.

Valid values:

  • AliyunConsole
  • WebSDK
  • OpenAPI
OpenAPI
PreviewMediaStatusstring

The state of the preview media asset.

Valid values:

  • PrepareFail
  • Init
  • Normal
  • Preparing
Normal
CreationTimestring

The time when the template was created.

2020-12-26T04:11:10Z
ModifiedTimestring

The time when the template was last modified.

2020-12-26T04:11:10Z
CoverURLstring

The thumbnail URL.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg
ClipsParamstring

The clip parameters.

{"Media1":"mediaId","Text1":"text"}

Examples

Sample success responses

JSONformat

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "TotalCount": 100,
  "Templates": [
    {
      "TemplateId": "****20b48fb04483915d4f2cd8ac****",
      "Name": "",
      "Type": "Timeline",
      "Config": "",
      "PreviewMedia": "****20b48fb04483915d4f2cd8ac****",
      "Status": "Available",
      "CreateSource": "OpenAPI",
      "ModifiedSource": "OpenAPI",
      "PreviewMediaStatus": "Normal",
      "CreationTime": "2020-12-26T04:11:10Z",
      "ModifiedTime": "2020-12-26T04:11:10Z",
      "CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg",
      "ClipsParam": "{\"Media1\":\"mediaId\",\"Text1\":\"text\"}"
    }
  ]
}

Error codes

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