List team members
Team members will include the members of child teams.
Each member includes their role on the team (member or maintainer) and an inherited flag indicating whether the membership is inherited from a child team (true) or is a direct membership (false). These fields let you read a member’s role and direct/inherited status without additional requests.
To list members in a team, the team must be visible to the authenticated user.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
The slug of the team name.
Query Parameters
Section titled “ Query Parameters ”Filters members returned by their role in the team.
The number of results per page (max 100). For more information, see “Using pagination in the REST API.”
The page number of the results to fetch. For more information, see “Using pagination in the REST API.”
Responses
Section titled “ Responses ”Response
A user that is a member of a team, including their role on the team and whether the membership is inherited from a child team.
object
The member’s role on the team. Only present on the List team members endpoint, and only when the feature is enabled for the organization.
Whether the user is a member of the team only through a child team. true means the membership is inherited from a child team; false means the user is a direct (immediate) member of the team. Only present on the List team members endpoint, and only when the feature is enabled for the organization.
Examples
[ { "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, "role": "member", "inherited": false }]Headers
Section titled “ Headers ”Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"