# Query transcoding templates (/en/api-reference/api-ref/cloud-transcoding/template-query)

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

Queries transcoding template configurations under a specified App ID.

- OpenAPI: /openapi/cloud-transcoding/cloud-transcoding.en.yaml
- Operation ID: query-transcoding-templates
- 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

Query all transcoding template configurations under the specified App ID


## Authorization

This endpoint requires authentication.

- `basicAuth`

## Parameters

- `Content-Type` (header, required, string) - The request content type. Use `application/json`.
  - Allowed: `application/json`
- `appId` (path, required, string) - The App ID of the project

## Request body

No request body.

## Request examples

### curl

```bash
curl --request get \
      --url https://api.sd-rtn.com/v1/projects/:appId/rtls/abr/config/codecs \
      --header 'Authorization: Basic <credentials>' \
      --header 'Content-Type: <string>'
```

### Python

```python
import requests

    url = "https://api.sd-rtn.com/v1/projects/:appId/rtls/abr/config/codecs"

    headers = {
        "Authorization": "Basic <credentials>",
        "Content-Type": "<string>"
    }

    response = requests.request("get", url, headers=headers)

    print(response.text)
```

### Node.js

```javascript
const url = 'https://api.sd-rtn.com/v1/projects/:appId/rtls/abr/config/codecs';
    const options = {
      method: 'get',
      headers: {Authorization: 'Basic <credentials>', 'Content-Type': '<string>'}
    };

    fetch(url, options)
      .then(res => res.json())
      .then(json => console.log(json))
      .catch(err => console.error(err));
```


### Response

- If the returned status code is `200`, the request was successful. The response body contains the result of the request.

- If the returned status code is not `200`, the request failed. The response body includes the `detail` and `reason` for failure. Refer to [status codes](/en/api-reference/api-ref/cloud-transcoding/status-codes) to understand the possible reasons for failure.


## Responses

### 200

The request succeeded and returned template data.

- `status` (string) - The status of the request.

Status of the request.

 - success: The request was successful.
 - error: The request failed
  - Allowed: `success` | `error`
- `data` (object)
  - `data.enabled` (boolean) - Whether to enable the multi-bitrate function on the viewer side.
  - `data.codecs` (array)
    - `data.codecs.items` (object)
      - `data.codecs.items.id` (string) - The ID of the transcoding template.
      - `data.codecs.items.enabled` (boolean) - Whether to enable this transcoding template.
      - `data.codecs.items.Video` (object)
        - `data.codecs.items.Video.width` (number) - The width of the transcoded output video in pixels.

The width of the transcoded output video (px).
        - `data.codecs.items.Video.height` (number) - The height of the transcoded output video in pixels.

The height of the transcoded output video (px).
        - `data.codecs.items.Video.fps` (number) - The frame rate of the transcoded output video.

The frame rate (fps) of the transcoded output video.
### default

The request failed.

- `message` (string) - Describes why the request failed.
- `status` (string) - The status of the request.

Status of this request:

 - success: The request was successful.
 - error: The request failed.
  - Allowed: `success` | `error`

## Response examples

### 200

```json
{
  "status": "success",
  "data": {
    "enabled": true,
    "codecs": [
      {
        "id": "The ID of the transcoding template.",
        "enabled": true,
        "video": {
          "width": 0,
          "height": 0,
          "fps": 0
        }
      }
    ]
  }
}
```
### default

```json
{
  "status": "error",
  "message": "Description of the reason for the request failure."
}
```

### Response example

```json
{
      "status": "The status of this request:\n- `success`: The request succeeded.\n- `error`: The request failed.\n",
      "data": {
        "enabled": true,
        "codecs": [
          {
            "id": "The ID of the transcoding template.",
            "enabled": true,
            "video": {
              "width": 0,
              "height": 0,
              "fps": 0
            }
          }
        ]
      }
    }
```
