List branches

GET {{baseUrl}}/repos/:owner/:repo/branches?protected=<boolean>&per_page=30&page=1

Request Params

KeyDatatypeRequiredDescription
protectedstringSetting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
per_pagenumberResults per page (max 100)
pagenumberPage number of the results to fetch.

RESPONSES

status: OK

[{&quot;name&quot;:&quot;master&quot;,&quot;commit&quot;:{&quot;sha&quot;:&quot;c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc&quot;,&quot;url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc&quot;},&quot;protected&quot;:true}]