Skip to main content
이제 REST API의 버전이 지정되었습니다. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

팀 동기화를 위한 REST API 엔드포인트

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

팀 동기화 정보

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

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

참고: 이러한 엔드포인트는 Enterprise Managed Users와 함께 사용할 수 없습니다. 관리형 사용자가 있는 조직 관리에 대해 자세히 알아보려면 “외부 그룹에 대한 REST API 엔드포인트”을(를) 참조하세요.

List IdP groups for an organization

Lists IdP groups available in an organization.

"List IdP groups for an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 토큰 형식에서 작동합니다.:

토큰에 다음 권한 집합이 있어야 합니다.:

  • members:write

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

헤더
이름, Type, 설명
accept string

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

경로 매개 변수
이름, Type, 설명
org string Required

The organization name. The name is not case sensitive.

쿼리 매개 변수
이름, Type, 설명
per_page integer

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

기본값: 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 응답 상태 코드

상태 코드설명
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"에 대한 매개 변수

헤더
이름, Type, 설명
accept string

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

경로 매개 변수
이름, Type, 설명
org string Required

The organization name. The name is not case sensitive.

team_slug string Required

The slug of the team name.

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

상태 코드설명
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"에 대한 매개 변수

헤더
이름, Type, 설명
accept string

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

경로 매개 변수
이름, Type, 설명
org string Required

The organization name. The name is not case sensitive.

team_slug string Required

The slug of the team name.

본문 매개 변수
이름, Type, 설명
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.

이름, Type, 설명
group_id string Required

ID of the IdP group.

group_name string Required

Name of the IdP group.

group_description string Required

Description of the IdP group.

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

상태 코드설명
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)"에 대한 매개 변수

헤더
이름, Type, 설명
accept string

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

경로 매개 변수
이름, Type, 설명
team_id integer Required

The unique identifier of the team.

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

상태 코드설명
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)"에 대한 매개 변수

헤더
이름, Type, 설명
accept string

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

경로 매개 변수
이름, Type, 설명
team_id integer Required

The unique identifier of the team.

본문 매개 변수
이름, Type, 설명
groups array of objects Required

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.

이름, Type, 설명
group_id string Required

ID of the IdP group.

group_name string Required

Name of the IdP group.

group_description string Required

Description of the IdP group.

id string
name string
description string
synced_at string

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

상태 코드설명
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." } ] }