Skip to main content
POST
Create a start state

Authorizations

Authorization
string
header
required

An org API key (gh_live_…) from Settings → API keys in the console.

Body

application/json

With script, the runner boots from, runs it and saves the machine. With instruction, a GuidingHand task with that prompt sets it up, then it’s saved. With neither, the machine boots and stays open for someone to set it up by hand.

name
string
required
Required string length: 1 - 200
from
string
required

An image (e.g. win10-22h2) or a start state to start from.

script
string

Runs elevated, as the signed-in user.

Maximum string length: 100000
instruction
string

A prompt for a GuidingHand task that sets the machine up.

Maximum string length: 8000
agent_id
string
default:default

The agent for instruction.

description
string
metadata
object

Your own ids and labels (e.g. a ticket or customer id), returned as given.

Example:

Response

OK

A machine to start each try from: a runner’s base OS install (kind: image, read-only, every org sees it) or a saved machine made from one (kind: state).

object
any
start_state_id
string
Example:

"ss_0aQ3Vb7sT2Lc"

kind
enum<string>
Available options:
image,
state
name
string
Example:

"Printer offline"

description
string
from
string | null

The image or start state it was made from (null for an image).

Example:

"win10-22h2"

method
enum<string> | null

How it was set up: by hand on its open machine, by a script, or by a GuidingHand task.

Available options:
hand,
script,
instruction,
null
script
string | null
instruction
string | null
agent_id
string | null

The agent that ran the instruction.

task_id
string | null

With method: instruction: the task that set it up.

status
enum<string>

building: its script or instruction is running. open: its machine is running for someone to set up or look at. saving, then ready. failed: see error.

Available options:
building,
open,
saving,
ready,
failed
version
integer

Goes up by one with each save; 0 until first saved. A test run uses the version current when it was created.

os
string
Example:

"windows"

labels
string[]

Where it can run: its runner’s labels.

Example:
runner_id
string | null

The runner that holds its disk (null for an image: any runner that has it).

error
string | null
view
object | null

While its machine is open.

metadata
object

Your own ids and labels (e.g. a ticket or customer id), returned as given.

Example:
created_at
string<date-time> | null
updated_at
string<date-time> | null