Skip to main content
GET
List a Bitbucket Cloud repository's branches

Authorizations

Authorization
string
header
required

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

Path Parameters

credential_id
string<uuid>
required

Query Parameters

workspace
string
required

The Bitbucket Cloud workspace slug.

Minimum string length: 1
repo_slug
string
required

The repository slug within the workspace.

Minimum string length: 1

Response

The repository's branches and its default branch

A Bitbucket Cloud repository's branches, every page followed, in the order Bitbucket lists them.

branches
BitbucketBranchListItem · object[]
required
default_branch
string | null
required

The repository's main branch; null when Bitbucket reports none (an empty repository).