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

Path Parameters

Parameter Type Required Description
appName string Yes Application name

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"
    }
  }
}

Example Request (Shutdown Streams)

{
  "data": {
    "attributes": {
      "command": "shutdownStreams"
    }
  }
}

Example Request (Restart Application)

{
  "data": {
    "attributes": {
      "command": "restartApplication"
    }
  }
}

Example Request (Rename Application)

{
  "data": {
    "attributes": {
      "command": "renameApplication",
      "newApplicationName": "new-app-name"
    }
  }
}

Example Request (Copy Application)

{
  "data": {
    "attributes": {
      "command": "copyApplication",
      "newApplicationName": "app-copy"
    }
  }
}

Example Request (Delete Application)

{
  "data": {
    "attributes": {
      "command": "deleteApplication"
    }
  }
}

Response

Status Codes

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

Successful Response (200)

{
  "meta": {
    "executionTime": 9,
    "generatedAt": 1766063979156
  },
  "message": "All viewers has been kicked out"
}

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)

Error Responses

Application Not Found (404)

{
  "message": "Application not found"
}

Application Name Already Exists (409)

{
  "message": "Application \"edge\" already exists"
}

Error Response Body

Parameter Type Description
message string Human-readable error message