Skip to content

Get Project id from url

Description

Context

I want to create a webpage-only application to download releases from my gitlab instance. Therefore, I would like to be able to get the releases. This is only possible, when I know the id. In order to get the id, I would like to use the gitlab API.

Problem

I know this URL: https://gitlab.quelltext.eu/niccokunzmann/quelltext.eu I want to create this URL: https://gitlab.quelltext.eu/api/v3/projects/2/

There seems to be no way to convert a project http url to a project id.

Proposal

I would like an API endpoint to convert (parts of) the project URL to the id.

https://gitlab.quelltext.eu/api/v3/project_path_with_namespace/niccokunzmann/quelltext.eu

Should return the same as https://gitlab.quelltext.eu/api/v3/projects/2/

{"id":2,"description":"", ...}

Links / references