Get teams with access to the protected branch
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.
Lists the teams who have push access to this branch. The list includes child teams.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use the GraphQL API.
Responses
Section titled “ Responses ”Response
Groups of organization members that gives permissions on specified repositories.
object
object
The ownership type of the team
How the team’s access to the repository was granted. This property is only
present when the team is returned in a repository context, such as
GET /repos/{owner}/{repo}/teams.
Unique identifier of the organization to which this team belongs
Unique identifier of the enterprise to which this team belongs
Groups of organization members that gives permissions on specified repositories.
object
Unique identifier of the team
URL for the team
Name of the team
Description of the team
Permission that the team will have for its repositories
The level of privacy this team should have
The notification setting the team has set
Distinguished Name (DN) that team maps to within LDAP environment
The ownership type of the team
Unique identifier of the organization to which this team belongs
Unique identifier of the enterprise to which this team belongs
Examples
[ { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://api.github.com/teams/1", "html_url": "https://github.com/orgs/github/teams/justice-league", "name": "Justice League", "slug": "justice-league", "description": "A great team.", "privacy": "closed", "notification_setting": "notifications_enabled", "permission": "admin", "members_url": "https://api.github.com/teams/1/members{/member}", "repositories_url": "https://api.github.com/teams/1/repos", "parent": null }]Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}