Outside Collaborators
List outside collaborators
List all users who are outside collaborators of an organization.
GET /orgs/:org/outside_collaborators
Parameters
| Name | Type | Description |
|---|---|---|
filter |
string |
Filter the list of outside collaborators. Can be one of: * 2fa_disabled: Outside collaborators without two-factor authentication enabled. * all: All outside collaborators.Default: all
|
Response
Status: 200 OK
Link: <https://api.github.com/resource?page=2>; rel="next",
<https://api.github.com/resource?page=5>; rel="last"
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]
Remove outside collaborator
Removing a user from this list will remove them from all the organization's repositories.
DELETE /orgs/:org/outside_collaborators/:username
Response
Status: 204 No Content
Response if user is a member of the organization
Status: 422 Unprocessable Entity
{
"message": "You cannot specify an organization member to remove as an outside collaborator.",
"documentation_url": "https://developer.github.com/enterprise/2.19/v3/orgs/outside_collaborators/#remove-outside-collaborator"
}
Convert member to outside collaborator
When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "Converting an organization member to an outside collaborator".
PUT /orgs/:org/outside_collaborators/:username
Response
Status: 204 No Content
Response if user is the last owner of the organization
Status: 403 Forbidden
{
"message": "Cannot convert the last owner to an outside collaborator",
"documentation_url": "https://developer.github.com/enterprise/2.19/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator"
}
Response if user is not a member of the organization
Status: 403 Forbidden
{
"message": "<user> is not a member of the <organization> organization.",
"documentation_url": "https://developer.github.com/enterprise/2.19/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator"
}