Skip to main content
설명서에 자주 업데이트를 게시하며 이 페이지의 번역이 계속 진행 중일 수 있습니다. 최신 정보는 영어 설명서를 참조하세요.
이제 REST API의 버전이 지정되었습니다. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

팀 동기화

REST API를 사용하여 GitHub Enterprise Cloud 팀과 IdP(외부 ID 공급자) 그룹 간의 연결을 관리합니다.

팀 동기화 정보

이러한 엔드포인트를 사용하려면 인증된 사용자가 팀 유지 관리자이거나 팀과 연결된 조직의 소유자여야 합니다. 인증에 사용하는 토큰도 IdP(SSO) 공급자와 함께 사용할 수 있는 권한을 부여받아야 합니다. 자세한 내용은 "SAML Single Sign-On에 사용할 개인용 액세스 토큰 권한 부여"을 참조하세요.

팀 동기화를 사용하여 IdP를 통해 GitHub Enterprise Cloud 팀 구성원을 관리할 수 있습니다. 이러한 엔드포인트를 사용하려면 팀 동기화를 사용하도록 설정해야 합니다. 자세한 내용은 "조직의 팀 동기화 관리"을 참조하세요.

참고: 이러한 엔드포인트는 Enterprise Managed Users에서 사용할 수 없습니다. 관리되는 사용자가 있는 조직를 관리하는 방법에 대한 자세한 내용은 "외부 그룹"을 참조하세요.

List IdP groups for an organization

에서 작동 GitHub Apps

Lists IdP groups available in an organization.

"List IdP groups for an organization"에 대한 매개 변수

헤더
속성, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, Description
org string 필수

The organization name. The name is not case sensitive.

쿼리 매개 변수
속성, 형식, Description
per_page integer

The number of results per page (max 100).

기본값: 30

page string

Page token

q string

Filters the results to return only those that begin with the value specified by this parameter. For example, a value of ab will return results that begin with "ab".

"List IdP groups for an organization"에 대한 HTTP 응답 상태 코드

상태 코드Description
200

OK

"List IdP groups for an organization"에 대한 코드 샘플

get/orgs/{org}/team-sync/groups
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/orgs/ORG/team-sync/groups

Response

Status: 200
{ "groups": [ { "group_id": "123", "group_name": "Octocat admins", "group_description": "The people who configure your octoworld." }, { "group_id": "456", "group_name": "Octocat docs members", "group_description": "The people who make your octoworld come to life." } ] }

List IdP groups for a team

List IdP groups connected to a team on GitHub Enterprise Cloud.

Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings.

"List IdP groups for a team"에 대한 매개 변수

헤더
속성, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, Description
org string 필수

The organization name. The name is not case sensitive.

team_slug string 필수

The slug of the team name.

"List IdP groups for a team"에 대한 HTTP 응답 상태 코드

상태 코드Description
200

OK

"List IdP groups for a team"에 대한 코드 샘플

get/orgs/{org}/teams/{team_slug}/team-sync/group-mappings
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/orgs/ORG/teams/TEAM_SLUG/team-sync/group-mappings

Response

Status: 200
{ "groups": [ { "group_id": "123", "group_name": "Octocat admins", "group_description": "The people who configure your octoworld." }, { "group_id": "456", "group_name": "Octocat docs members", "group_description": "The people who make your octoworld come to life." } ] }

Create or update IdP group connections

Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty groups array will remove all connections for a team.

Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

Note: You can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings.

"Create or update IdP group connections"에 대한 매개 변수

헤더
속성, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, Description
org string 필수

The organization name. The name is not case sensitive.

team_slug string 필수

The slug of the team name.

본문 매개 변수
속성, 형식, Description
groups array of objects

The IdP groups you want to connect to a GitHub team. When updating, the new groups object will replace the original one. You must include any existing groups that you don't want to remove.

속성, 형식, Description
group_id string 필수

ID of the IdP group.

group_name string 필수

Name of the IdP group.

group_description string 필수

Description of the IdP group.

"Create or update IdP group connections"에 대한 HTTP 응답 상태 코드

상태 코드Description
200

OK

"Create or update IdP group connections"에 대한 코드 샘플

patch/orgs/{org}/teams/{team_slug}/team-sync/group-mappings
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/orgs/ORG/teams/TEAM_SLUG/team-sync/group-mappings \ -d '{"groups":[{"group_id":"123","group_name":"Octocat admins","group_description":"string"}]}'

Response

Status: 200
{ "groups": [ { "group_id": "123", "group_name": "Octocat admins", "group_description": "The people who configure your octoworld." }, { "group_id": "456", "group_name": "Octocat docs members", "group_description": "The people who make your octoworld come to life." } ] }

List IdP groups for a team (Legacy)

Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List IdP groups for a team endpoint.

Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

List IdP groups connected to a team on GitHub Enterprise Cloud.

"List IdP groups for a team (Legacy)"에 대한 매개 변수

헤더
속성, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, Description
team_id integer 필수

The unique identifier of the team.

"List IdP groups for a team (Legacy)"에 대한 HTTP 응답 상태 코드

상태 코드Description
200

OK

403

Forbidden

404

Resource not found

"List IdP groups for a team (Legacy)"에 대한 코드 샘플

get/teams/{team_id}/team-sync/group-mappings
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/teams/TEAM_ID/team-sync/group-mappings

Response

Status: 200
{ "groups": [ { "group_id": "123", "group_name": "Octocat admins", "group_description": "The people who configure your octoworld." }, { "group_id": "456", "group_name": "Octocat docs members", "group_description": "The people who make your octoworld come to life." } ] }

Create or update IdP group connections (Legacy)

Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Create or update IdP group connections endpoint.

Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty groups array will remove all connections for a team.

"Create or update IdP group connections (Legacy)"에 대한 매개 변수

헤더
속성, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, Description
team_id integer 필수

The unique identifier of the team.

본문 매개 변수
속성, 형식, Description
groups array of objects 필수

The IdP groups you want to connect to a GitHub team. When updating, the new groups object will replace the original one. You must include any existing groups that you don't want to remove.

속성, 형식, Description
group_id string 필수

ID of the IdP group.

group_name string 필수

Name of the IdP group.

group_description string 필수

Description of the IdP group.

id string
name string
description string
synced_at string

"Create or update IdP group connections (Legacy)"에 대한 HTTP 응답 상태 코드

상태 코드Description
200

OK

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

"Create or update IdP group connections (Legacy)"에 대한 코드 샘플

patch/teams/{team_id}/team-sync/group-mappings
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/teams/TEAM_ID/team-sync/group-mappings \ -d '{"groups":[{"group_id":"123","group_name":"Octocat admins","description":"The people who configure your octoworld.","group_description":"string"}]}'

Response

Status: 200
{ "groups": [ { "group_id": "123", "group_name": "Octocat admins", "group_description": "The people who configure your octoworld." } ] }