GitHub has introduced new API endpoints to better manage organizations on its platform. A new Outside Collaborators API will enable remote administration of access privileges and user-management.
An outside collaborator in GitHub is someone who is not a member of an organization but has read, write, or admin privileges for a number of repositories in that organization. Outside collaborators are often consultants or temporary employees who lose their status of full members while retaining some privileges for concrete repositories.
The new outside collaborators API makes it possible to:
- list outside collaborators
- remove an outside collaborator
- convert a member into an outside collaborator.
The outside collaborators API is part of the Organizations API which already included four main endpoints – organizations, members, teams, and webhooks. Both the members and organizations endpoints have been extended to better integrate with the new outside collaborator API. In particular:
- list pending organization and team invitations
Also, the collaborators API, part of the repositories API now allows to review a user’s permission level.
Additionally, a few existing endpoints have been adapted to better integrate with the new organization endpoints, adding the following new features:
- when getting or editing an organization, two new organization-wide settings can be retrieved and set: the
default_repository_permissionandmembers_can_create_repositories - the create team endpoint now supports a
maintainersparameter that allow to add team maintainers - the list collaborators endpoint now supports an
affiliationparameter to filter a repository’s collaborators by their affiliation type
All new or modified endpoints require a custom media type in the Accept header:
application/vnd.github.korra-preview+json
Being only a preview, the new APIs can be changed by GitHub without previous notice based on developer feedback.