Delete template
Updated
Deletes a Media Gateway flow configuration template.
https://api.agora.io/{region}/v1/projects/{appId}/rtls/ingress/stream-templates/{templateId}This method deletes a flow configuration template.
Note
- After deletion, the stream currently being pushed using the template will not be affected and will still be pushed according to the template parameters. Deletion will take effect from the next push, including normal push and disconnection/reconnection).
- If the template associated with the streaming key is deleted, the global template under the app ID will be used by default. If no global template is configured, streaming will be performed according to the no-template setting, that is, video transcoding will not be enabled.
Path Parameters
regionstringRegion 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
regionvalue is the same as for the input source stream. - The domain names for setting the
regionparameter and streaming are the same. - The
regionvalue is in lowercase.
appIdstringThe 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.
templateIdstringThe flow configuration template ID. The value can contain only lowercase letters, uppercase letters, and numbers, and cannot exceed 12 bytes. Set the value according to your business use case. For example, use "720p" and "1080p" for different target resolutions, or "gameA" and "gameB" for different game use cases.
Header Parameters
X-Request-IDstringThe 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.
Response Body
The request succeeded and deleted the template.
Response Headers
statusstringThe status of this request. success means the request succeeds.
For details about possible response status codes, see Response status codes.
If the status code is not 200, the request fails. See the message field in the response body for the reason for this failure.
If the status code is 200, the request succeeds, and the response body includes the following parameters:
Note
For a 401 (Unauthorized) response, the response header does not include X-Request-ID.
Response example
The following is a response example for a successful request:
Info
To explore the RESTful API parameters, obtain sample code in various client languages, or test Media Gateway requests, refer to the Postman API reference.
Request examples
curl --location -g --request DELETE 'https://api.agora.io/{{region}}/v1/projects/{{appId}}/rtls/ingress/stream-templates/{{templateId}}'Response example
{ "status": "success"}