Hello,
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
Thanks,
tim
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
, pjt.name
from issues iss
left
outer
join projects pjt
on pjt.id = iss.project_id
join notes(iss.project_id, iss.id) usr
on 1=1
where iss.confidential = false
I would appreciate it when projects could be split into multiple endpoints:
- Projects that you have access to and for which you can find data such as commits as currently connected API user.
- 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.