Control

Act on a window

Focus, raise, minimize, maximize, unmaximize, close, move or resize one window. On a Wayland desktop a tiled window cannot be moved or resized — float it first — and an action the compositor refuses is a 400. If the guest accepts the action but does not report its result before the deadline, this answers 504 without a reason. The action may already have happened, so do not treat that uncertain outcome as permission to repeat it. An image without the window tools (xdotool on an X11 desktop, python3 on a Wayland one) answers 400 with reason: "unsupported": listing its windows still works, and acting on them needs a computer created from an image that includes the tool. Do not retry it.

A suspended computer is resumed to act on the window, after the action, the window id and the guest OS have been checked: a malformed action, or any action on a Windows guest, is refused without resuming or billing it.

Requires the member role or higher.

post/computers/{id}/windows/{window}

Request

  • Base URL: https://app.mandala.computer/api/v1
  • URL: https://app.mandala.computer/api/v1/computers/{id}/windows/{window}
  • Auth: HTTP bearer

Path parameters

idstring required

The computer id.

windowstring required

A window id from GET /computers/{id}/windows.

Request body

actionstring required

focus, raise, minimize, maximize, unmaximize, close, move or resize.

xinteger

Required for move, with y: -32768 to 32767. One without the other is a 400.

yinteger

Required for move, with x: -32768 to 32767.

widthinteger

Required for resize, with height: 1 to 32767. One without the other is a 400.

heightinteger

Required for resize, with width: 1 to 32767.

Response

What the window is now, or that it has gone.

okboolean
goneboolean

The window closed. This is what separates the two outcomes that have no window to show: true means it is gone, which is what a close is for, while false with no window means the action happened and the guest could not describe the result.

Changes

No recorded changes to this operation across all 1 revision of this API.