Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import CreateTemplate from '@docs/shared/media-gateway/reference/rest-api/endpoints/flow-configuration-template/create-reset-template.mdx';

export const toc = [{}];

<CreateTemplate PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<CreateTemplate PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import DeleteTemplate from '@docs/shared/media-gateway/reference/rest-api/endpoints/flow-configuration-template/delete-template.mdx';

export const toc = [{}];

<DeleteTemplate PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<DeleteTemplate PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import SetGlobalTemplate from '@docs/shared/media-gateway/reference/rest-api/endpoints/flow-configuration-template/set-global-template.mdx';

export const toc = [{}];

<SetGlobalTemplate PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<SetGlobalTemplate PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import UpdateTemplate from '@docs/shared/media-gateway/reference/rest-api/endpoints/flow-configuration-template/update-template.mdx';

export const toc = [{}];

<UpdateTemplate PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<UpdateTemplate PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import QueryIpAddress from '@docs/shared/media-gateway/reference/rest-api/endpoints/message-notification-service/query-ip-address.mdx';

export const toc = [{}];

<QueryIpAddress PRODUCT="Video Calling" COMPANY="Agora" PATH="video-calling" CLIENT="app" />
<QueryIpAddress PRODUCT="Video Calling" COMPANY="Agora" PATH="video-calling" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import ForceDisconnect from '@docs/shared/media-gateway/reference/rest-api/endpoints/streaming-information/force-disconnection.mdx';

export const toc = [{}];

<ForceDisconnect PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<ForceDisconnect PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import Mute from '@docs/shared/media-gateway/reference/rest-api/endpoints/streaming-information/mute.mdx';

export const toc = [{}];

<Mute />
<Mute />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import QueryStreamingInfo from '@docs/shared/media-gateway/reference/rest-api/endpoints/streaming-information/query-streaming-information.mdx';

export const toc = [{}];

<QueryStreamingInfo PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<QueryStreamingInfo PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import QueryStreamingList from '@docs/shared/media-gateway/reference/rest-api/endpoints/streaming-information/query-streaming-list.mdx';

export const toc = [{}];

<QueryStreamingList PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<QueryStreamingList PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import CreateStreamingKey from '@docs/shared/media-gateway/reference/rest-api/endpoints/streaming-key/create-streaming-key.mdx';

export const toc = [{}];

<CreateStreamingKey PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<CreateStreamingKey PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import DeleteStreamingKey from '@docs/shared/media-gateway/reference/rest-api/endpoints/streaming-key/delete-streaming-key.mdx';

export const toc = [{}];

<DeleteStreamingKey PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<DeleteStreamingKey PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ description: >

import QueryStreamingKeyInfo from '@docs/shared/media-gateway/reference/rest-api/endpoints/streaming-key/query-streaming-key-information.mdx';

export const toc = [{}];

<QueryStreamingKeyInfo PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
<QueryStreamingKeyInfo PRODUCT="Media Gateway" COMPANY="Agora" PATH="media-gateway" CLIENT="app" />
6 changes: 2 additions & 4 deletions shared/media-gateway/reference/rest-api/authorization.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
- HTTP Basic Authentication

