curl --request PATCH \
--url https://guidinghand.ai/v1/test_cases/{test_case_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "DSP-01",
"name": "Apps switched to dark mode",
"prompt": "All my windows suddenly went black. How do I get the white back?",
"start_state": "win10-22h2",
"setup_script": "<string>",
"success": {
"check_script": "<string>",
"rubric": "<string>"
},
"customer": {
"persona": "Retired teacher. Not technical. Short, polite answers.",
"facts": {
"Wi-Fi network": "HomeNet",
"Wi-Fi password": {
"secret": "blue-kite-42"
}
},
"clicks_admin_prompts": true,
"does_steps": true
},
"operator": {},
"limits": {
"minutes": 10,
"steps": 250
},
"runs_on": "vm",
"category": "Display & graphics",
"tags": [
"uac"
],
"metadata": {
"customer_id": "cus_42"
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key: 'DSP-01',
name: 'Apps switched to dark mode',
prompt: 'All my windows suddenly went black. How do I get the white back?',
start_state: 'win10-22h2',
setup_script: '<string>',
success: {check_script: '<string>', rubric: '<string>'},
customer: {
persona: 'Retired teacher. Not technical. Short, polite answers.',
facts: {'Wi-Fi network': 'HomeNet', 'Wi-Fi password': {secret: 'blue-kite-42'}},
clicks_admin_prompts: true,
does_steps: true
},
operator: {},
limits: {minutes: 10, steps: 250},
runs_on: 'vm',
category: 'Display & graphics',
tags: ['uac'],
metadata: {customer_id: 'cus_42'}
})
};
fetch('https://guidinghand.ai/v1/test_cases/{test_case_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/test_cases/{test_case_id}"
payload = {
"key": "DSP-01",
"name": "Apps switched to dark mode",
"prompt": "All my windows suddenly went black. How do I get the white back?",
"start_state": "win10-22h2",
"setup_script": "<string>",
"success": {
"check_script": "<string>",
"rubric": "<string>"
},
"customer": {
"persona": "Retired teacher. Not technical. Short, polite answers.",
"facts": {
"Wi-Fi network": "HomeNet",
"Wi-Fi password": { "secret": "blue-kite-42" }
},
"clicks_admin_prompts": True,
"does_steps": True
},
"operator": {},
"limits": {
"minutes": 10,
"steps": 250
},
"runs_on": "vm",
"category": "Display & graphics",
"tags": ["uac"],
"metadata": { "customer_id": "cus_42" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "test_case",
"test_case_id": "tc_8Kq2mZ0aLp4x",
"key": "DSP-01",
"name": "Apps switched to dark mode",
"prompt": "All my windows suddenly went black. How do I get the white back?",
"start_state": "win10-22h2",
"setup_script": "<string>",
"success": {
"check_script": "<string>",
"rubric": "<string>"
},
"customer": {
"persona": "Retired teacher. Not technical. Short, polite answers.",
"facts": {
"Wi-Fi network": "HomeNet",
"Wi-Fi password": {
"secret": "blue-kite-42"
}
},
"clicks_admin_prompts": true,
"does_steps": true
},
"operator": {
"approvals": "approve"
},
"limits": {
"minutes": 10,
"steps": 250
},
"runs_on": "vm",
"category": "Display & graphics",
"tags": [
"uac"
],
"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>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}Update a test case
Send only the fields to change. Runs already made keep the copy they took. Needs the admin role or an API key.
curl --request PATCH \
--url https://guidinghand.ai/v1/test_cases/{test_case_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "DSP-01",
"name": "Apps switched to dark mode",
"prompt": "All my windows suddenly went black. How do I get the white back?",
"start_state": "win10-22h2",
"setup_script": "<string>",
"success": {
"check_script": "<string>",
"rubric": "<string>"
},
"customer": {
"persona": "Retired teacher. Not technical. Short, polite answers.",
"facts": {
"Wi-Fi network": "HomeNet",
"Wi-Fi password": {
"secret": "blue-kite-42"
}
},
"clicks_admin_prompts": true,
"does_steps": true
},
"operator": {},
"limits": {
"minutes": 10,
"steps": 250
},
"runs_on": "vm",
"category": "Display & graphics",
"tags": [
"uac"
],
"metadata": {
"customer_id": "cus_42"
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key: 'DSP-01',
name: 'Apps switched to dark mode',
prompt: 'All my windows suddenly went black. How do I get the white back?',
start_state: 'win10-22h2',
setup_script: '<string>',
success: {check_script: '<string>', rubric: '<string>'},
customer: {
persona: 'Retired teacher. Not technical. Short, polite answers.',
facts: {'Wi-Fi network': 'HomeNet', 'Wi-Fi password': {secret: 'blue-kite-42'}},
clicks_admin_prompts: true,
does_steps: true
},
operator: {},
limits: {minutes: 10, steps: 250},
runs_on: 'vm',
category: 'Display & graphics',
tags: ['uac'],
metadata: {customer_id: 'cus_42'}
})
};
fetch('https://guidinghand.ai/v1/test_cases/{test_case_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/test_cases/{test_case_id}"
payload = {
"key": "DSP-01",
"name": "Apps switched to dark mode",
"prompt": "All my windows suddenly went black. How do I get the white back?",
"start_state": "win10-22h2",
"setup_script": "<string>",
"success": {
"check_script": "<string>",
"rubric": "<string>"
},
"customer": {
"persona": "Retired teacher. Not technical. Short, polite answers.",
"facts": {
"Wi-Fi network": "HomeNet",
"Wi-Fi password": { "secret": "blue-kite-42" }
},
"clicks_admin_prompts": True,
"does_steps": True
},
"operator": {},
"limits": {
"minutes": 10,
"steps": 250
},
"runs_on": "vm",
"category": "Display & graphics",
"tags": ["uac"],
"metadata": { "customer_id": "cus_42" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "test_case",
"test_case_id": "tc_8Kq2mZ0aLp4x",
"key": "DSP-01",
"name": "Apps switched to dark mode",
"prompt": "All my windows suddenly went black. How do I get the white back?",
"start_state": "win10-22h2",
"setup_script": "<string>",
"success": {
"check_script": "<string>",
"rubric": "<string>"
},
"customer": {
"persona": "Retired teacher. Not technical. Short, polite answers.",
"facts": {
"Wi-Fi network": "HomeNet",
"Wi-Fi password": {
"secret": "blue-kite-42"
}
},
"clicks_admin_prompts": true,
"does_steps": true
},
"operator": {
"approvals": "approve"
},
"limits": {
"minutes": 10,
"steps": 250
},
"runs_on": "vm",
"category": "Display & graphics",
"tags": [
"uac"
],
"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>"
]
}
}{
"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 test case’s id (tc_…) or its key (e.g. DSP-01).
Body
Only the fields you send change.
Your own id for the case, unique in the org: 1 to 64 of A-Za-z0-9._-, not starting with tc_. Every {test_case_id} in the API also takes it.
^(?!tc_)[A-Za-z0-9._-]{1,64}$"DSP-01"
1 - 200"Apps switched to dark mode"
What the customer says to the agent: the task’s prompt.
1 - 8000"All my windows suddenly went black. How do I get the white back?"
The start state (ss_…) or image (e.g. win10-22h2) each try’s machine is made from.
"win10-22h2"
Runs at the start of every try, elevated, as the signed-in user: it breaks the machine the way the case needs.
100000How to tell the problem is fixed: a check_script, a rubric, or both (an attempt passes only when each one it has passes). At least one.
Show child attributes
Show child attributes
The simulated customer. Null: the test set’s customer, else a built-in default.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A runner label the case needs: vm for any virtual machine, or one of your runners’ labels (e.g. lenovo).
"vm"
"Display & graphics"
5064["uac"]
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" }
Response
OK
A problem on a machine, and how to tell it’s fixed.
"tc_8Kq2mZ0aLp4x"
Your own id for the case, unique in the org: 1 to 64 of A-Za-z0-9._-, not starting with tc_. Every {test_case_id} in the API also takes it.
^(?!tc_)[A-Za-z0-9._-]{1,64}$"DSP-01"
1 - 200"Apps switched to dark mode"
What the customer says to the agent: the task’s prompt.
1 - 8000"All my windows suddenly went black. How do I get the white back?"
The start state (ss_…) or image (e.g. win10-22h2) each try’s machine is made from.
"win10-22h2"
Runs at the start of every try, elevated, as the signed-in user: it breaks the machine the way the case needs.
100000How to tell the problem is fixed. An attempt passes only when each one it has passes.
Show child attributes
Show child attributes
The simulated customer. Null: the test set’s customer, else a built-in default.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A runner label the case needs: vm for any virtual machine, or one of your runners’ labels (e.g. lenovo).
"vm"
"Display & graphics"
5064["uac"]
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" }