---
title: "List Branches"
method: GET
path: "/spaces/{spaceId}/branches"
tags: ["Manage Branches"]
---

# List Branches

`GET /spaces/{spaceId}/branches`

Lists the branches of the specified space.

## Path parameters

- `spaceId` string, required

## Response `200`

A list of branches.

- Branch[]
  - `id` string — The branch ID. It must be unique per space.
  - `baseRef` string — The reference onto which the branch has been created. A reference describes a target branch and a version within that target branch. References have the following syntax: `[<branchName (optional, default: main)>:][<version (optional, default: HEAD)>]` The "main"-branch is the space itself as it has been created in the first place. Defining the branch as part of the reference only becomes necessary if further branches have been created for the space, which should be addressed by the ref. Samples: - `main:42` points to version 42 of the "main"-branch - `myBranch:37` Points to version 37 of the branch with ID "myBranch" - `42` points to version 42 of the "main"-branch - `myBranch:HEAD` points to the latest version of the branch with ID "myBranch" - `HEAD` points to the latest version of the "main"-branch - `myBranch` points to the latest version of the branch with ID "myBranch"

## Other responses

- `401` — Unauthorized to perform the request.

---

[API](https://skmtc.net/here/apis/here-xyz-hub.md) · [All operations](https://skmtc.net/here/apis/here-xyz-hub/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/here-xyz-hub/revisions/1c6c6a2bcac9/schema)
