curl --request POST \
--url https://guidinghand.ai/v1/start_states/{start_state_id}/open \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/start_states/{start_state_id}/open', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/start_states/{start_state_id}/open"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"object": "start_state",
"start_state_id": "ss_0aQ3Vb7sT2Lc",
"kind": "image",
"name": "Printer offline",
"description": "<string>",
"from": "win10-22h2",
"method": "hand",
"script": "<string>",
"instruction": "<string>",
"agent_id": "<string>",
"task_id": "<string>",
"status": "building",
"version": 123,
"os": "windows",
"labels": [
"vm"
],
"runner_id": "<string>",
"error": "<string>",
"view": {
"screen_url": "<string>",
"input_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"metadata": {
"customer_id": "cus_42"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}Open a start state
Boots a machine from its current version, to look at or change by hand (status: open, and view). It closes itself after 2 hours without input. Needs the admin role or an API key.
curl --request POST \
--url https://guidinghand.ai/v1/start_states/{start_state_id}/open \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/start_states/{start_state_id}/open', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/start_states/{start_state_id}/open"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"object": "start_state",
"start_state_id": "ss_0aQ3Vb7sT2Lc",
"kind": "image",
"name": "Printer offline",
"description": "<string>",
"from": "win10-22h2",
"method": "hand",
"script": "<string>",
"instruction": "<string>",
"agent_id": "<string>",
"task_id": "<string>",
"status": "building",
"version": 123,
"os": "windows",
"labels": [
"vm"
],
"runner_id": "<string>",
"error": "<string>",
"view": {
"screen_url": "<string>",
"input_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"metadata": {
"customer_id": "cus_42"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}Authorizations
An org API key (gh_live_…) from Settings → API keys in the console.
Path Parameters
The start state’s id (ss_…), or an image’s id (e.g. win10-22h2).
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).
"ss_0aQ3Vb7sT2Lc"
image, state "Printer offline"
The image or start state it was made from (null for an image).
"win10-22h2"
How it was set up: by hand on its open machine, by a script, or by a GuidingHand task.
hand, script, instruction, null The agent that ran the instruction.
With method: instruction: the task that set it up.
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.
building, open, saving, ready, failed Goes up by one with each save; 0 until first saved. A test run uses the version current when it was created.
"windows"
Where it can run: its runner’s labels.
["vm"]
The runner that holds its disk (null for an image: any runner that has it).
While its machine is open.
Show child attributes
Show child attributes
Your own ids and labels (e.g. a ticket or customer id), returned as given.
Show child attributes
Show child attributes
{ "customer_id": "cus_42" }