엔터프라이즈 팀 구성원을 위한 REST API 엔드포인트
REST API를 사용하여 GitHub 엔터프라이즈에 엔터프라이즈 팀을 만들고 관리할 수 있습니다.
엔터프라이즈 팀 정보
참고 항목
이 엔드포인트는 현재 공개 미리 보기 버전이며 변경될 수 있습니다.
이 API 문서는 GitHub Enterprise Cloud의 엔터프라이즈용입니다.
엔터프라이즈가 GHE가 아닌 Copilot Business라면, 이전에 공유된 초기 액세스 문서 링크를 참조하세요.
이 엔드포인트는 클래식 personal access tokens을 사용하는 엔터프라이즈 팀의 엔터프라이즈에 인증된 구성원만 사용할 수 있으며, 필요한 권한은 read:enterprise scope(GET API용) 및 admin:enterprise(기타 API용)입니다.
이러한 엔드포인트는 fine-grained personal access tokens 또는 GitHub 앱 액세스 토큰과는 호환되지 않습니다.
GitHub는 팀 name에서 엔터프라이즈 팀의 slug를 생성하고 ent: 접두사를 추가합니다.
List enterprise teams
List all teams in the enterprise for the authenticated user
"List enterprise teams"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"List enterprise teams"에 대한 매개 변수
| 속성, 형식, 설명 |
|---|
accept string Setting to |
| 속성, 형식, 설명 |
|---|
enterprise string RequiredThe slug version of the enterprise name. |
| 속성, 형식, 설명 |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
"List enterprise teams"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
"List enterprise teams"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/enterprises/ENTERPRISE/teamsResponse
Status: 200[
{
"id": 1,
"name": "Justice League",
"description": "A great team.",
"slug": "justice-league",
"url": "https://api.github.com/enterprises/dc/teams/justice-league",
"group_id": "62ab9291-fae2-468e-974b-7e45096d5021",
"html_url": "https://github.com/enterprises/dc/teams/justice-league",
"members_url": "https://api.github.com/enterprises/dc/teams/justice-league/members{/member}",
"created_at": "2019-01-26T19:01:12Z",
"updated_at": "2019-01-26T19:14:43Z"
}
]Create an enterprise team
To create an enterprise team, the authenticated user must be an owner of the enterprise.
"Create an enterprise team"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"Create an enterprise team"에 대한 매개 변수
| 속성, 형식, 설명 |
|---|
accept string Setting to |
| 속성, 형식, 설명 |
|---|
enterprise string RequiredThe slug version of the enterprise name. |
| 속성, 형식, 설명 |
|---|
name string RequiredThe name of the team. |
description string or null A description of the team. |
sync_to_organizations string Retired: this field is no longer supported. Whether the enterprise team should be reflected in each organization. This value cannot be set. 기본값: 다음 중 하나일 수 있습니다.: |
organization_selection_type string Specifies which organizations in the enterprise should have access to this team. Can be one of 기본값: 다음 중 하나일 수 있습니다.: |
group_id string or null The ID of the IdP group to assign team membership with. You can get this value from the REST API endpoints for SCIM. |
"Create an enterprise team"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
201 | Created |
"Create an enterprise team"에 대한 코드 샘플
요청 예제
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/enterprises/ENTERPRISE/teams \
-d '{"name":"Justice League","description":"A great team.","group_id":"62ab9291-fae2-468e-974b-7e45096d5021"}'Response
Status: 201[
{
"id": 1,
"name": "Justice League",
"description": "A great team.",
"slug": "justice-league",
"url": "https://api.github.com/enterprises/dc/teams/justice-league",
"group_id": "62ab9291-fae2-468e-974b-7e45096d5021",
"html_url": "https://github.com/enterprises/dc/teams/justice-league",
"members_url": "https://api.github.com/enterprises/dc/teams/justice-league/members{/member}",
"created_at": "2019-01-26T19:01:12Z",
"updated_at": "2019-01-26T19:14:43Z"
}
]Get an enterprise team
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 and adds the "ent:" prefix. For example, "My TEam Näme" would become ent:my-team-name.
"Get an enterprise team"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"Get an enterprise team"에 대한 매개 변수
| 속성, 형식, 설명 |
|---|
accept string Setting to |
| 속성, 형식, 설명 |
|---|
enterprise string RequiredThe slug version of the enterprise name. |
team_slug string RequiredThe slug of the team name. |
"Get an enterprise team"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
"Get an enterprise team"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/enterprises/ENTERPRISE/teams/TEAM_SLUGResponse
Status: 200[
{
"id": 1,
"name": "Justice League",
"description": "A great team.",
"slug": "justice-league",
"url": "https://api.github.com/enterprises/dc/teams/justice-league",
"group_id": "62ab9291-fae2-468e-974b-7e45096d5021",
"html_url": "https://github.com/enterprises/dc/teams/justice-league",
"members_url": "https://api.github.com/enterprises/dc/teams/justice-league/members{/member}",
"created_at": "2019-01-26T19:01:12Z",
"updated_at": "2019-01-26T19:14:43Z"
}
]Update an enterprise team
To edit a team, the authenticated user must be an enterprise owner.
"Update an enterprise team"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"Update an enterprise team"에 대한 매개 변수
| 속성, 형식, 설명 |
|---|
accept string Setting to |
| 속성, 형식, 설명 |
|---|
enterprise string RequiredThe slug version of the enterprise name. |
team_slug string RequiredThe slug of the team name. |
| 속성, 형식, 설명 |
|---|
name string or null A new name for the team. |
description string or null A new description for the team. |
sync_to_organizations string Retired: this field is no longer supported. Whether the enterprise team should be reflected in each organization. This value cannot be changed. 기본값: 다음 중 하나일 수 있습니다.: |
organization_selection_type string Specifies which organizations in the enterprise should have access to this team. Can be one of 기본값: 다음 중 하나일 수 있습니다.: |
group_id string or null The ID of the IdP group to assign team membership with. The new IdP group will replace the existing one, or replace existing direct members if the team isn't currently linked to an IdP group. |
"Update an enterprise team"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
"Update an enterprise team"에 대한 코드 샘플
요청 예제
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/enterprises/ENTERPRISE/teams/TEAM_SLUG \
-d '{"name":"Justice League","description":"A great team.","group_id":"62ab9291-fae2-468e-974b-7e45096d5021"}'Response
Status: 200[
{
"id": 1,
"name": "Justice League",
"description": "A great team.",
"slug": "justice-league",
"url": "https://api.github.com/enterprises/dc/teams/justice-league",
"group_id": "62ab9291-fae2-468e-974b-7e45096d5021",
"html_url": "https://github.com/enterprises/dc/teams/justice-league",
"members_url": "https://api.github.com/enterprises/dc/teams/justice-league/members{/member}",
"created_at": "2019-01-26T19:01:12Z",
"updated_at": "2019-01-26T19:14:43Z"
}
]Delete an enterprise team
To delete an enterprise team, the authenticated user must be an enterprise owner.
If you are an enterprise owner, deleting an enterprise team will delete all of its IdP mappings as well.
"Delete an enterprise team"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"Delete an enterprise team"에 대한 매개 변수
| 속성, 형식, 설명 |
|---|
accept string Setting to |
| 속성, 형식, 설명 |
|---|
enterprise string RequiredThe slug version of the enterprise name. |
team_slug string RequiredThe slug of the team name. |
"Delete an enterprise team"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
204 | No Content |
403 | Forbidden |
"Delete an enterprise team"에 대한 코드 샘플
요청 예제
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/enterprises/ENTERPRISE/teams/TEAM_SLUGResponse
Status: 204