List repository branches
Lists branches of a public repository, including commit hashes and protection status.
GET
/github/repos/{owner}/{repo}/branchesNo authentication requiredPath parameters2
| Name | Type | Description |
|---|---|---|
owner* | string | The repository owner login. The value is case-insensitive. |
repo* | string | The repository name without the .git suffix. The value is case-insensitive. |
Query parameters3
| Name | Type | Description |
|---|---|---|
protected | boolean | Filter by branch protection status. |
per_page | integer | The number of results to return per page. Default: Minimum: 1Maximum: 100 |
page | integer | The page number to fetch. Default: Minimum: 1 |
Headers2
| Name | Type | Description |
|---|---|---|
If-None-Match | string | An ETag for conditional requests. |
If-Modified-Since | string | An HTTP date for conditional requests. |
Responses
application/jsonSchemaobject[]
Array itemobject
Additional properties are allowed
The original GitHub response.