Get access restrictions
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. Lists who has access to this protected branch. **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories.
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions- 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
Response
apps array[object]required
items object
owner objectoptional
Example: "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers"
Example: "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}"
Example: "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}"
Example: ""
Example: "https://github.com/testorg-ea8ec76d71c3af4b"
Example: "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs"
Example: "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events"
Example: false
Example: "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}"
Example: "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions"
Example: "Organization"
permissions objectoptional
teams array[object]required
items object
users array[object]required
items object
Resource not found