---
title: "Get the base refs in the repository"
method: GET
path: "/repos/{owner}/{repository}/stats/branches"
tags: ["statistics"]
---

# Get the base refs in the repository

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

Retrieve a list of base refs branches affected by queue activity

## Path parameters

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

## Query parameters

- `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

- BaseRefsResponse
  - `base_refs` string[], required

## Other responses

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

## Changes

- **2026-08-28** `b3864dcc206a` — 1 info
  - the endpoint scheme security `MergifyTokenBearerAuth` was added to the API
- **2026-08-13** `29857c6146cf` — 2 info
  - the endpoint scheme security `AdminApplicationKey` was added to the API
  - the endpoint scheme security `ApplicationAuth` was removed from the API

[Change history](https://skmtc.dev/mergify/apis/mergify-api/changes/repos/:owner/:repository/stats/branches/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/0414e6db380a?raw)
