---
title: "Get specified ref or filtered repository's refs"
method: GET
path: "/repos/{owner}/{repo}/git/refs"
tags: ["repository"]
---

# Get specified ref or filtered repository's refs

`GET /repos/{owner}/{repo}/git/refs`

## Path parameters

- `owner` string, required
- `repo` string, required

## Response `200`

ReferenceList

- Reference[]
  - `object` GitObject
    - `sha` string — The SHA hash of the Git object
    - `type` string — The type of the Git object (e.g., commit, tag, tree, blob)
    - `url` string — The URL to access this Git object
  - `ref` string — The name of the Git reference (e.g., refs/heads/main)
  - `url` string — The URL to access this Git reference

## Other responses

- `404` — APINotFound is a not found empty response

---

[API](https://skmtc.net/gitea/apis/gitea-api.md) · [All operations](https://skmtc.net/gitea/apis/gitea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitea/gitea-api/versions/350de506cefa/schema)
