Cette version de GitHub Enterprise Server n'est plus disponible depuis le 2024-03-26. Aucune publication de correctifs n’est effectuée, même pour les problèmes de sécurité critiques. Pour de meilleures performances, une sécurité améliorée et de nouvelles fonctionnalités, effectuez une mise à niveau vers la dernière version de GitHub Enterprise. Pour obtenir de l’aide sur la mise à niveau, contactez le support GitHub Enterprise.
Points de terminaison d’API REST pour les groupes externes
Utilisez l’API REST pour afficher les groupes de fournisseurs d’identité externes disponibles pour votre organisation, et de gérer la connexion entre les groupes externes et les équipes de votre organisation.
À propos des groupes externes
Remarque : SCIM pour GitHub Enterprise Server est en version bêta privée et est susceptible de changer. Pour accéder à la bêta, contactez votre responsable de compte dans l’L’équipe commerciale GitHub. Merci de nous faire part de vos commentaires dans la discussion GitHub Community.
Avertissement : La bêta est exclusivement destinée aux tests et aux commentaires. Aucun support n’est disponible. GitHub recommande d’effectuer les tests avec une instance de préproduction. Pour plus d’informations, consultez « Configuration d’une instance de préproduction ».
Pour utiliser ces points de terminaison, l’utilisateur authentifié doit être un responsable d’équipe ou un propriétaire de l’organisation associée à l’équipe.
Get an external group
Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to.
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "GitHub's products" in the GitHub Help documentation.
Paramètres pour « Get an external group »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
org string ObligatoireThe organization name. The name is not case sensitive. |
group_id integer ObligatoireThe unique identifier of the group. |
Codes d’état de la réponse HTTP pour « Get an external group »
Code d’état | Description |
---|---|
200 | OK |
Exemples de code pour « Get an external group »
Exemple de requête
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/orgs/ORG/external-group/GROUP_ID
Response
Status: 200
{
"group_id": "123",
"group_name": "Octocat admins",
"updated_at": "2021-01-24T11:31:04-06:00",
"teams": [
{
"team_id": 1,
"team_name": "team-test"
},
{
"team_id": 2,
"team_name": "team-test2"
}
],
"members": [
{
"member_id": 1,
"member_login": "mona-lisa_eocsaxrs",
"member_name": "Mona Lisa",
"member_email": "mona_lisa@github.com"
},
{
"member_id": 2,
"member_login": "octo-lisa_eocsaxrs",
"member_name": "Octo Lisa",
"member_email": "octo_lisa@github.com"
}
]
}
List external groups in an organization
Lists external groups available in an organization. You can query the groups using the display_name
parameter, only groups with a group_name
containing the text provided in the display_name
parameter will be returned. You can also limit your page results using the per_page
parameter. GitHub Enterprise Server generates a url-encoded page
token using a cursor value for where the next page begins. For more information on cursor pagination, see "Offset and Cursor Pagination explained."
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "GitHub's products" in the GitHub Help documentation.
Paramètres pour « List external groups in an organization »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
org string ObligatoireThe organization name. The name is not case sensitive. |
Nom, Type, Description |
---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: |
page integer Page token |
display_name string Limits the list to groups containing the text in the group name |
Codes d’état de la réponse HTTP pour « List external groups in an organization »
Code d’état | Description |
---|---|
200 | OK |
Exemples de code pour « List external groups in an organization »
Exemple de requête
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/orgs/ORG/external-groups
Response
Status: 200
{
"groups": [
{
"group_id": "123",
"group_name": "Octocat admins",
"updated_at": "2021-01-24T11:31:04-06:00"
},
{
"group_id": "456",
"group_name": "Octocat docs members",
"updated_at": "2021-03-24T11:31:04-06:00"
}
]
}
List a connection between an external group and a team
Lists a connection between a team and an external group.
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "GitHub's products" in the GitHub Help documentation.
Paramètres pour « List a connection between an external group and a team »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
org string ObligatoireThe organization name. The name is not case sensitive. |
team_slug string ObligatoireThe slug of the team name. |
Codes d’état de la réponse HTTP pour « List a connection between an external group and a team »
Code d’état | Description |
---|---|
200 | OK |
Exemples de code pour « List a connection between an external group and a team »
Exemple de requête
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/external-groups
Response
Status: 200
{
"groups": [
{
"group_id": "123",
"group_name": "Octocat admins",
"updated_at": "2021-01-24T11:31:04-06:00"
},
{
"group_id": "456",
"group_name": "Octocat docs members",
"updated_at": "2021-03-24T11:31:04-06:00"
}
]
}
Update the connection between an external group and a team
Creates a connection between a team and an external group. Only one external group can be linked to a team.
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "GitHub's products" in the GitHub Help documentation.
Paramètres pour « Update the connection between an external group and a team »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
org string ObligatoireThe organization name. The name is not case sensitive. |
team_slug string ObligatoireThe slug of the team name. |
Nom, Type, Description |
---|
group_id integer ObligatoireExternal Group Id |
Codes d’état de la réponse HTTP pour « Update the connection between an external group and a team »
Code d’état | Description |
---|---|
200 | OK |
Exemples de code pour « Update the connection between an external group and a team »
Exemple de requête
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/external-groups \
-d '{"group_id":123}'
Response
Status: 200
{
"group_id": "123",
"group_name": "Octocat admins",
"updated_at": "2021-01-24T11:31:04-06:00",
"teams": [
{
"team_id": 1,
"team_name": "team-test"
},
{
"team_id": 2,
"team_name": "team-test2"
}
],
"members": [
{
"member_id": 1,
"member_login": "mona-lisa_eocsaxrs",
"member_name": "Mona Lisa",
"member_email": "mona_lisa@github.com"
},
{
"member_id": 2,
"member_login": "octo-lisa_eocsaxrs",
"member_name": "Octo Lisa",
"member_email": "octo_lisa@github.com"
}
]
}
Remove the connection between an external group and a team
Deletes a connection between a team and an external group.
You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
Paramètres pour « Remove the connection between an external group and a team »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
org string ObligatoireThe organization name. The name is not case sensitive. |
team_slug string ObligatoireThe slug of the team name. |
Codes d’état de la réponse HTTP pour « Remove the connection between an external group and a team »
Code d’état | Description |
---|---|
204 | No Content |
Exemples de code pour « Remove the connection between an external group and a team »
Exemple de requête
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/external-groups
Response
Status: 204