List child teams (Legacy)
Deprecated GET
/teams/{team_id}/teams https://api.github.com
[!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 teamsendpoint.
Parameters
path Path Parameters
| Name | Type |
|---|---|
team_id
required
The unique identifier of the team. | number |
query Query Parameters
| Name | Type |
|---|---|
per_page The number of results per page (max 100). For more information, see "Using pagination in the REST API." | number |
page The page number of the results to fetch. For more information, see "Using pagination in the REST API." | number |
Responses
200 application/json
if child teams exist
interface Team {
id: number;
node_id: string;
name: string;
slug: string;
description: string | null;
privacy?: string;
notification_setting?: string;
permission: string;
permissions?: {
pull: boolean;
triage: boolean;
push: boolean;
maintain: boolean;
admin: boolean;
};
url: string;
html_url: string;
members_url: string;
repositories_url: string;
type: "enterprise" | "organization";
organization_id?: number;
enterprise_id?: number;
parent:TeamSimple | null;
}[]
id: number;
node_id: string;
name: string;
slug: string;
description: string | null;
privacy?: string;
notification_setting?: string;
permission: string;
permissions?: {
pull: boolean;
triage: boolean;
push: boolean;
maintain: boolean;
admin: boolean;
};
url: string;
html_url: string;
members_url: string;
repositories_url: string;
type: "enterprise" | "organization";
organization_id?: number;
enterprise_id?: number;
parent:
}[]
Client Errors
403 application/json
Forbidden
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
404 application/json
Resource not found
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
422 application/json
Validation failed, or the endpoint has been spammed.
interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}