Skip to main content
GET
/
api
/
v1
/
repos
/
branches
List Branches
curl --request GET \
  --url https://api.{cluster}.code.storage/api/v1/repos/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.

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"