Media Pull
Cloud player lifecycle and Media Pull endpoints.
Group overview
Generated at build time from the public REST API definition: tag media-pull, 6 operations (out of 189). For authentication, envelope and pagination conventions see REST API overview.
| Method | Path | Summary |
|---|---|---|
GET | /v1/projects/{appId}/cloud-player/players | List the cloud players of a project |
POST | /{region}/v1/projects/{appId}/cloud-player/players | Create a cloud player |
GET | /{region}/v1/projects/{appId}/cloud-player/players/{id} | Get one cloud player |
PATCH | /{region}/v1/projects/{appId}/cloud-player/players/{id} | Update a cloud player |
DELETE | /{region}/v1/projects/{appId}/cloud-player/players/{id} | Destroy a cloud player |
PATCH | /{region}/v1/projects/{appId}/cloud-player/{playerid} | Update a cloud player (legacy path spelling) |
Operation details
GET /v1/projects/{appId}/cloud-player/players
List the cloud players 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}$ |
filter | query | string | ||
pageSize | query | integer | 1..500,default 200 | |
pageToken | query | string |
Response
| Status codes | Description / schema |
|---|---|
200 | cloud players — object{ totalSize, players, fields, nextPageToken } |
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/cloud-player/players?filter=value&pageSize=0&pageToken=value" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"POST /{region}/v1/projects/{appId}/cloud-player/players
Create a cloud player
Creates a player that pulls an online media stream into an RTC channel as a user. The player is connecting until the injected participant is observed in the channel, then running.
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}$ |
streamIp | query | string | format ipv4 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
player | object | is |
{
"player": {
"streamUrl": "string",
"channelName": "weekly-sync",
"uid": 1,
"account": "string"
}
}Response
| Status codes | Description / schema |
|---|---|
200 | player created — object{ player, fields } |
400 | Invalid parameter — Error |
401 | Missing/invalid credentials — Error |
403 | Banned or service not enabled — Error |
404 | Resource not found — Error |
409 | a cloud player 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/cloud-player/players?streamIp=value" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"player":{"streamUrl":"string","channelName":"weekly-sync","uid":1,"account":"string"}}'GET /{region}/v1/projects/{appId}/cloud-player/players/{id}
Get one cloud player
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}$ |
id | path | is | string | length 0..128 |
Response
| Status codes | Description / schema |
|---|---|
200 | the cloud player — object{ player, 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 GET "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/cloud-player/players/weekly-sync_1a2b" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"PATCH /{region}/v1/projects/{appId}/cloud-player/players/{id}
Update a cloud player
Changes the source address, the transcoding options, the playback position or the paused state.
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}$ |
id | path | is | string | length 0..128 |
sequence | query | integer | >= 0 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
player | object{ streamUrl, audioOptions, videoOptions, seekPosition, isPause } |
{
"player": {
"streamUrl": "string",
"audioOptions": {},
"videoOptions": {}
}
}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 PATCH "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/cloud-player/players/weekly-sync_1a2b?sequence=0" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"player":{"streamUrl":"string","audioOptions":{},"videoOptions":{}}}'DELETE /{region}/v1/projects/{appId}/cloud-player/players/{id}
Destroy a cloud player
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}$ |
id | 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/cloud-player/players/weekly-sync_1a2b" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"PATCH /{region}/v1/projects/{appId}/cloud-player/{playerid}
Update a cloud player (legacy path spelling)
Documented legacy spelling of the player update; identical behaviour to /cloud-player/players/{id}.
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}$ |
playerid | path | is | string | length 0..128 |
sequence | query | integer | >= 0 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
player | object{ streamUrl, audioOptions, videoOptions, seekPosition, isPause } |
{
"player": {
"streamUrl": "string",
"audioOptions": {},
"videoOptions": {}
}
}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 PATCH "$NIMEET_API_BASE/cn-shanghai/v1/projects/appId/cloud-player/playerid?sequence=0" \
-H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
-H "Content-Type: application/json" \
-d '{"player":{"streamUrl":"string","audioOptions":{},"videoOptions":{}}}'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 |