Every time you send an HTTP request, you must pass in a credential in the `Authorization` field in the HTTP request header. See [RESTful Authentication](/media-gateway/reference/restful-authentication#implement-basic-http-authentication) on how to generate it.

- HTTP Basic Authentication

Basic authentication is a simple authentication scheme built into the HTTP protocol. To use it, send your HTTP requests with an `Authorization` header that contains the word Basic followed by a space and a base64-encoded string `username:password`.

Example: `Authorization: Basic ZGVtbzpwQDU1dzByZA==`

- HTTP HMAC Authentication

Every time you send an HTTP request, you must pass in an API key in the `Authorization` field in the HTTP request header. See [RESTful Authentication](/media-gateway/reference/restful-authentication#implement-hmac-http-authentication) on how to generate it.

Example: `Authorization: 123`

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,70 +1,128 @@
import Authorization from '@docs/shared/media-gateway/reference/rest-api/authorization.mdx';
import CodeBlock from '@theme/CodeBlock';
import PostmanLink from '@docs/shared/media-gateway/reference/rest-api/postman-link.mdx';
import RestAPILayout from '@site/src/components/rest-api/RestAPILayout';
import LeftColumn from '@site/src/components/rest-api/LeftColumn';
import RightColumn, { Section } from '@site/src/components/rest-api/RightColumn';
import ParameterList, { Parameter } from '@site/src/components/rest-api/ParameterList';
import PathParameter from '@site/src/components/rest-api/PathParameter';
import { Tabs, TabItem } from '@site/src/components/rest-api/Tabs';

This method deletes a flow configuration template.
<RestAPILayout>

### Prototype
<LeftColumn
title={frontMatter.title}
method="DELETE"
endpoint="https://api.agora.io/:region/v1/projects/:appId/rtls/ingress/stream-templates/:templateId"
>

- Method: `DELETE`
- Endpoint: `https://api.agora.io/:region/v1/projects/:appId/rtls/ingress/stream-templates/:templateId`
This method deletes a flow configuration template.

<Admonition type="info" title="Note"><ul><li>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).</li><li>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.</li></ul></Admonition>

### Request parameters

**Authentication**

<Authorization/>
### Request

**Path parameters**

| Parameter | Data type | Required/Optional | Description |
| :---------- | :------- |:----------------- | :---------------------- |
| `appId` | String | Required | The app ID provided by <Vg k="COMPANY"/> to each developer. After creating a project in <Vg k="CONSOLE"/>, you can get an app ID. The app ID is a unique identifier for a project. |
| `region` | String | Required | Create an area for pushing the streaming key. <Vg k="COMPANY"/> supports creation of stream keys by region. Currently, the following regions are supported: <ul><li>`na`: North America</li><li>`eu`: Europe</li><li>`ap`: Asia, except mainland China</li><li>`cn`: Mainland China</li></ul><Admonition type="caution" title="Important">Make sure that: <ul><li>The `region` value is the same as for the input source stream.</li><li>The domain names for setting the `region` parameter and streaming are the same. </li><li>The `region` value is in lowercase.</li></ul></Admonition>|
| `templateId` | String | Required | The flow configuration template ID. The value can only include the following characters: a-z, A-Z, 0-9, and the length cannot exceed 12 bytes. The value of the flow configuration template ID can be set according to your business use-case. For example, `"720p"` and `"1080p"` for different target resolutions, or `"gameA"` and `"gameB"`for different game use-cases.|
<PathParameter name="appId" type="string" required={true}>
The app ID provided by <Vg k="COMPANY"/> to each developer. After creating a project in <Vg k="CONSOLE"/>, you can get an app ID. The app ID is a unique identifier for a project.
</PathParameter>
<PathParameter name="region" type="string" required={true}>
Create an area for pushing the streaming key. <Vg k="COMPANY"/> supports creation of stream keys by region. Currently, the following regions are supported:
<ul>
<li><code>na</code>: North America</li>
<li><code>eu</code>: Europe</li>
<li><code>ap</code>: Asia, except mainland China</li>
<li><code>cn</code>: Mainland China</li>
</ul>
<Admonition type="caution" title="Important">
Make sure that:
<ul>
<li>The <code>region</code> value is the same as for the input source stream.</li>
<li>The domain names for setting the <code>region</code> parameter and streaming are the same.</li>
<li>The <code>region</code> value is in lowercase.</li>
</ul>
</Admonition>
</PathParameter>
<PathParameter name="templateId" type="string" required={true}>
The flow configuration template ID. The value can only include the following characters: a-z, A-Z, 0-9, and the length cannot exceed 12 bytes. The value of the flow configuration template ID can be set according to your business use-case. For example, `"720p"` and `"1080p"` for different target resolutions, or `"gameA"` and `"gameB"`for different game use-cases.
</PathParameter>

**Headers**

| Header | Data type | Description |
| :------------- | :------- |:----------------------- |
| `X-Request-ID` | String | The UUID (Universally Unique Identifier) of the request. After passing in this field, the <Vg k="COMPANY"/> server will return this field in the response header. It is recommended to assign `X-Request-ID` a value. If no value is assigned, the <Vg k="COMPANY"/> server will automatically generate a UUID and pass it in. |

### Request example

```shell
curl --location -g --request DELETE 'https://api.agora.io/{{region}}/v1/projects/{{appId}}/rtls/ingress/stream-templates/{{templateId}}'
```
<ParameterList title="HEADER" required={true}>
<Parameter name="X-Request-ID" type="string" required={true}>
The UUID (Universally Unique Identifier) of the request. After passing in this field, the <Vg k="COMPANY"/> server will return this field in the response header. It is recommended to assign `X-Request-ID` a value. If no value is assigned, the <Vg k="COMPANY"/> server will automatically generate a UUID and pass it in.
</Parameter>
<Parameter name="Authorization" type="string" required={true}>
<Authorization/>
</Parameter>
</ParameterList>

### Response parameters
### Response

**Headers**

| Header | Data type | Description |
| :------------- | :------- |:----------------------- |
| `X-Request-ID` | String | The UUID (Universally Unique Identifier) of the request. The value is in its `X-Request-ID` header. If a request error occurs, print the value in the log to troubleshoot the problem. A `401 (Unauthorized)` response status code means that there is no such field in the response header.|
<ParameterList title="HEADER" required={true}>
<Parameter name="X-Request-ID" type="string" required={true}>
The UUID (Universally Unique Identifier) of the request. The value is in its `X-Request-ID` header. If a request error occurs, print the value in the log to troubleshoot the problem. A `401 (Unauthorized)` response status code means that there is no such field in the response header.
</Parameter>
</ParameterList>

**Response body**

For details about possible response status codes, see [Response status codes](../../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:

| Parameter | Type | Description |
| :--------------- | :----- | :----------------------------------------------------------------- |
| `status` | String | The status of this request. `success` means the request succeeds. |

### Response example

The following is a response example for a successful request:
<ParameterList title="BODY" required={true}>
<Parameter name="status" type="string" required={true}>
The status of this request. <code>success</code> means the request succeeds.
</Parameter>
</ParameterList>

If the status code is not `200`, the request fails. See the `message` field in the response body for the reason for this failure. For details about possible response status codes, see [Response status codes](../../response-status-codes).

<PostmanLink />
</LeftColumn>
<RightColumn>
<Section title="Authorization">
The endpoint requires [RESTful Authentication](/media-gateway/reference/restful-authentication#implement-basic-http-authentication).
</Section>
<Section title="Request example">
<Tabs groupId="code-examples">
<TabItem value="cURL" label="cURL" default>
```shell
curl --location -g --request DELETE 'https://api.agora.io/{{region}}/v1/projects/{{appId}}/rtls/ingress/stream-templates/{{templateId}}'
```
</TabItem>
<TabItem value="node" label="Node" default>
```js
fetch(`https://api.agora.io/your-region/v1/projects/your-appId/rtls/ingress/stream-templates/your-templateId`, {
method: "DELETE",
headers: { "Accept": "application/json", "Authorization": "Basic <Base64EncodedCredentials>" }
})
.then(res => res.json())
.then(console.log)
.catch(console.error);
```
</TabItem>
<TabItem value="python" label="Python" default>
```python
url = "https://api.agora.io/your-region/v1/projects/your-appId/rtls/ingress/stream-templates/your-templateId"
headers = {"Accept": "application/json", "Authorization": "Basic <Base64EncodedCredentials>"}

res = requests.delete(url, headers=headers)
print(res.json() if res.status_code == 200 else res.text)
```
</TabItem>
</Tabs>
</Section>
<Section title="Response example">

```json
{
"status": "success"
}
```

<PostmanLink />
</Section>
</RightColumn>
</RestAPILayout>
Loading