GitHub v3 REST API

Remove status check 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 in the GitHub Help documentation.

delete
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks

Path Parameters

ownerstringrequired
repostringrequired
branchstringrequired

The name of the branch.

Response

204

Response

delete/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
 
204

Get all status check contexts

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 in the GitHub Help documentation.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts

Path Parameters

ownerstringrequired
repostringrequired
branchstringrequired

The name of the branch.

Response

application/json

Response

array[string]
get/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
 
application/json

Add status check contexts

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 in the GitHub Help documentation.

post
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts

Path Parameters

ownerstringrequired
repostringrequired
branchstringrequired

The name of the branch.

Body

application/json
One Of
contextsarray[string]required

contexts parameter

Response

application/json

Response

array[string]
post/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts

Body

{}
 
application/json

Set status check contexts

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 in the GitHub Help documentation.

put
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts

Path Parameters

ownerstringrequired
repostringrequired
branchstringrequired

The name of the branch.

Body

application/json
One Of
contextsarray[string]required

contexts parameter

Response

application/json

Response

array[string]
put/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts

Body

{}
 
application/json

Remove status check contexts

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 in the GitHub Help documentation.

delete
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts

Path Parameters

ownerstringrequired
repostringrequired
branchstringrequired

The name of the branch.

Body

application/json
One Of
contextsarray[string]required

contexts parameter

Response

application/json

Response

array[string]
delete/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts

Body

{}
 
application/json