Github REST API: list collaborators

102 Views Asked by At

I need to retrieve a list of people we're paying the Github license for. So it includes:

  • members
  • outside collaborators
  • pending invitations

While it's rather easy to read the members, I have no idea what is the right way to get the list of outside collaborators. Sure, there is an endpoint /repos/{owner}/{repo}/collaborators but I'd need to go through hundreds/thousands of repos and check for collaborators, one by one. Is there a better way to get the list of people we're paying for? I found nothing in billing API.

Thank you

1

There are 1 best solutions below

1
jessehouwing On

If you're on Enterprise, you can see those stats in the portal in a single click:

enter image description here

For free organisations and teams, you can see the membership status here:

https://github.com/orgs/{orgname}/people

enter image description here