desktop

One mouse, keyboard or window action on the desktop.

move {x,y}; click {x?,y?,button?,double?}; mouseDown/mouseUp {button?}; drag {from,to}; scroll {dy,dx?,x?,y?}; type {text}; key {keys}; cursor; windows; focus {windowId}; open {url}; launch {argv}; status.

post/v1/sandboxes/{id}/desktop:act

Request

  • Base URL: https://api.withruntime.com
  • URL: https://api.withruntime.com/v1/sandboxes/{id}/desktop:act
  • Auth: HTTP bearer

Path parameters

idstring required

Resource identifier (UUID).

Headers

Idempotency-Keystring

Replaying the same key with the same request within 24 hours returns the first result and never repeats the effect. A refusal is not kept: a request refused before it ran (no_capacity, busy, a limit) runs afresh when sent again with its key. The SDKs send one automatically; the server makes one when absent and returns it in the idempotency-key response header.

Request body

action'move' | 'click' | 'mouseDown' | 'mouseUp' | 'drag' | 'scroll' | 'type' | 'key' | 'cursor' | 'windows' | 'focus' | 'open' | 'launch' | 'status' required

What to do. See each field for which actions use it.

xinteger
yinteger
button'left' | 'middle' | 'right'
doubleboolean

click: a double click.

frominteger[]

drag: [x, y] to press at.

tointeger[]

drag: [x, y] to release at.

dyinteger

scroll: wheel clicks, positive is down.

dxinteger

scroll: wheel clicks, positive is right.

textstring

type: the text to type.

delayMsinteger

type: pause between keystrokes.

keysstring

key: xdotool names, e.g. "ctrl+l", "Return", "alt+Tab".

windowIdstring

focus: an id from the window list.

urlstring

open: an http(s) address to open in Chromium.

argvstring[]

launch: a program and its arguments.

Response

Success

object required

{ok: true}, or what was asked for: cursor {x, y}, windows {data}.

Changes

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