HTTP screen

The OpenAPI 3.1 document is generated beside this preview as openapi.json. Schemas document current behavior; they never validate runtime requests. The built-in server is loopback/host-guarded and has no authentication.

captureScreen

Capture the device screen

captureScreen description

Captures a screenshot of a registered device and writes it to a file on the server host. The device is selected by ID, IP address or name, or defaults to the active device; host and password fields are ignored. Devices are captured over ECP, except that RCE devices, and a device whose ECP capture endpoint is missing when a developer password is stored, are captured through the device's installer; source reports which was used. The response includes the image as base64 together with its mimeType unless returnImage is false. A format other than png or jpeg, a non-string output or device, or a non-boolean returnImage answers 400 VALIDATION_ERROR. An unknown device or no active device answers 404 DEVICE_NOT_FOUND. A device that is not running, an installer that took no screenshot because no sideloaded app is in the foreground, and a missing developer password for an installer capture answer 409. Any other failure answers 500 SCREEN_CAPTURE_ERROR.

captureScreen contract

POST /api/screen/capture

Responses: 200, 400, 404, 409, 500; middleware can also return 403, 408 or 429.

captureScreen see also

captureScreen body.format

Image format, png or jpeg; defaults to png.

captureScreen body.output

Output file or directory, resolved against the server's project root; a file's extension is corrected to match format, and omitted uses the configured screenshot directory or the project root with a timestamped file name.

captureScreen body.device

Registered device ID, IP address or name; omitted uses the active device.

captureScreen body.returnImage

Include the base64 image and its mimeType in the response; defaults to true.


Did this page help you?