List branches
GET {{baseUrl}}/repos/:owner/:repo/branches?protected=<boolean>&per_page=30&page=1
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
protected | string | Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches. | |
per_page | number | Results per page (max 100) | |
page | number | Page number of the results to fetch. |
RESPONSES
status: OK
[{"name":"master","commit":{"sha":"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc","url":"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"},"protected":true}]