---
title: "Get list of repository refs"
method: GET
path: "/projects/{projectId}/git/refs"
tags: ["Repository"]
---

# Get list of repository refs

`GET /projects/{projectId}/git/refs`

Retrieve a list of `refs/*` in the repository backing a project.
This endpoint functions similarly to `git show-ref`, with each
returned object containing a `ref` field with the ref's name,
and an object containing the associated commit ID.

The returned commit ID can be used with the
[Get a commit object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1commits~1%7BrepositoryCommitId%7D%2Fget)
endpoint to retrieve information about that specific commit.

## Path parameters

- `projectId` string, required

## Response `default`

- Ref[]
  - `id` string, required — The identifier of Ref
  - `ref` string, required — The name of the reference
  - `object` object, required — The object the reference points to
    - `type` string, required — The type of object pointed to
    - `sha` string, required
  - `sha` string, required — The commit sha of the ref

---

[API](https://skmtc.net/upsun/apis/upsun-com-rest-api.md) · [All operations](https://skmtc.net/upsun/apis/upsun-com-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/upsun/upsun-com-rest-api/revisions/6cc88fde6435/schema)
