where do I find the project id for the gitlab api?

On the Edit Project page there is a Project ID field in the top right corner.

(You can also see the ID on the CI/CD pipelines page, in the exameple code of the Triggers section.)

In older versions, you can see it on the Triggers page, in the URLs of the example code.


I just found out an even easier way to get the project id: just see the HTML content of the gitlab page hosting your project. There is an input with a field called project_id, e.g:

<input type="hidden" name="project_id" id="project_id" value="335" />

The latest version of GitLab 11.4 at the time of this writing now puts the Project ID at the top of the frontpage of your repository.

Screenshot:

GitLab Project Front Page