GetTemplate

Updated at:

Retrieves the information about a template based on the template ID. Advanced templates require a longer parsing time. When the template type is advanced, it can be used once the Status is Available.

Operation description

The template factory encapsulates the editing and synthesis timeline. You can define commonly used timelines as templates. When similar requirements arise, you only need to pass key parameters and media assets to produce videos.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:GetTemplate

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TemplateId

string

No

The template ID.

****20b48fb04483915d4f2cd8ac****

RelatedMediaidFlag

string

No

Specifies whether to return the media assets associated with the template. Valid values:

  • 1: Returns the associated media assets.

  • 0: Does not return the associated media assets. Default value: 0. This parameter is valid only for standard templates.

0

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The request ID.

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

Template

object

The template information.

TemplateId

string

The template ID.

****20b48fb04483915d4f2cd8ac****

Name

string

The template name.

Video watermark template

Type

string

The templatetype. Valid values:

  • Timeline: standard template

  • VETemplate: advanced template

  • BatchEditing: one-click video production template

Timeline

Config

string

The template configuration.

Refer to Timeline template configuration details

PreviewMedia

string

The preview media asset.

****20b48fb04483915d4f2cd8ac****

Status

string

The template status. Valid values:

  • Available

  • Created

  • Uploading

  • Processing

  • UploadFailed

  • ProcessFailed

Available

CreateSource

string

The creation source. Valid values:

  • AliyunConsole

  • OpenAPI

  • WebSDK

OpenAPI

ModifiedSource

string

The modification source. Valid values:

  • AliyunConsole

  • OpenAPI

  • WebSDK

OpenAPI

PreviewMediaStatus

string

The preview media asset status. Valid values:

  • Init (initial status: the source file is not ready)

  • Preparing (the source file is being prepared, such as being uploaded or undergoing editing and synthesis)

  • PrepareFail (the source file preparation failed, such as a failure to obtain the source file information)

  • Normal (normal: the source file is ready)

Normal

CreationTime

string

The creation time. The time is in the ISO 8601 format and uses UTC (ending with Z).

2020-12-26T04:11:10Z

ModifiedTime

string

The modification time. The time is in the ISO 8601 format and uses UTC (ending with Z).

2020-12-26T04:11:10Z

CoverURL

string

The cover URL.

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

ClipsParam

string

The ClipsParam parameter template for submitting a synthesis task. You can replace mediaId and text with actual parameters to submit the synthesis task. For usage methods, refer to:

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

RelatedMediaids

string

The media assets associated with the template. Used by the standard template editor.

{"video":["******c04f1d4a06996144cc1a******"],"audio":["******c04f1d4a06996144cc1a******"],"image":["******c04f1d4a06996144cc1a******"]}

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "Template": {
    "TemplateId": "****20b48fb04483915d4f2cd8ac****",
    "Name": "Video watermark template",
    "Type": "Timeline",
    "Config": "Refer to Timeline template configuration details",
    "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\"}",
    "RelatedMediaids": "{\"video\":[\"******c04f1d4a06996144cc1a******\"],\"audio\":[\"******c04f1d4a06996144cc1a******\"],\"image\":[\"******c04f1d4a06996144cc1a******\"]}"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.