teams
Creates, updates, deletes, gets or lists a teams resource.
Overview
| Name | teams |
| Type | Resource |
| Id | github.repos.teams |
Fields
The following fields are returned by SELECT queries:
- list_teams
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | |
name | string | |
enterprise_id | integer | Unique identifier of the enterprise to which this team belongs |
node_id | string | |
organization_id | integer | Unique identifier of the organization to which this team belongs |
description | string | |
html_url | string (uri) | (example: https://github.com/orgs/rails/teams/core) |
members_url | string | |
notification_setting | string | |
parent | object | Groups of organization members that gives permissions on specified repositories. (title: Team Simple) |
permission | string | |
permissions | object | |
privacy | string | |
repositories_url | string (uri) | |
slug | string | |
type | string | The ownership type of the team (enterprise, organization) |
url | string (uri) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_teams | select | owner, repo | per_page, page | 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. OAuth app tokens and personal access tokens (classic) need the public_repo or repo scope to use this endpoint with a public repository, and repo scope to use this endpoint with a private repository. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_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.
OAuth app tokens and personal access tokens (classic) need the public_repo or repo scope to use this endpoint with a public repository, and repo scope to use this endpoint with a private repository.
SELECT
id,
name,
enterprise_id,
node_id,
organization_id,
description,
html_url,
members_url,
notification_setting,
parent,
permission,
permissions,
privacy,
repositories_url,
slug,
type,
url
FROM github.repos.teams
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;