v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2024-01-0382859610.0 MB
repos

List repository teams

Lists the teams that have access to the specified repository and that are also visible to the authenticated user.

For a public repository, a team is listed only if that team added the public repository explicitly.

Personal access tokens require the following scopes:

  • public_repo to call this endpoint on a public repository
  • repo to call this endpoint on a private repository (this scope also includes public repositories)

This endpoint is not compatible with fine-grained personal access tokens.

get/repos/{owner}/{repo}/teams

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Query parameters

per_pageinteger

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

pageinteger

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

Response

Response

idinteger required
node_idstring required
namestring required
slugstring required
descriptionstring nullable required
privacystring
permissionstring required
urlstring uri required
html_urlstring uri required
members_urlstring required
repositories_urlstring uri required

Example response

[
  {
    "html_url": "https://github.com/orgs/rails/teams/core",
    "parent": {
      "id": 1,
      "node_id": "MDQ6VGVhbTE=",
      "url": "https://api.github.com/organizations/1/team/1",
      "members_url": "https://api.github.com/organizations/1/team/1/members{/member}",
      "name": "Justice League",
      "description": "A great team.",
      "permission": "admin",
      "privacy": "closed",
      "html_url": "https://github.com/orgs/rails/teams/core",
      "repositories_url": "https://api.github.com/organizations/1/team/1/repos",
      "slug": "justice-league",
      "ldap_dn": "uid=example,ou=users,dc=github,dc=com"
    }
  }
]