Remove team 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. Removes the ability of a team to push to this branch. You can also remove push access for child teams. | Type | Description | | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- owner stringrequired
- repo stringrequired
- branch stringrequired
The name of the branch.
Body Params
optionalResponses
Response
items Team objectGroups of organization members that gives permissions on specified repositories.
Groups of organization members that gives permissions on specified repositories.
Example: https://github.com/orgs/rails/teams/core
parent Team Simple objectrequirednullable Groups of organization members that gives permissions on specified repositories.
Groups of organization members that gives permissions on specified repositories.
Description of the team
Example: A great team.
Example: https://github.com/orgs/rails/teams/core
Unique identifier of the team
Example: 1
Distinguished Name (DN) that team maps to within LDAP environment
Example: uid=example,ou=users,dc=github,dc=com
Example: https://api.github.com/organizations/1/team/1/members{/member}
Name of the team
Example: Justice League
Example: MDQ6VGVhbTE=
Permission that the team will have for its repositories
Example: admin
The level of privacy this team should have
Example: closed
Example: https://api.github.com/organizations/1/team/1/repos
Example: justice-league
URL for the team
Example: https://api.github.com/organizations/1/team/1
permissions objectoptional
Validation failed