API

AgentComputer

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/computer/connect create Private computer connection
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/computer/egress create Short-lived private browser egress connection
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/computer/start create Agent workspace
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/computer/frame load Current computer frame

Fields

Field Type Required Description

create

POST /api/v1/organizations/{organization_id}/agents/{id}/spark/computer/connect

Operation ID: spark_computer_connect_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Private computer connection

application/json

Property Type Required Description
credentials object No
credentials.password string Yes
credentials.username string Yes
expires_at string,null (date-time) Yes
kind enum: desktop No
platform enum: linux, macos No
state enum: starting, ready Yes
url string,null Yes
202: Preparing computer control

application/json

Property Type Required Description
credentials object No
credentials.password string Yes
credentials.username string Yes
expires_at string,null (date-time) Yes
kind enum: desktop No
platform enum: linux, macos No
state enum: starting, ready Yes
url string,null Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/organizations/{organization_id}/agents/{id}/spark/computer/egress

Operation ID: spark_computer_egress_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Request body

application/json

Property Type Required Description
prepare boolean Yes

Responses

200: Short-lived private browser egress connection

application/json

Property Type Required Description
credentials object No
credentials.password string Yes
credentials.username string Yes
expires_at string,null (date-time) Yes
kind enum: desktop No
platform enum: linux, macos No
state enum: starting, ready Yes
url string,null Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/organizations/{organization_id}/agents/{id}/spark/computer/start

Operation ID: spark_computer_start_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Agent workspace

application/json

Property Type Required Description
browser_egress object No
browser_egress.connected boolean Yes
browser_egress.enabled boolean Yes
can_control boolean Yes Whether the viewer may control the shared computer.
can_open_terminal boolean No Whether the viewer may open the shared computer's terminal.
can_start boolean Yes
fleet object No
fleet.agent_minutes_per_hour number Yes
fleet.agent_minutes_this_period number Yes
fleet.machines array of object Yes
fleet.machines[].cpu_count integer,null Yes
fleet.machines[].disk_mb integer,null Yes
fleet.machines[].id string Yes
fleet.machines[].kind enum: agent, thread Yes
fleet.machines[].memory_mb integer,null Yes
fleet.machines[].name string Yes
fleet.machines[].state enum: running, standby, starting, failed, stopped, not_started, ... Yes
fleet.machines[].threads array of object Yes
fleet.machines[].threads[].id string Yes
fleet.machines[].threads[].title string Yes
fleet.minute_unit enum: spark_2x No When set, both minute fields report Spark-2x compute minutes.
fleet.period_started_at string (date-time) Yes
fleet.rate_is_partial boolean No
fleet.running_count integer Yes
fleet.standby_count integer No
fleet.unchecked_count integer Yes
fleet.unknown_count integer No
fleet.workspace_count integer No
processes array of object Yes
processes[].id string Yes
processes[].name string Yes
processes[].started_at string,null Yes
processes[].status string Yes
state enum: not_started, starting, ready, failed Yes
usage object No
usage.memory_total_mb integer Yes
usage.samples array of object Yes
usage.samples[].at string (date-time) Yes
usage.samples[].cpu_percent number,null Yes
usage.samples[].memory_used_mb integer Yes
202: Agent workspace

application/json

Property Type Required Description
browser_egress object No
browser_egress.connected boolean Yes
browser_egress.enabled boolean Yes
can_control boolean Yes Whether the viewer may control the shared computer.
can_open_terminal boolean No Whether the viewer may open the shared computer's terminal.
can_start boolean Yes
fleet object No
fleet.agent_minutes_per_hour number Yes
fleet.agent_minutes_this_period number Yes
fleet.machines array of object Yes
fleet.machines[].cpu_count integer,null Yes
fleet.machines[].disk_mb integer,null Yes
fleet.machines[].id string Yes
fleet.machines[].kind enum: agent, thread Yes
fleet.machines[].memory_mb integer,null Yes
fleet.machines[].name string Yes
fleet.machines[].state enum: running, standby, starting, failed, stopped, not_started, ... Yes
fleet.machines[].threads array of object Yes
fleet.machines[].threads[].id string Yes
fleet.machines[].threads[].title string Yes
fleet.minute_unit enum: spark_2x No When set, both minute fields report Spark-2x compute minutes.
fleet.period_started_at string (date-time) Yes
fleet.rate_is_partial boolean No
fleet.running_count integer Yes
fleet.standby_count integer No
fleet.unchecked_count integer Yes
fleet.unknown_count integer No
fleet.workspace_count integer No
processes array of object Yes
processes[].id string Yes
processes[].name string Yes
processes[].started_at string,null Yes
processes[].status string Yes
state enum: not_started, starting, ready, failed Yes
usage object No
usage.memory_total_mb integer Yes
usage.samples array of object Yes
usage.samples[].at string (date-time) Yes
usage.samples[].cpu_percent number,null Yes
usage.samples[].memory_used_mb integer Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/organizations/{organization_id}/agents/{id}/spark/computer/frame

Operation ID: spark_computer_frame_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Responses

200: Current computer frame

application/json

The response is object.

image/jpeg

The response is string (binary).

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway