GetCustomTemplate

Updated at:

Queries the details of a custom media processing template.

Operation description

This operation queries the information about a template with a specified ID based on TemplateId, or queries the information about the default template. If TemplateId is not empty, other parameters are ignored and the information about the template with the specified TemplateId is queried. If TemplateId is empty, the default template of the user is queried based on other parameters. In this case, Type is required.

templatetype (Type):

  1. 1: Transcoding template

  2. 2: Snapshot template

  3. 3: Animated image template

  4. 4: Image watermark template

  5. 5: Text watermark template

  6. 6: Subtitle template

  7. 7: AI content moderation

  8. 8: AI smart cover

  9. 9: AI smart erasure

Subtype of the transcoding template (Subtype):

  1. 1: Normal transcoding template (Normal)

  2. 2: Audio transcoding template (AudioTranscode)

  3. 3: Remuxing (Remux)

  4. 4: Narrowband HD 1.0 (NarrowBandV1)

  5. 5: Narrowband HD 2.0 (NarrowBandV2)

Subtype of the snapshot template (Subtype):

  1. 1: Normal snapshot/Static snapshot (Normal)

  2. 2: Sprite snapshot (Sprite)

  3. 3: WebVTT snapshot (WebVtt)

Subtype of the AI content moderation template (Subtype):

  1. 1: Video moderation (Video)

  2. 2: Audio moderation (Audio)

  3. 3: Image moderation (Image)

Subtype of the AI smart erasure template (Subtype):

  1. 1: Icon erasure (VideoDelogo)

  2. 2: Subtitle erasure (VideoDetext)

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:GetCustomTemplate

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TemplateId

string

No

The template ID.

****96e8864746a0b6f3****

Type

integer

No

The templatetype ID used when querying the default template. This parameter is required when TemplateId is empty.

1

Subtype

integer

No

The template subtype.

1

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

CustomTemplate

object

The template information.

TemplateId

string

The template ID.

****20b48fb04483915d4f2cd8ac****

TemplateName

string

The template name.

Test snapshot template

Type

integer

The templatetype ID.

2

TypeName

string

The templatetype name.

SnapshotTemplate

Subtype

integer

The template subtype ID.

1

SubtypeName

string

The template subtype name.

Normal

Status

string

The template status.

Normal

IsDefault

boolean

Indicates whether the template is the default template.

true

TemplateConfig

string

The template configurations.

{"Type":"Normal","FrameType":"normal","Time":0,"Count":10}

CreateTime

string

The time when the template was created. The time follows the ISO 8601 standard and is displayed in UTC (ending with Z).

2022-01-01T10:00:00Z

ModifiedTime

string

The time when the template was modified. The time follows the ISO 8601 standard and is displayed in UTC (ending with Z).

2022-01-01T11:00:00Z

FrontendHint

object

The reserved information for frontend display.

TranscodeTemplateHint

object

The hint information for the transcoding template.

BitrateControlType

string

The bitrate control type.

CFR

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "CustomTemplate": {
    "TemplateId": "****20b48fb04483915d4f2cd8ac****",
    "TemplateName": "Test snapshot template",
    "Type": 2,
    "TypeName": "SnapshotTemplate",
    "Subtype": 1,
    "SubtypeName": "Normal",
    "Status": "Normal",
    "IsDefault": true,
    "TemplateConfig": "{\"Type\":\"Normal\",\"FrameType\":\"normal\",\"Time\":0,\"Count\":10}",
    "CreateTime": "2022-01-01T10:00:00Z",
    "ModifiedTime": "2022-01-01T11:00:00Z\n",
    "FrontendHint": {
      "TranscodeTemplateHint": {
        "BitrateControlType": "CFR"
      }
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.