Skip to main content
GET
/
api
/
repos
/
{repo_name}
/
branches
List Branches
curl --request GET \
  --url https://api.{cluster}.code.storage/api/repos/{repo_name}/branches \
  --header 'Authorization: Bearer <token>'
{
  "branches": [
    {
      "created_at": "2024-01-15T10:30:00Z",
      "cursor": "b_123abc",
      "head_sha": "a1b2c3d4e5f6",
      "name": "main"
    }
  ],
  "has_more": true,
  "next_cursor": "b_456def"
}

Documentation Index

Fetch the complete documentation index at: https://code.storage/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

repo_name
string
required

Repository name. Names that contain / or any other character that is not safe in a URL path segment must be URL encoded so the value occupies a single path segment. For example pierre/example is sent as pierre%2Fexample. Plain names such as example can be sent as-is. The server URL-decodes the value before resolving the repository.

Query Parameters

cursor
string

Pagination cursor returned by a previous list_branches response.

limit
integer
default:20

Maximum number of branches to return. Defaults to 20.

ephemeral
boolean

When true, list branches under the ephemeral namespace instead of regular branches.

Response

Repository branches in creation order.

Paginated list of branches for the repository.

branches
object[]
required

List of branch objects.

has_more
boolean
required

Whether more branches exist.

Example:

true

next_cursor
string

Opaque cursor for the next page (absent when no more results).

Example:

"b_456def"