Media Gateway (RTLS Ingress)
Stream keys, templates, online streams and app configuration.
Group overview
Generated at build time from the public REST API definition: tag media-gateway, 12 operations (out of 189). For authentication, envelope and pagination conventions see REST API overview.
| Method | Path | Summary |
|---|---|---|
POST | /v1/projects/{appId}/rtls/ingress/online-streams/mute/{sid} | Mute or unmute one ingress stream |
PUT | /{region}/v1/projects/{appId}/rtls/ingress/appconfig | Set the global flow configuration template |
GET | /{region}/v1/projects/{appId}/rtls/ingress/online-streams | Query the online ingress streams |
GET | /{region}/v1/projects/{appId}/rtls/ingress/online-streams/{sid} | Query one ingress stream by SID |
DELETE | /{region}/v1/projects/{appId}/rtls/ingress/online-streams/{sid} | Force disconnect an ingress stream |
PUT | /{region}/v1/projects/{appId}/rtls/ingress/stream-templates/{templateId} | Create or reset a flow configuration template |
PATCH | /{region}/v1/projects/{appId}/rtls/ingress/stream-templates/{templateId} | Update a flow configuration template |
DELETE | /{region}/v1/projects/{appId}/rtls/ingress/stream-templates/{templateId} | Delete a flow configuration template |
POST | /{region}/v1/projects/{appId}/rtls/ingress/streamkeys | Create a streaming key |
GET | /{region}/v1/projects/{appId}/rtls/ingress/streamkeys/{streamkey} | Query a streaming key |
DELETE | /{region}/v1/projects/{appId}/rtls/ingress/streamkeys/{streamkey} | Delete a streaming key |
POST | /{region}/{version}/projects/{appId}/rtls/ingress/online-streams/mute/{sid} | Mute or unmute an ingress stream |
Operation details
POST /v1/projects/{appId}/rtls/ingress/online-streams/mute/{sid}
Mute or unmute one ingress stream
Same handler as the regional spellings (registerAliases in routes/rtmp-gateway.ts): settings are applied to the live session and the response is the Agora-style { status: 'success' } acknowledgement.
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
sid | path | is | string | length 0..128 |
Response
| Status codes | Description / schema |
|---|---|
200 | the mute command was executed — object{ status } |
Example call
curl -s -X POST "$NIMEET_API_BASE/v1/projects/appId/rtls/ingress/online-streams/mute/$SID" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"PUT /{region}/v1/projects/{appId}/rtls/ingress/appconfig
Set the global flow configuration template
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
settings | object{ defaultStreamTemplate } | is |
{
"settings": {
"defaultStreamTemplate": "string"
}
}Response
| Status codes | Description / schema |
|---|---|
200 | the global template was set — object{ status } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X PUT "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/appconfig" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"settings":{"defaultStreamTemplate":"string"}}'GET /{region}/v1/projects/{appId}/rtls/ingress/online-streams
Query the online ingress streams
Lists the sessions that are currently pushing. A session exists exactly while the publisher bound to a live stream key is inside the channel.
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
channel | query | string |
Response
| Status codes | Description / schema |
|---|---|
200 | online streams — object{ status, data } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X GET "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/online-streams?channel=value" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"GET /{region}/v1/projects/{appId}/rtls/ingress/online-streams/{sid}
Query one ingress stream by SID
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
sid | path | is | string | length 0..128 |
Response
| Status codes | Description / schema |
|---|---|
200 | the session — object{ status, data } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X GET "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/online-streams/$SID" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"DELETE /{region}/v1/projects/{appId}/rtls/ingress/online-streams/{sid}
Force disconnect an ingress stream
Kicks the publisher out of the channel through the media plane. Delete the streaming key first, otherwise the publisher reconnects with a new SID.
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
sid | path | is | string | length 0..128 |
Response
| Status codes | Description / schema |
|---|---|
200 | the disconnection command was executed — object{ status } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X DELETE "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/online-streams/$SID" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"PUT /{region}/v1/projects/{appId}/rtls/ingress/stream-templates/{templateId}
Create or reset a flow configuration template
Up to ten templates can exist under one app id. Reusing a template id resets it with the incoming settings.
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
templateId | path | is | string | pattern ^[A-Za-z0-9]{1,12}$ |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
settings | object{ transcoding, jitterBuffer } | is |
{
"settings": {
"transcoding": {},
"jitterBuffer": {}
}
}Response
| Status codes | Description / schema |
|---|---|
200 | the template was stored — object{ status } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X PUT "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/stream-templates/templateId" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"settings":{"transcoding":{},"jitterBuffer":{}}}'PATCH /{region}/v1/projects/{appId}/rtls/ingress/stream-templates/{templateId}
Update a flow configuration template
transcoding.video, transcoding.audio and jitterBuffer are independent: only the parts present in the body are replaced.
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
templateId | path | is | string | pattern ^[A-Za-z0-9]{1,12}$ |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
settings | object{ transcoding, jitterBuffer } | is |
{
"settings": {
"transcoding": {},
"jitterBuffer": {}
}
}Response
| Status codes | Description / schema |
|---|---|
200 | the template was updated — object{ status } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X PATCH "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/stream-templates/templateId" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"settings":{"transcoding":{},"jitterBuffer":{}}}'DELETE /{region}/v1/projects/{appId}/rtls/ingress/stream-templates/{templateId}
Delete a flow configuration template
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
templateId | path | is | string | pattern ^[A-Za-z0-9]{1,12}$ |
Response
| Status codes | Description / schema |
|---|---|
200 | the template was deleted — object{ status } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X DELETE "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/stream-templates/templateId" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"POST /{region}/v1/projects/{appId}/rtls/ingress/streamkeys
Create a streaming key
Authorises one (channel, uid) pair to push into the gateway, optionally bound to a flow configuration template and an expiry.
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
settings | object{ channel, uid, expiresAfter, templateId } | is |
{
"settings": {
"expiresAfter": 1,
"channel": "string",
"uid": "10001"
}
}Response
| Status codes | Description / schema |
|---|---|
200 | the created streaming key — object{ status, data } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X POST "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/streamkeys" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"settings":{"expiresAfter":1,"channel":"string","uid":"10001"}}'GET /{region}/v1/projects/{appId}/rtls/ingress/streamkeys/{streamkey}
Query a streaming key
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
streamkey | path | is | string | length 0..255 |
Response
| Status codes | Description / schema |
|---|---|
200 | the streaming key — object{ status, data } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X GET "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/streamkeys/streamkey" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"DELETE /{region}/v1/projects/{appId}/rtls/ingress/streamkeys/{streamkey}
Delete a streaming key
Revokes the key. An ongoing push is not interrupted; use force disconnect with its SID for that.
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
streamkey | path | is | string | length 0..255 |
Response
| Status codes | Description / schema |
|---|---|
200 | the key was revoked — object{ status } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X DELETE "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/streamkeys/streamkey" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"POST /{region}/{version}/projects/{appId}/rtls/ingress/online-streams/mute/{sid}
Mute or unmute an ingress stream
Applies to the current session only: the mute state resets when the publisher reconnects.
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
region | path | is | enum(cn | ap | na | eu) | |
version | path | is | enum(v1) | |
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
sid | path | is | string | length 0..128 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
settings | object{ videoMuted, audioMuted } | is |
{
"settings": {
"videoMuted": true,
"audioMuted": true
}
}Response
| Status codes | Description / schema |
|---|---|
200 | the mute command was executed — object{ status } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
415 | Content-Type must be application/json — Error |
429 | Quota exceeded — Error |
Example call
curl -s -X POST "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/rtls/ingress/online-streams/mute/$SID" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"settings":{"videoMuted":true,"audioMuted":true}}'Schemas used by this group
Error — object{ code, message, reason, sdkCode, details }
| Field | Type | Required | Description |
|---|---|---|---|
code | string | is | stable machine code, see errors.json |
message | string | is | |
reason | string | ||
sdkCode | integer | Agora-aligned client error number | |
details | object |