child_teams
Creates, updates, deletes, gets or lists a child_teams resource.
Overview
| Name | child_teams |
| Type | Resource |
| Id | github.teams.child_teams |
Fields
The following fields are returned by SELECT queries:
- list_child_in_org
- list_child_legacy
if child teams exist
| 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) |
if child teams exist
| 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_child_in_org | select | org, team_slug | per_page, page | Lists the child teams of the team specified by {team_slug}.> [!NOTE] > You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/teams. |
list_child_legacy | select | team_id | per_page, page | > [!WARNING] > Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List child teams endpoint. |
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 |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
team_id | integer | The unique identifier of the team. |
team_slug | string | The slug of the team name. |
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_child_in_org
- list_child_legacy
Lists the child teams of the team specified by {team_slug}.
> [!NOTE]
> You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/teams.
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.teams.child_teams
WHERE org = '{{ org }}' -- required
AND team_slug = '{{ team_slug }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
> [!WARNING]
> Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List child teams endpoint.
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.teams.child_teams
WHERE team_id = '{{ team_id }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;