CI Insights
Access data from CI Insights.
Get a single runner stat as a time series #
/ci/{owner}/runners/stats/{stat}
Return one of the runner stats bucketed over the requested time range, with a summary value over the full window.
stat
"success_rate" | "active_runners" | "active_jobs" | "queued_jobs" | "utilization_rate" | "avg_duration" | "avg_queue_time" | "jobs_per_hour" | "avg_jobs_per_hour" | "min_duration" | "median_duration" | "p95_duration" | "p99_duration" | "max_duration" | "min_queue_time" | "median_queue_time" | "p95_queue_time" | "p99_queue_time" | "max_queue_time"
required
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
runner_name
string[]
The runner name to filter on
runner_name_exclude
string[]
The runner name to exclude
runner_group_name
string[]
The runner group name to filter on
runner_group_name_exclude
string[]
The runner group name to exclude
runner_labels
string[]
The runner labels to filter on (all must match)
start
string <date-time>
Start of the time range. Defaults to `end - 1 day` when omitted.
end
string <date-time>
End of the time range. Defaults to `start + 1 day` when only start is provided, or `now` otherwise.
200 Successful Response
stat — 19 typesExample Response
{
"value": 0,
"value_over_time": [
{
"start": "2024-01-15T09:00:00Z",
"end": "2024-01-15T09:00:00Z",
"value": 0
}
],
"stat": "avg_duration"
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/ci/:owner/runners/stats/:stat" \
-H "Authorization: Bearer <token>"
Get a single CI queue stat as a time series #
/ci/{owner}/queue/stats/{stat}
Return one of the CI queue stats bucketed over the requested time range, with a summary value over the full window.
stat
"total_jobs" | "avg_wait_time" | "min_wait_time" | "median_wait_time" | "p95_wait_time" | "p99_wait_time" | "max_wait_time"
required
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
labels
string[]
The labels to filter on (all must match)
start
string <date-time>
Start of the time range. Defaults to `end - 1 day` when omitted.
end
string <date-time>
End of the time range. Defaults to `start + 1 day` when only start is provided, or `now` otherwise.
200 Successful Response
total_jobs avg_wait_time min_wait_time median_wait_time p95_wait_time p99_wait_time max_wait_timeExample Response
{
"stat": "total_jobs",
"value": 0,
"value_over_time": [
{
"start": "2024-01-15T09:00:00Z",
"end": "2024-01-15T09:00:00Z",
"value": 0
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/ci/:owner/queue/stats/:stat" \
-H "Authorization: Bearer <token>"
Was this page helpful?
Thanks for your feedback!