0

I want to retrieve all members in a project irrespective of their role.

According to this documentation (https://docs.gitlab.com/ee/api/members.html)

If i use this API : GET /projects/:id/members

I can only get the members that are created by the user whose personal access token i pass in the API request. But i want to retrieve all the members in a project irrespective of their role and who created it.

1 Answer 1

1

I think below should work for you.

GET /api/v4/projects/:id/members/all

This will list all members of the project. I can verify the difference between output compared with below API which returns limited users (created by the authenticated user)

GET api/v4/projects/:id/members
Sign up to request clarification or add additional context in comments.

2 Comments

I even tried using this API. It returns the members created by the authenticated user and some other list of members who is not in the members list of the project (which is not required) but not returns the members created by other users.
Okay, I see the results and not all users are created by me. But yes I see some other members too. May be inherited from the Parent Group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.