Source ControlGit Repositories

List repository branches

List the branches of a project repository, sorted by name and read from its remote with the git credential that covers it. The remote's list is cached for 15 minutes. Pass ?refresh=true to read the remote again; a list fetched less than 10 seconds ago is returned as it is. Pass ?q= to return only the branches whose name contains that text.

GET
/v1/orgs/{org}/projects/{project}/repos/{repoId}/branches
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.

In: header

Path Parameters

org*string

Organization name

Match^[a-z0-9][a-z0-9-]*[a-z0-9]$
Length2 <= length <= 64
project*string

Project name

Match^[a-z0-9][a-z0-9-]*[a-z0-9]$
Length2 <= length <= 64
repoId*string

Repository ID

Formatuuid

Query Parameters

refresh?boolean

If true, read the branches from the remote, not from the cache

q?string

Return only branches whose name contains this text, ignoring case

Lengthlength <= 255
cursor?string

Opaque pagination cursor from a previous response

limit?integer

Maximum number of branches to return (1–1000)

Formatint32
Range1 <= value <= 1000
Default100

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/v1/orgs/string/projects/string/repos/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches"
{  "fetched_at": "string",  "items": [    {      "name": "string"    }  ],  "pagination": {    "has_more": true,    "next_cursor": "string",    "total_count": 0  }}