Listing gitlab projects with api


I was reading the API documentation and was trying to list the projects that I have access to, but when I call the /projects API endpoint, I only get projects that I am a member of.

The way the documentation describes the endpoint is “Get a list of projects accessible by the authenticated user.”. I have several projects that are public or internal that I have full access to without needing to be a member of, but they do not show up if I query the API.

Is there a way to get the true list of all the projects that I am capable of accessing?

Using Gitlab 8.4.10


1 Like

Yes, the meaning of the projects list is confusing. Especially since you can find issues to which project you can find no data, in the query below I had to add a left outer to the join on projects to get it working:

select iss.author_username
,      iss.title
from   issues iss
join   projects pjt 
on = iss.project_id
join   notes(iss.project_id, usr
on     1=1
where  iss.confidential = false

I would appreciate it when projects could be split into multiple endpoints:

  1. Projects that you have access to and for which you can find data such as commits as currently connected API user.
  2. Projects that you own (“MyProjects”).

Even better would be extend to project such that it lists all projects that in some way you have access to, with some access identifiers:

  • Is it mine (i.e. ownerid = me.userid)?
  • Can I access issues?
  • Can I etc.