Skip to main content

teams_for_auth_user

Creates, updates, deletes, gets or lists a teams_for_auth_user resource.

Overview

Nameteams_for_auth_user
TypeResource
Idgithub.teams.teams_for_auth_user

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idintegerUnique identifier of the team
namestringName of the team (example: Developers)
enterprise_idintegerUnique identifier of the enterprise to which this team belongs
node_idstring (example: MDQ6VGVhbTE=)
organization_idintegerUnique identifier of the organization to which this team belongs
created_atstring (date-time) (example: 2017-07-14T16:53:42Z)
descriptionstring (example: A great team.)
html_urlstring (uri) (example: https://github.com/orgs/rails/teams/core)
ldap_dnstringThe distinguished name (DN) of the LDAP entry to map to a team. (example: cn=Enterprise Ops,ou=teams,dc=github,dc=com)
members_countinteger
members_urlstring (example: https://api.github.com/organizations/1/team/1/members{/member})
notification_settingstringThe notification setting the team has set (notifications_enabled, notifications_disabled) (example: notifications_enabled)
organizationobjectTeam Organization (title: Team Organization)
parentobjectGroups of organization members that gives permissions on specified repositories. (title: Team Simple)
permissionstringPermission that the team will have for its repositories (example: push)
privacystringThe level of privacy this team should have (closed, secret) (example: closed)
repos_countinteger
repositories_urlstring (uri) (example: https://api.github.com/organizations/1/team/1/repos)
slugstring (example: justice-league)
typestringThe ownership type of the team (enterprise, organization)
updated_atstring (date-time) (example: 2017-08-17T12:37:15Z)
urlstring (uri)URL for the team (example: https://api.github.com/organizations/1/team/1)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_for_authenticated_userselectper_page, pageList 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.

NameDatatypeDescription
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

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 }}'
;