How to get groups and projects for current user ? #2124
-
How to get groups and projects for current user ?I'm not sure if I am doing something wrong, but I try to get my groups and projects on gitlab.com and I see quite a difference: Mostly taken from the Getting started > Managers docs:
Looking at #404 (comment), it seems I need to get projects via some user object, will try that out next. Still wondering... Is this the intended behavior ? Expected BehaviorI would expect Actual Behavior
Specifications
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To retrieve a user's projects would do something like this:
https://docs.gitlab.com/ee/api/projects.html#list-user-projects But as the Gitlab docs state this only retrieves projects located under the user's namespace. Not all projects that the user has access to. Now to get all projects that the current user is a member of can do:
https://docs.gitlab.com/ee/api/projects.html#list-all-projects |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
To retrieve a user's projects would do something like this:
https://docs.gitlab.com/ee/api/projects.html#list-user-projects
But as the Gitlab docs state this only retrieves projects located under the user's namespace. Not all projects that the user has access to.
Now to get all projects that the current user is a member of can do: