teams_for_auth_user
Creates, updates, deletes, gets or lists a teams_for_auth_user resource.
Overview
| Name | teams_for_auth_user |
| Type | Resource |
| Id | github.teams.teams_for_auth_user |
Fields
The following fields are returned by SELECT queries:
- list_for_authenticated_user
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique identifier of the team |
name | string | Name of the team (example: Developers) |
enterprise_id | integer | Unique identifier of the enterprise to which this team belongs |
node_id | string | (example: MDQ6VGVhbTE=) |
organization_id | integer | Unique identifier of the organization to which this team belongs |
created_at | string (date-time) | (example: 2017-07-14T16:53:42Z) |
description | string | (example: A great team.) |
html_url | string (uri) | (example: https://github.com/orgs/rails/teams/core) |
ldap_dn | string | The distinguished name (DN) of the LDAP entry to map to a team. (example: cn=Enterprise Ops,ou=teams,dc=github,dc=com) |
members_count | integer | |
members_url | string | (example: https://api.github.com/organizations/1/team/1/members{/member}) |
notification_setting | string | The notification setting the team has set (notifications_enabled, notifications_disabled) (example: notifications_enabled) |
organization | object | Team Organization (title: Team Organization) |
parent | object | Groups of organization members that gives permissions on specified repositories. (title: Team Simple) |
permission | string | Permission that the team will have for its repositories (example: push) |
privacy | string | The level of privacy this team should have (closed, secret) (example: closed) |
repos_count | integer | |
repositories_url | string (uri) | (example: https://api.github.com/organizations/1/team/1/repos) |
slug | string | (example: justice-league) |
type | string | The ownership type of the team (enterprise, organization) |
updated_at | string (date-time) | (example: 2017-08-17T12:37:15Z) |
url | string (uri) | URL for the team (example: https://api.github.com/organizations/1/team/1) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_for_authenticated_user | select | per_page, page | List all of the teams across all of the organizations to which the authenticated user belongs. OAuth app tokens and personal access tokens (classic) need the user, repo, or read:org scope to use this endpoint.When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization. |
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 |
|---|---|---|
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_for_authenticated_user
List all of the teams across all of the organizations to which the authenticated
user belongs.
OAuth app tokens and personal access tokens (classic) need the user, repo, or read:org scope to use this endpoint.
When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization.
SELECT
id,
name,
enterprise_id,
node_id,
organization_id,
created_at,
description,
html_url,
ldap_dn,
members_count,
members_url,
notification_setting,
organization,
parent,
permission,
privacy,
repos_count,
repositories_url,
slug,
type,
updated_at,
url
FROM github.teams.teams_for_auth_user
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
;