Creates a template.
Operation description
-
For more information about how to use a regular template, see Create and use a regular template.
-
For more information about how to use an advanced template, see Create and use advanced templates.
-
After an advanced template is created, it enters the Processing state. In this case, the template is unavailable. The template can be used only when it is in the Available state. The time required for template processing varies based on the size of the template file. Generally, it ranges from 10 seconds to 5 minutes.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:AddTemplate |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
No |
The name of the custom template. |
Template Name |
| Type |
string |
No |
The template type. Valid values:
Valid values:
|
Timeline |
| Config |
string |
No |
|
SeeTimelinetemplateConfigdocumentation |
| CoverUrl |
string |
No |
The URL of the template thumbnail. |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg |
| PreviewMedia |
string |
No |
The ID of the template preview video. |
****01bf24bf41c78b2754cb3187**** |
| Status |
string |
No |
The template state. Valid values:
Valid values:
|
Available |
| Source |
string |
No |
The source from which the template is created. Valid values:
Valid values:
|
OpenAPI |
| RelatedMediaids |
string |
No |
The IDs of the materials associated with the template for use by the regular template editor. |
{"video":["1805a0c6ca544fb395a06ca683619655"]} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
****2876-6263-4B75-8F2C-CD0F7FCF**** |
| Template |
object |
The template information. |
|
| TemplateId |
string |
The template ID. |
****01bf24bf41c78b2754cb3187**** |
| Name |
string |
The template name. |
Template Name |
| Type |
string |
The template type. Valid values:
Valid values:
|
Timeline |
| Config |
string |
The template configurations. |
SeeConfigdocumentation |
| CoverUrl |
string |
The URL of the template thumbnail. |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg |
| PreviewMedia |
string |
The ID of the preview video. |
****01bf24bf41c78b2754cb3187**** |
| Status |
string |
The template state. Valid values:
Valid values:
|
Available |
| CreateSource |
string |
The source from which the template was created. Valid values:
Valid values:
|
OpenAPI |
| ModifiedSource |
string |
The source from which the template was modified. Valid values:
Valid values:
|
OpenAPI |
Examples
Success response
JSON format
{
"RequestId": "****2876-6263-4B75-8F2C-CD0F7FCF****",
"Template": {
"TemplateId": "****01bf24bf41c78b2754cb3187****",
"Name": "Template Name",
"Type": "Timeline",
"Config": "SeeConfigdocumentation",
"CoverUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg",
"PreviewMedia": "****01bf24bf41c78b2754cb3187****",
"Status": "Available",
"CreateSource": "OpenAPI",
"ModifiedSource": "OpenAPI"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.