Skip to main content
POST
Drag mouse
Presses the left mouse button at the start coordinate, moves to the end coordinate, and releases. The drag is one continuous motion; there is no way to set its speed, and on Linux the button is always the left one.
On a Windows computer the response is {"ok": true}, an optional button field (left, right, or middle) picks the button, and ?screen= is ignored.

Path parameters

string
required
Computer ID (UUID). An instance_id is not accepted here and fails with 500.

Query parameters

string
Which screen to drag on. Optional. Omit it to act on the screen the computer booted with. An unknown id returns 404 rather than falling back to the default screen.

Body parameters

All four coordinates are required, and each must be a non-negative integer. 0 is a valid coordinate. A missing, negative, or non-integer coordinate returns 400.
integer
required
X coordinate the drag starts at, in pixels from the left edge.
integer
required
Y coordinate the drag starts at, in pixels from the top edge.
integer
required
X coordinate the drag ends at, in pixels from the left edge.
integer
required
Y coordinate the drag ends at, in pixels from the top edge.

Response

boolean
Always true on a 200. A failed drag is an error status.
string
Always drag.
object
Echo of the four coordinates that were used.
null
Always null on a 200.
null
Always null on a 200.

Example

Response

Errors

Every failure raised after the request leaves the API layer also carries a request_id. Quote it in support requests. When the computer agent itself answered non-2xx, the body additionally carries upstream_status.

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Path Parameters

id
string
required

Computer ID

Query Parameters

screen
string

Which screen to act on. Omit for the boot screen. An unknown id returns 404 rather than falling back.

Body

application/json

On Linux the drag always uses the left button. There is no speed setting. Each coordinate must be a non-negative integer: 0 is a valid coordinate, and a missing, negative, or non-integer coordinate is rejected with 400.

start_x
integer
required

X coordinate the drag starts at, in pixels from the left edge. A non-negative integer.

Required range: x >= 0
start_y
integer
required

Y coordinate the drag starts at, in pixels from the top edge. A non-negative integer.

Required range: x >= 0
end_x
integer
required

X coordinate the drag ends at, in pixels from the left edge. A non-negative integer.

Required range: x >= 0
end_y
integer
required

Y coordinate the drag ends at, in pixels from the top edge. A non-negative integer.

Required range: x >= 0

Response

Drag performed

success
boolean

Always true on a 200. A failed action is an error status.

Example:

true

action
string

The action performed: click, mouse_move, drag, type, key_press, scroll, or wait.

details
object

Echo of what was performed. Its fields depend on the action.

error
null

Always null on a 200.

error_type
null

Always null on a 200.