Get a team by name
GET
/orgs/{org}/teams/{team_slug} https://api.github.com
Gets a team using the team's slug. To create the slug, GitHub replaces special characters in the name string, changes all words to lowercase, and replaces spaces with a - separator. For example, "My TEam Näme" would become my-team-name.
[!NOTE] You can also specify a team by
org_idandteam_idusing the routeGET /organizations/{org_id}/team/{team_id}.
Parameters
path Path Parameters
| Name | Type |
|---|---|
org
required
The organization name. The name is not case sensitive. | string |
team_slug
required
The slug of the team name. | string |
Responses
200 application/json
Response
interface TeamFull {
id: number;
node_id: string;
url: string;
html_url: string;
name: string;
slug: string;
description: string | null;
privacy?: "closed" | "secret";
notification_setting?: "notifications_enabled" | "notifications_disabled";
permission: string;
members_url: string;
repositories_url: string;
parent?:TeamSimple | null;
members_count: number;
repos_count: number;
created_at: string;
updated_at: string;
organization:TeamOrganization ;
ldap_dn?:LdapDn ;
type: "enterprise" | "organization";
organization_id?: number;
enterprise_id?: number;
}
id: number;
node_id: string;
url: string;
html_url: string;
name: string;
slug: string;
description: string | null;
privacy?: "closed" | "secret";
notification_setting?: "notifications_enabled" | "notifications_disabled";
permission: string;
members_url: string;
repositories_url: string;
parent?:
members_count: number;
repos_count: number;
created_at: string;
updated_at: string;
organization:
ldap_dn?:
type: "enterprise" | "organization";
organization_id?: number;
enterprise_id?: number;
}
Client Errors
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;
}