curl --silent --show-error --fail-with-body --request GET \
--url 'https://api.computer.stateset.app/api/v1/jobs/stats' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"windows": [
{
"window": "today",
"total": 102,
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"in_flight": 1,
"success_rate": 7.5,
"avg_duration_seconds": 7.5,
"total_cost_usd": 1.5
}
]
}
Get Job Stats V1
Quick aggregate snapshot across three rolling windows. Useful for tenant operational dashboards — answers ‘how am I doing today / this week / this month’ in…
GET
/
api
/
v1
/
jobs
/
stats
curl --silent --show-error --fail-with-body --request GET \
--url 'https://api.computer.stateset.app/api/v1/jobs/stats' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"windows": [
{
"window": "today",
"total": 102,
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"in_flight": 1,
"success_rate": 7.5,
"avg_duration_seconds": 7.5,
"total_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.
in_flight is the live count regardless of window (live jobs don’t
have a created_at filter applied, since ‘in flight’ is a current
state, not a historical event).
Response
JobStatsResponse
JobStatsWindow[]
required
Three windows in fixed order: today, last_7d, last_30d.
Show JobStatsWindow
Show JobStatsWindow
string
required
Allowed values:
'today', 'last_7d', 'last_30d'.integer
required
Jobs created within the window.
integer
required
integer
required
integer
required
integer
required
Queued + running + awaiting_approval, AT THE TIME OF QUERY (not window-bounded).
number
required
succeeded / (succeeded + failed). 0.0 when neither bucket is populated. Excludes cancelled — those are user actions, not agent failures.
number
required
Mean wall-clock between created_at and updated_at across terminal-status jobs in the window. 0.0 when no terminal rows fell in the window.
number
required
Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
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 GET \
--url 'https://api.computer.stateset.app/api/v1/jobs/stats' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"windows": [
{
"window": "today",
"total": 102,
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"in_flight": 1,
"success_rate": 7.5,
"avg_duration_seconds": 7.5,
"total_cost_usd": 1.5
}
]
}
Last modified on August 31, 2026