# 查询转码模板 (/zh-CN/api-reference/api-ref/cloud-transcoding/template-query)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

查询指定 App ID 下所有转码模板配置。

- OpenAPI: /openapi/cloud-transcoding/cloud-transcoding.zh-CN.yaml
- Operation ID: get-v1-projects-appId-rtls-abr-config-codecs
- Method: GET
- Path: /v1/projects/{appId}/rtls/abr/config/codecs
- Endpoint: https://api.sd-rtn.com/v1/projects/{appId}/rtls/abr/config/codecs

## Servers

- https://api.sd-rtn.com

查询指定 App ID 下所有的转码模板配置。


## Authorization

This endpoint requires authentication.

- `Basic Auth`
- `API Key`

## Parameters

- `Content-Type` (header, required, string) - `application/json`
- `appId` (path, required, string) - 声网为每个开发者提供的 **App ID**。在声网控制台创建一个项目后即可得到一个 App ID。一个 App ID 是一个项目的唯一标识。

## Request body

No request body.

## Responses

### 200

如果状态码为 200，则请求成功。

- `status` (string) - 本次请求的状态：
- `success`：请求成功。
- `error`：请求失败。

- `data` (object)
  - `data.enabled` (boolean) - 是否开启观众端多码率功能：
- `true`：开启功能。
- `false`：不开启功能。
  - `data.codecs` (array)
    - `data.codecs.items` (object)
      - `data.codecs.items.id` (string) - 转码模板的 ID。
      - `data.codecs.items.enabled` (boolean) - 是否开启该转码模版：
- `true`：开启该模板。
- `false`：不开启该模板。
      - `data.codecs.items.video` (object)
        - `data.codecs.items.video.width` (number) - 转码输出视频的宽度 (px)。
        - `data.codecs.items.video.height` (number) - 转码输出视频的高度 (px)。
        - `data.codecs.items.video.fps` (number) - 转码输出视频的帧率 (fps)。
### 非 200

如果状态码不为 200，表示请求失败。请根据响应状态码和 `message` 字段进行排查。

- `status` (string) - 本次请求的状态：
- `success`：请求成功。
- `error`：请求失败。

- `data` (object)
  - `data.enabled` (boolean) - 是否开启观众端多码率功能：
- `true`：开启功能。
- `false`：不开启功能。
  - `data.codecs` (array)
    - `data.codecs.items` (object)
      - `data.codecs.items.id` (string) - 转码模板的 ID。
      - `data.codecs.items.enabled` (boolean) - 是否开启该转码模版：
- `true`：开启该模板。
- `false`：不开启该模板。
      - `data.codecs.items.video` (object)
        - `data.codecs.items.video.width` (number) - 转码输出视频的宽度 (px)。
        - `data.codecs.items.video.height` (number) - 转码输出视频的高度 (px)。
        - `data.codecs.items.video.fps` (number) - 转码输出视频的帧率 (fps)。
- `message` (string) - 描述请求失败的原因。

## Response examples

### 200

```json
{
  "status": "本次请求的状态：\n- `success`：请求成功。\n- `error`：请求失败。\n",
  "data": {
    "enabled": true,
    "codecs": [
      {
        "id": "转码模板的 ID。",
        "enabled": true,
        "video": {
          "width": 0,
          "height": 0,
          "fps": 0
        }
      }
    ]
  }
}
```
### 非 200

```json
{
  "status": "本次请求的状态：\n- `success`：请求成功。\n- `error`：请求失败。\n",
  "data": {
    "enabled": true,
    "codecs": [
      {
        "id": "转码模板的 ID。",
        "enabled": true,
        "video": {
          "width": 0,
          "height": 0,
          "fps": 0
        }
      }
    ]
  },
  "message": "描述请求失败的原因。"
}
```
