Search code examples
apigitlab-api

GitLab api: how am i able the get the list of projects using gitlab api?


i was trying to get the list of projects in my gitlab using Git api. for that i was following Git lab api instruction.

they said i can access the list of project by this link: https://gitlab.com/api/v4/projects?access_token=some_token.

but unfortunately with the above link i got bunch of information, which is not mine at all. i got the information which is owned by other users.

In that case how am i able the get my own projects information?

Nevertheless, the respond JSON has so many attribute. is there anyway that i can achieve the attribute according to my desire?


Solution

  • You can use owned=true to get only project which you are owner and simple=true to have limited field, check this :

    https://gitlab.com/api/v4/projects?access_token=some_token&owned=true&simple=true