curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/wait' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"timeout_seconds": 30
}'
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"is_terminal": true,
"waited_seconds": 250,
"summary": "Two-person tent, green — replacement for damaged pole set.",
"error": "string",
"cost_usd": 1.5
}
Block until the job reaches terminal status, or until timeout
Synchronously wait for a job to terminate. Useful for shell scripts and simple HTTP clients that can’t consume SSE…
POST
/
api
/
v1
/
jobs
/
{job_id}
/
wait
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/wait' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"timeout_seconds": 30
}'
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"is_terminal": true,
"waited_seconds": 250,
"summary": "Two-person tent, green — replacement for damaged pole set.",
"error": "string",
"cost_usd": 1.5
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
timeout_seconds (default 30, max
60) before returning the current state with is_terminal: false.
Implementation: server-side polling on a 1-second interval,
refreshing the row each tick. Avoids holding an open broker
subscription so connection-pool pressure stays bounded — the
long-running idiom is /events/stream (SSE) when you need
intermediate updates rather than just terminal status.
Path parameters
string (uuid)
required
Request body
WaitJobRequest,null
integer
How long to block before returning the current state. 1..60 seconds. The endpoint returns as soon as the job reaches a terminal status, so this is only the upper bound. Default:
30. Minimum: 1. Maximum: 60.Response
WaitJobResponse
string
required
string
required
boolean
required
True if the job reached
succeeded/failed/cancelled before the timeout. False means the timeout fired and the returned status is still in-flight.number
required
Wall-clock seconds spent blocking inside the handler.
string,null
string,null
number,null
Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
422 | Validation Error |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/wait' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"timeout_seconds": 30
}'
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"is_terminal": true,
"waited_seconds": 250,
"summary": "Two-person tent, green — replacement for damaged pole set.",
"error": "string",
"cost_usd": 1.5
}
Last modified on September 21, 2026