Get admin branch protection
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
GET
/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- owner stringrequired
- repo stringrequired
- branch stringrequired
The name of the branch.
Responses
application/json Protected Branch Admin Enforced object
Response
enabled boolean
requiredExample: true
url string<uri>
requiredExample: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins