Skip to content

List projects API only returning projects user is member of

According to the List projects API docs, GET /projects returns a "list of projects accessible by the authenticated user" however it is only returning a list of projects the user is a member of and not public projects they are not a member of.

Steps to reproduce

On GitLab.com use the GET /projects API endpoint

Expected behavior

GET /projects returns list of projects accessible by the authenticated user including public projects they are not a member of.

Observed behavior

GET /projects only returns a list of projects the user is a member of.

Workarounds

  • Iterate over each project using GET /projects/:id
  • Search using GET /projects/search/%25

Relevant code

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/projects.rb#L19

Related: http://feedback.gitlab.com/forums/176466-general/suggestions/5852627-api-request-for-listing-projects-should-allow-disc & http://feedback.gitlab.com/forums/176466-general/suggestions/7542211-list-public-repos-through-api