Statistics
Access merge queue and CI performance statistics.
Time to merge statistics for every queues and partitions
/repos/{owner}/{repository}/stats/time_to_merge
Get the average time to merge statistics, in seconds, for all the queues and partitions in the repository
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
at
string <date-time>
Retrieve the time to merge at this timestamp (ISO 8601 with timezone, e.g. 2024-01-01T00:00:00Z)
branch
string
The name of the branch
200 Successful Response
The name of the partition, if no partition are used the partition name will be `__default__`
Example Response
[
{
"partition_name": "string",
"queues": [
{}
]
}
]
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/time_to_merge" \
-H "Authorization: Bearer <token>"
Get the queue checks outcome for the repository
/repos/{owner}/{repository}/stats/merge_queue_checks_outcome
Statuses describing the state in which the pull requests have left the queue(s).
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Merge queue name(s) of the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": {}
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/merge_queue_checks_outcome" \
-H "Authorization: Bearer <token>"
Get the count of queue checks outcomes
/repos/{owner}/{repository}/stats/queues_checks_outcome_count
Statuses describing the state in which the pull requests have left the queue(s), grouped by time intervals.
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Merge queue name(s) of the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/queues_checks_outcome_count" \
-H "Authorization: Bearer <token>"
Get the count of pull requests entering the queues
/repos/{owner}/{repository}/stats/queues_entered_count
Queues pull requests entered by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/queues_entered_count" \
-H "Authorization: Bearer <token>"
Get the count of pull requests merged by queues
/repos/{owner}/{repository}/stats/queues_merged_count
Queues pull requests merged by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_names": null,
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/queues_merged_count" \
-H "Authorization: Bearer <token>"
Get the average CI runtime
/repos/{owner}/{repository}/stats/average_ci_runtime
Runtime of your CI running on queued pull requests by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/average_ci_runtime" \
-H "Authorization: Bearer <token>"
Get the average idle queue time
/repos/{owner}/{repository}/stats/average_queue_time
Idle time spent in queue by the Pull Requests by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/average_queue_time" \
-H "Authorization: Bearer <token>"
Get the queue time
/repos/{owner}/{repository}/stats/total_queue_time
Total time spent in queue by the Pull Requests by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/total_queue_time" \
-H "Authorization: Bearer <token>"
Get the queue size
/repos/{owner}/{repository}/stats/queue_size
Get the average, max and min queue size over the period by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/queue_size" \
-H "Authorization: Bearer <token>"
Get the number of running speculative checks
/repos/{owner}/{repository}/stats/running_speculative_checks
Speculative checks running on queues by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Merge queue name(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/running_speculative_checks" \
-H "Authorization: Bearer <token>"
Get the checks batch size
/repos/{owner}/{repository}/stats/batch_size
Batch size of the checks running on queues by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Merge queue rule name(s) of the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/batch_size" \
-H "Authorization: Bearer <token>"
Get batch bisection statistics
/repos/{owner}/{repository}/stats/batch_bisection
Statistics about bisection events in the merge queue
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Merge queue rule name(s) of the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"started": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
],
"completed": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/batch_bisection" \
-H "Authorization: Bearer <token>"
Get the queue checks retries statistics
/repos/{owner}/{repository}/stats/checks_retries
Statistics about checks retries in the merge queue by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/checks_retries" \
-H "Authorization: Bearer <token>"
Get the queue failure rate
/repos/{owner}/{repository}/stats/failure_rate
Failure rate of pull requests in the merge queue by intervals of time
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/failure_rate" \
-H "Authorization: Bearer <token>"
Get PR exit reasons by interval
/repos/{owner}/{repository}/stats/queues_pr_exit_reasons
Count of pull request queue-session exits by reason, grouped by time intervals. Each queue session (enter → leave) is counted once. A PR re-queued after failure appears in each session separately.
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
base_ref
string[]
Base reference(s) of the pull requests
partition_name
string[]
Partition name(s) of the pull requests
queue_name
string[]
Name of the merge queue(s) for the pull requests
priority_rule_name
string[]
Name of the priority rule(s) of the pull requests
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default now
200 Successful Response
Example Response
{
"groups": [
{
"base_ref": "string",
"partition_name": "string",
"queue_name": "string",
"priority_rule_name": "string",
"stats": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/stats/queues_pr_exit_reasons" \
-H "Authorization: Bearer <token>"
Was this page helpful?
Thanks for your feedback!