nimeet 文档中心
English

Media Gateway(RTLS Ingress)

构建时从公开 REST 接口定义的 `media-gateway` 标签生成:方法、路径、参数、请求体、响应与 curl。

由公开 REST 接口定义生成

版本 v1.1.0 · 更新于 2026-10-26 · 修订 1

分组概览

本页由公开 REST 接口定义在构建时生成:标签 media-gateway,共 12 个操作(全量 189 个)。鉴权、信封与分页约定见 REST API 总览.

方法路径摘要
POST/v1/projects/{appId}/rtls/ingress/online-streams/mute/{sid}Mute or unmute one ingress stream
PUT/{region}/v1/projects/{appId}/rtls/ingress/appconfigSet the global flow configuration template
GET/{region}/v1/projects/{appId}/rtls/ingress/online-streamsQuery 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/streamkeysCreate 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

操作详情

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.

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
appIdpath是stringpattern ^[a-f0-9]{32}$
sidpath是string长度 0..128

响应

状态码说明 / schema
200the mute command was executed — object{ status }

调用示例

bash
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

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$

请求体

字段类型必填说明
settingsobject{ defaultStreamTemplate }是
json
{
  "settings": {
    "defaultStreamTemplate": "string"
  }
}

响应

状态码说明 / schema
200the global template was set — object{ status }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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.

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$
channelquerystring

响应

状态码说明 / schema
200online streams — object{ status, data }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$
sidpath是string长度 0..128

响应

状态码说明 / schema
200the session — object{ status, data }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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.

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$
sidpath是string长度 0..128

响应

状态码说明 / schema
200the disconnection command was executed — object{ status }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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.

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$
templateIdpath是stringpattern ^[A-Za-z0-9]{1,12}$

请求体

字段类型必填说明
settingsobject{ transcoding, jitterBuffer }是
json
{
  "settings": {
    "transcoding": {},
    "jitterBuffer": {}
  }
}

响应

状态码说明 / schema
200the template was stored — object{ status }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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.

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$
templateIdpath是stringpattern ^[A-Za-z0-9]{1,12}$

请求体

字段类型必填说明
settingsobject{ transcoding, jitterBuffer }是
json
{
  "settings": {
    "transcoding": {},
    "jitterBuffer": {}
  }
}

响应

状态码说明 / schema
200the template was updated — object{ status }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$
templateIdpath是stringpattern ^[A-Za-z0-9]{1,12}$

响应

状态码说明 / schema
200the template was deleted — object{ status }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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.

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$

请求体

字段类型必填说明
settingsobject{ channel, uid, expiresAfter, templateId }是
json
{
  "settings": {
    "expiresAfter": 1,
    "channel": "string",
    "uid": "10001"
  }
}

响应

状态码说明 / schema
200the created streaming key — object{ status, data }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$
streamkeypath是string长度 0..255

响应

状态码说明 / schema
200the streaming key — object{ status, data }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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.

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
appIdpath是stringpattern ^[a-f0-9]{32}$
streamkeypath是string长度 0..255

响应

状态码说明 / schema
200the key was revoked — object{ status }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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.

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
regionpath是enum(cn | ap | na | eu)
versionpath是enum(v1)
appIdpath是stringpattern ^[a-f0-9]{32}$
sidpath是string长度 0..128

请求体

字段类型必填说明
settingsobject{ videoMuted, audioMuted }是
json
{
  "settings": {
    "videoMuted": true,
    "audioMuted": true
  }
}

响应

状态码说明 / schema
200the mute command was executed — object{ status }
400Invalid parameter — Error
401Missing/invalid credentials — Error
403Banned or service not enabled — Error
404Resource not found — Error
415Content-Type must be application/json — Error
429Quota exceeded — Error

调用示例

bash
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}}'

本分组用到的 Schema

Error — object{ code, message, reason, sdkCode, details }
字段类型必填说明
codestring是stable machine code, see errors.json
messagestring是
reasonstring
sdkCodeintegerAgora-aligned client error number
detailsobject

本页由文档构建流水线生成 · 2026-10-31 01:24:02 UTC · 文档中心 v1.1.0.

内容依据公开 API 定义.

ni-meet 是自建 RTC PaaS,媒体面基于 LiveKit(Apache-2.0),并与声网 API 兼容。