Executes a command on an application.
| Property | Value |
|---|---|
| Method | POST |
| URL | /api/applications/{appName}/command |
| Content-Type | application/json |
| Authentication | Bearer Token |
| Parameter | Type | Required | Description |
|---|---|---|---|
appName |
string | Yes | Application name |
| 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) |
| 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 | - |
{
"data": {
"attributes": {
"command": "kickViewers"
}
}
}
{
"data": {
"attributes": {
"command": "shutdownStreams"
}
}
}
{
"data": {
"attributes": {
"command": "restartApplication"
}
}
}
{
"data": {
"attributes": {
"command": "renameApplication",
"newApplicationName": "new-app-name"
}
}
}
{
"data": {
"attributes": {
"command": "copyApplication",
"newApplicationName": "app-copy"
}
}
}
{
"data": {
"attributes": {
"command": "deleteApplication"
}
}
}
| Code | Description |
|---|---|
| 200 | Success - Command executed |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing token |
| 404 | Not Found - Application does not exist |
| 409 | Conflict - Application name already exists (for rename/copy) |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
{
"meta": {
"executionTime": 9,
"generatedAt": 1766063979156
},
"message": "All viewers has been kicked out"
}
| Parameter | Type | Description |
|---|---|---|
message |
string | Response status message |
| Parameter | Type | Description |
|---|---|---|
meta.executionTime |
integer | Request processing time in milliseconds |
meta.generatedAt |
integer | Response generation timestamp (Unix timestamp in ms) |
{
"message": "Application not found"
}
{
"message": "Application \"edge\" already exists"
}
| Parameter | Type | Description |
|---|---|---|
message |
string | Human-readable error message |