curl --silent --show-error --fail-with-body --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/by-tool' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"tool_name": "string",
"calls": 1,
"total_duration_ms": 8,
"avg_duration_ms": 7.5,
"error_calls": 1
}
],
"total_calls": 1
}
Get Usage By Tool V1
Tool-level work breakdown across the tenant’s jobs. Joins ToolExecution → Job to scope by tenant…
GET
/
api
/
v1
/
usage
/
by-tool
curl --silent --show-error --fail-with-body --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/by-tool' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"tool_name": "string",
"calls": 1,
"total_duration_ms": 8,
"avg_duration_ms": 7.5,
"error_calls": 1
}
],
"total_calls": 1
}
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.
Response
UsageByToolResponse
UsageByToolRow[]
required
Sorted by total_duration_ms descending — heaviest tool first.
Show UsageByToolRow
Show UsageByToolRow
string
required
Tool identifier (bash, computer, browser, …).
integer
required
Total invocations across all jobs.
integer
required
Sum of duration_ms across calls.
number
required
Mean duration per call.
integer
required
Count of calls whose tool_output starts with an ‘error’ marker — best-effort heuristic, not a strict success/fail classification.
integer
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/usage/by-tool' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"tool_name": "string",
"calls": 1,
"total_duration_ms": 8,
"avg_duration_ms": 7.5,
"error_calls": 1
}
],
"total_calls": 1
}
Last modified on September 21, 2026