Skip to main content

Get status checks 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/required_status_checks
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
owner string
required
repo string
required
branch string
required

The name of the branch.

Responses

application/json Status Check Policy object

Response

contexts array[string]
required
Example:
[
  "continuous-integration/travis-ci"
]
contexts_url string<uri>
required
Example:
https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts
strict boolean
required

Example: true

url string<uri>
required
Example:
https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks
application/json Basic Error object

Resource not found

documentation_url string
optional
message string
optional
status string
optional
url string
optional