Синхронизация команд
Используйте REST API для управления подключениями между командами GitHub Enterprise Cloud и группами внешних поставщиков удостоверений (IdP).
Синхронизация команд
Чтобы использовать эти конечные точки, пользователь, прошедший проверку подлинности, должен быть руководителем команды или владельцем организации, связанной с командой. Маркер, используемый для проверки подлинности, также должен быть авторизован для использования с поставщиком удостоверений (SSO). Дополнительные сведения см. в разделе Авторизация личного токена доступа для использования с документами единого входа SAML.
Вы можете управлять участниками команды GitHub Enterprise Cloud через поставщика удостоверений с помощью синхронизации команды. Для использования этих конечных точек необходимо включить синхронизацию команд. Дополнительные сведения см. в разделе Управление синхронизацией команд в организации.
Примечание: Эти конечные точки нельзя использовать с Enterprise Managed Users. Дополнительные сведения об управлении организация с управляемыми пользователями см. в разделе Внешние группы.
List IdP groups for an organization
Lists IdP groups available in an organization.
Параметры для "List IdP groups for an organization"
Заголовки |
---|
Имя, Тип, Описание |
accept string Setting to |
Параметры пути |
Имя, Тип, Описание |
org string ОбязательноThe organization name. The name is not case sensitive. |
Параметры запроса |
Имя, Тип, Описание |
per_page integer The number of results per page (max 100). Значение по умолчанию: |
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 |
Коды состояния HTTP-ответа для "List IdP groups for an organization"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "List IdP groups for an organization"
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"
Заголовки |
---|
Имя, Тип, Описание |
accept string Setting to |
Параметры пути |
Имя, Тип, Описание |
org string ОбязательноThe organization name. The name is not case sensitive. |
team_slug string ОбязательноThe slug of the team name. |
Коды состояния HTTP-ответа для "List IdP groups for a team"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "List IdP groups for a 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/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"
Заголовки | |||||||
---|---|---|---|---|---|---|---|
Имя, Тип, Описание | |||||||
accept string Setting to | |||||||
Параметры пути | |||||||
Имя, Тип, Описание | |||||||
org string ОбязательноThe organization name. The name is not case sensitive. | |||||||
team_slug string ОбязательноThe slug of the team name. | |||||||
Параметры запроса | |||||||
Имя, Тип, Описание | |||||||
groups array of objects The IdP groups you want to connect to a GitHub team. When updating, the new | |||||||
Properties of |
Имя, Тип, Описание |
---|
group_id string ОбязательноID of the IdP group. |
group_name string ОбязательноName of the IdP group. |
group_description string ОбязательноDescription of the IdP group. |
Коды состояния HTTP-ответа для "Create or update IdP group connections"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "Create or update IdP group connections"
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)"
Заголовки |
---|
Имя, Тип, Описание |
accept string Setting to |
Параметры пути |
Имя, Тип, Описание |
team_id integer ОбязательноThe unique identifier of the team. |
Коды состояния HTTP-ответа для "List IdP groups for a team (Legacy)"
Код состояния | Описание |
---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
Примеры кода для "List IdP groups for a team (Legacy)"
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)"
Заголовки | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Имя, Тип, Описание | ||||||||||
accept string Setting to | ||||||||||
Параметры пути | ||||||||||
Имя, Тип, Описание | ||||||||||
team_id integer ОбязательноThe unique identifier of the team. | ||||||||||
Параметры запроса | ||||||||||
Имя, Тип, Описание | ||||||||||
groups array of objects ОбязательноThe IdP groups you want to connect to a GitHub team. When updating, the new | ||||||||||
Properties of |
Имя, Тип, Описание |
---|
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 Коды состояния HTTP-ответа для "Create or update IdP group connections (Legacy)"
Код состояния | Описание |
---|---|
200 | OK |
403 | Forbidden |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Create or update IdP group connections (Legacy)"
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."
}
]
}