Branches of a repository the connected access reaches.
The repository's branches, its default branch first, then by name in plain ASCII order; search matches part of a name, ignoring ASCII case.
GET/api/v1/github/repos/{owner}/{repo}/branches
Scoperead
Paged. Through the App, only a repository the installation on its owner's account reaches (else 404 not_found), with a token of that installation that can read that one repository's contents and nothing else. With the legacy token only the workspace's owner, signed in, may read it: never an API key or a limited CLI sign-in, whatever its scopes (403 not_allowed). 409 github_access_required, 503 github_unavailable, 429 rate_limited as for the accounts.
Path parameters.
ownerstringrequired
The account or organization that owns the repository, as GitHub names it.
repostringrequired
The repository's name, without its owner.
Query parameters.
limit1–200
Page size. Default 50.
orderenum
Sort by creation time, then ID. desc newest, asc oldest. One of asc, desc. Default asc.
cursorstring
Previous page’s nextCursor. Keep filters and order. At least 1 character.
searchstring
1 to 100 characters.
Response.
200 OK · data: object[]. Pass nextCursor as cursor when hasMore is true.