Set global template

Updated

Sets a global Media Gateway flow configuration template.

PUT
https://api.agora.io/{region}/v1/projects/{appId}/rtls/ingress/appconfig

This method sets a global flow configuration template, that is, the template that applies to all streaming keys under the app ID.

Note

For users of the beta version: Previously this API could also be used to set the transcoding parameters. Now it is recommended that you use the template creation API instead. If you have used this API to set transcoding, the current flow is the following:

  • If you reset defaultStreamTemplate, the transcoding previously set through this API will automatically become invalid, and the parameters in the new template will prevail.
  • If you do not reset defaultStreamTemplate, the transcoding previously set through this API will remain as the default global configuration for this app ID.

Note

Before calling this API, create a flow configuration template.

Path Parameters

regionstring
Required

Region for the streaming key or stream. Supported values are na for North America, eu for Europe, ap for Asia except mainland China, and cn for mainland China.

Important

Make sure that:

  • The region value is the same as for the input source stream.
  • The domain names for setting the region parameter and streaming are the same.
  • The region value is in lowercase.
appIdstring
Required

The app ID provided by Agora to each developer. After creating a project in Agora Console, you can get an app ID. The app ID is a unique identifier for a project.

Header Parameters

X-Request-IDstring

The UUID (Universally Unique Identifier) of the request. After you pass in this field, the Agora server returns this field in the response header. It is recommended to assign X-Request-ID a value. If omitted, the Agora server automatically generates a UUID and returns it.

Request Body

application/json

settingsobject
Required
defaultStreamTemplatestring
Required

The flow configuration template ID to apply globally.

Response Body

The request succeeded and set the global template.

Response Headers

X-Request-IDstring

The UUID (Universally Unique Identifier) of the request. The value is in the X-Request-ID response header. If a request error occurs, print the value in the log to troubleshoot the problem.

Example
6d35d43f-f4c5-4b3a-9df4-8f0d7e1d5f0a
statusstring

The status of this request. success means the request succeeds.

Authorization

This endpoint requires authentication.

basicAuthhmacAuth

Request examples

curl --location -g --request PUT 'https://api.agora.io/{{region}}/v1/projects/{{appId}}/rtls/ingress/appconfig' \--data '{    "settings": {        "defaultStreamTemplate": "720p"    }}'

Response example

{  "status": "success"}