Close a start state
curl --request POST \
--url https://guidinghand.ai/v1/start_states/{start_state_id}/close \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/start_states/{start_state_id}/close', 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}/close"
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>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Start states
Close a start state
Discards the open machine’s changes. A start state made by hand and never saved is deleted. Needs the admin role or an API key.
POST
/
v1
/
start_states
/
{start_state_id}
/
close
Close a start state
curl --request POST \
--url https://guidinghand.ai/v1/start_states/{start_state_id}/close \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/start_states/{start_state_id}/close', 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}/close"
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>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Authorizations
Path Parameters
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).