---
title: "List all references a commit is pushed to"
method: GET
path: "/api/v4/projects/{id}/repository/commits/{sha}/refs"
tags: ["commits"]
---

# List all references a commit is pushed to

`GET /api/v4/projects/{id}/repository/commits/{sha}/refs`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/repository/commits/{sha}/refs`
- Auth: none declared

Lists all references (from branches or tags) a commit is pushed to. The pagination parameters `page` and `per_page` can be used to restrict the list of references.

## Path parameters

- `id` string, required
- `sha` string, required

## Query parameters

- `type` 'branch' | 'tag' | 'all'
- `page` integer
- `per_page` integer

## Response `200`

List all references a commit is pushed to

- APIEntitiesBasicRef[]
  - `type` string, required
  - `name` string, required

## Other responses

- `404`: Not found

---

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