---
title: "Get the CI runs the merge queues started, and how they ended"
method: GET
path: "/repos/{owner}/{repository}/stats/ci_runs"
tags: ["statistics"]
---

# Get the CI runs the merge queues started, and how they ended

`GET /repos/{owner}/{repository}/stats/ci_runs`

## Request

- Base URL: `https://api.mergify.com/v1`
- URL: `https://api.mergify.com/v1/repos/{owner}/{repository}/stats/ci_runs`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

CI runs the merge queues started, the ones that succeeded, and the ones they tore down before a merge with the reason why, by intervals of time. A run is one check the queue started -- a draft pull request, or the queued pull request itself when it is checked in place -- counted once however many pull requests it carries. A run succeeded when at least one of its pull requests was not torn down after it: it passed, or a later run's result merged it. A run is counted as succeeded or wasted in the interval it ended in, so one still running is in neither. A run that passed and is torn down later, while it waited to merge, moves from succeeded in the interval it passed in to wasted in the one it was torn down in. A merge the queue trusts without running CI is not a run. Divide `started` by the merged pull requests of `queues_merged_count` for the CI runs each merge costs. A draft run carries pull requests of several priority rules, so there is no priority rule filter.

## Path parameters

- `repository` string, required: The name of the repository
- `owner` string, required: The owner of the repository

## Query parameters

- `base_ref` string[], nullable: Base reference(s) of the pull requests
- `queue_name` string[], nullable: Name of the merge queue(s) for the pull requests
- `start_at` string, date-time, nullable: Get the stats from this date: an ISO 8601 datetime with a UTC offset (e.g. `2024-01-01T00:00:00Z`); a Unix timestamp or a datetime without an offset is refused. Defaults to 1 day before `end_at`.
- `end_at` string, date-time, nullable: Get the stats until this date: an ISO 8601 datetime with a UTC offset (e.g. `2024-01-01T00:00:00Z`); a Unix timestamp or a datetime without an offset is refused. Defaults to now.

## Response `200`

Successful Response

- CIRunsResponse
  - `groups` CIRunsGroupResponse[], required
    - `base_ref` string, required
    - `queue_name` string, required
    - `started` StartedCIRunsInInterval[], required
      - `start` string, date-time, required
      - `end` string, date-time, required
      - `started` integer, required
    - `succeeded` SucceededCIRunsInInterval[], required
      - `start` string, date-time, required
      - `end` string, date-time, required
      - `count` integer, required
    - `wasted` WastedCIRunsInInterval[], required
      - `start` string, date-time, required
      - `end` string, date-time, required
      - `reason` string, required
      - `count` integer, required

## Other responses

- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `422`: Unprocessable entity

## Changes

- **2026-10-13** `282a2896fd48`: 1 info
  - added the required property `groups/items/succeeded` to the response with the `200` status
- **2026-10-03** `f0c50c78406a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mergify/apis/mergify-api/changes/repos/:owner/:repository/stats/ci_runs/get.md)

---

[API](https://skmtc.dev/mergify/apis/mergify-api.md) · [All operations](https://skmtc.dev/mergify/apis/mergify-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mergify/apis/mergify-api/revisions/00b8f4a31190?raw)
