Send input to an open start state
curl --request POST \
--url https://guidinghand.ai/v1/start_states/{start_state_id}/input \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"type": "click",
"x": 123,
"y": 123,
"button": "left"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [{type: 'click', x: 123, y: 123, button: 'left'}]})
};
fetch('https://guidinghand.ai/v1/start_states/{start_state_id}/input', 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}/input"
payload = { "events": [
{
"type": "click",
"x": 123,
"y": 123,
"button": "left"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"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>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}Start states
Send input to an open start state
Clicks, typing and keys, in order, through the hypervisor’s keyboard and mouse: they work on admin prompts too. Needs the admin role or an API key.
POST
/
v1
/
start_states
/
{start_state_id}
/
input
Send input to an open start state
curl --request POST \
--url https://guidinghand.ai/v1/start_states/{start_state_id}/input \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"type": "click",
"x": 123,
"y": 123,
"button": "left"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [{type: 'click', x: 123, y: 123, button: 'left'}]})
};
fetch('https://guidinghand.ai/v1/start_states/{start_state_id}/input', 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}/input"
payload = { "events": [
{
"type": "click",
"x": 123,
"y": 123,
"button": "left"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"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>"
]
}
}{
"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).
Body
application/json
events
(click · object | double_click · object | move · object | scroll · object | type · object | key · object)[]
required
Minimum array length:
1Keyboard and mouse input for an open machine, at the hypervisor level: it works on admin prompts and the sign-in screen too. Coordinates are the screen’s pixels.
- click
- double_click
- move
- scroll
- type
- key
Show child attributes
Show child attributes
Response
OK