Media Push
rtmp-converters lifecycle and Media Push endpoints.
Group overview
Generated at build time from the public REST API definition: tag media-push, 5 operations (out of 189). For authentication, envelope and pagination conventions see REST API overview.
| Method | Path | Summary |
|---|---|---|
GET | /v1/projects/{appId}/rtmp-converters | List the converters of a project |
POST | /{region}/v1/projects/{appId}/rtmp-converters | Create a Media Push converter |
GET | /{region}/v1/projects/{appId}/rtmp-converters/{converterId} | Get the streaming status of a converter |
PATCH | /{region}/v1/projects/{appId}/rtmp-converters/{converterId} | Update a converter |
DELETE | /{region}/v1/projects/{appId}/rtmp-converters/{converterId} | Destroy a converter |
Operation details
GET /v1/projects/{appId}/rtmp-converters
List the converters of a project
Authentication: project credentials (Base64 of customerId:customerSecret)
Parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
appId | path | is | string | pattern ^[a-f0-9]{32}$ |
cursor | query | string | ||
channel | query | string |
Response
| Status codes | Description / schema |
|---|---|
200 | converters — object{ success, 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/v1/projects/appId/rtmp-converters?cursor=value&channel=value" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"POST /{region}/v1/projects/{appId}/rtmp-converters
Create a Media Push converter
Creates a converter that pushes one RTC channel to a CDN address. Use transcodeOptions for the transcoded mode and rawOptions for passthrough; the converter starts connecting and keeps pushing until it is destroyed or idles out.
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}$ |
regionHintIp | query | string | format ipv4 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
converter | object{ name, rtmpUrl, idleTimeout, jitterBufferSizeMs, transcodeOptions, rawOptions } | is |
{
"converter": {
"rtmpUrl": "string",
"name": "demo",
"idleTimeout": 1
}
}Response
| Status codes | Description / schema |
|---|---|
200 | converter created — object{ converter, fields } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
409 | a converter with the same name already exists — 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/rtmp-converters?regionHintIp=value" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"converter":{"rtmpUrl":"string","name":"demo","idleTimeout":1}}'GET /{region}/v1/projects/{appId}/rtmp-converters/{converterId}
Get the streaming status of a converter
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}$ |
converterId | path | is | string | length 0..128 |
Response
| Status codes | Description / schema |
|---|---|
200 | converter — object |
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/rtmp-converters/converterId" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"PATCH /{region}/v1/projects/{appId}/rtmp-converters/{converterId}
Update a converter
Updates the push destination, the transcoding options or the jitter buffer. Name, idle timeout, the RTC channel and the audio/codec profile are immutable, as documented.
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}$ |
converterId | path | is | string | length 0..128 |
sequence | query | integer | >= 0 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
converter | object{ rtmpUrl, jitterBufferSizeMs, transcodeOptions, rawOptions } |
{
"converter": {
"rtmpUrl": "string",
"jitterBufferSizeMs": 1,
"transcodeOptions": {}
}
}Response
| Status codes | Description / schema |
|---|---|
200 | converter updated — object{ converter, fields } |
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/rtmp-converters/converterId?sequence=0" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"converter":{"rtmpUrl":"string","jitterBufferSizeMs":1,"transcodeOptions":{}}}'DELETE /{region}/v1/projects/{appId}/rtmp-converters/{converterId}
Destroy a converter
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}$ |
converterId | path | is | string | length 0..128 |
Response
| Status codes | Description / schema |
|---|---|
200 | the request succeeded; the response body is empty |
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/rtmp-converters/converterId" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"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 |