Application Command
Executes a command on an application.
Request
| Property | Value |
|---|---|
| Method | POST |
| URL | /api/applications/{appName}/command |
| Content-Type | application/json |
| Authentication | Bearer Token |
Request
curl -X POST "{BASE_URL}/api/applications/{appName}/command" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
appName | string | Yes | Application name |
Request
curl -X POST "{BASE_URL}/api/applications/{appName}/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) |
data.attributes.newApplicationName | string | No | New application name (required for renameApplication and copyApplication) |
Available Commands
| Command | Description | Additional Parameters |
|---|---|---|
kickViewers | Disconnects all viewers from the application | - |
shutdownStreams | Stops all active streams in the application | - |
restartApplication | Restarts the application | - |
renameApplication | Renames the application | newApplicationName |
copyApplication | Creates a copy of the application | newApplicationName |
deleteApplication | Deletes the application | - |
Example Request (Kick Viewers)
{
"data": {
"attributes": {
"command": "kickViewers"
}
}
}
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": 9,
"generatedAt": 1766063979156
},
"message": "All viewers has been kicked out"
}
Error Responses
Application Not Found (404)
Application Name Already Exists (409)
| Parameter | Type | Description |
|---|---|---|
message | string | Human-readable error message |
{
"message": "Application not found"
}
{
"message": "Application \"edge\" already exists"
}
Support Needed?
Create a free ticket and our support team will provide you necessary assistance.