List Collaborators
For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint.
Team members will include the members of child teams.
You must authenticate using an access token with the read:org
and repo
scopes with push access to use this
endpoint. GitHub Apps must have the members
organization permission and metadata
repository permission to use this
endpoint.
To learn more, visit the GitHub documentation.
Parameters
Parameter | Description |
---|---|
Affiliation | Filter collaborators returned by their affiliation. outside means all outside collaborators of an organization-owned repository. direct means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. all means all collaborators the authenticated user can see. |
Owner | The account owner of the repository. The name is not case sensitive. |
Page | Page number of the results to fetch. |
Per Page | The number of results per page (max 100). |
Repo | The name of the repository. The name is not case sensitive. |
Return All Pages | Automatically fetch all resources, page by page. |
Example Output
{
"value": [
{
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"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}",
"gravatar_id": "",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"permissions": {
"admin": false,
"maintain": false,
"pull": true,
"push": true,
"triage": true
},
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"role_name": "write",
"site_admin": false,
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
}
]
}
Workflow Library Example
List Collaborators with Github and Send Results Via Email