v1

latestOpenAPI 3.1.02026-07-175096.6 KB
Desktop

Execute a bash command on the desktop

Runs a bash command on the desktop and returns the command output

post/v1/desktop/{id}/bash-action

Path parameters

idstring required

Desktop instance ID to run the command on

Example:desktop_12345

Headers

x-api-keystring required

API key for authentication

Example:api_12345

Request body

commandstring required

Bash command to execute

Example request

{
  "command": "echo 'Hello, World!'"
}

Response

Command executed successfully. Response contains command output.

outputstring

Raw string output from the executed command (if any)

errorstring

Error message if the operation failed (also indicated by non-2xx HTTP status)

base64_imagestring

Base64 encoded JPEG image data (only returned for screenshot actions)

Example response

{
  "output": "X=500 Y=300",
  "error": "Command failed with code 1: xdotool: command not found",
  "base64_image": "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQ..."
}