Cluster Stream Command
Executes a command on a specific stream.
Request
| Property | Value |
|---|---|
| Method | POST |
| URL | /api/cluster/streams/{streamKey}/command |
| Content-Type | application/json |
| Authentication | Bearer Token |
Request
curl -X POST "{BASE_URL}/api/cluster/streams/{streamKey}/command" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
streamKey | string | Yes | Unique identifier of the stream |
Request
curl -X POST "{BASE_URL}/api/cluster/streams/{streamKey}/command" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
data.attributes.command | string | Yes | Command to execute (see available commands below) |
Available Commands
| Command | Description |
|---|---|
delete | Removes the stream and disconnects all sources |
propagate | Distributes the stream to all configured destinations |
reorder | Reorders stream sources by priority (uses different request body) |
Reorder Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
data.attributes.streamKey | string | Yes | Unique identifier of the stream |
data.attributes.sourceList | string[] | Yes | Ordered array of source IDs (first = highest priority) |
Example: Delete / Propagate
{
"data": {
"attributes": {
"command": "delete"
}
}
}
Example: Reorder Sources
{
"data": {
"attributes": {
"streamKey": "test",
"sourceList": [
"cs_ec2z7mfjmhzlrvg8",
"cs_ec2z7mfjmhzlrvg8"
]
}
}
}
Response Body
| Parameter | Type | Description |
|---|---|---|
message | string | Response status message |
Metadata
| Parameter | Type | Description |
|---|---|---|
meta.executionTime | integer | Request processing time in milliseconds |
meta.generatedAt | integer | Response generation timestamp (Unix timestamp in ms) |
Successful Response (200)
{
"meta": {
"executionTime": 15,
"generatedAt": 1770287210383
},
"message": "Stream has been deleted"
}
Error Responses
| Parameter | Type | Description |
|---|---|---|
message | string | Human-readable error message |
Stream Not Found (404)
{
"message": "Stream not found"
}
Other Errors (4xx/5xx)
{
"message": "Error message"
}
Support Needed?
Create a free ticket and our support team will provide you necessary assistance.