GitLab API
Onboard a GitLab project
Add a GitLab project to Gitar and configure webhooks for code review. This endpoint is idempotent — calling it for an already-connected project returns success with status already_connected.
POST
Onboard a GitLab project
Documentation Index
Fetch the complete documentation index at: https://docs.gitar.ai/llms.txt
Use this file to discover all available pages before exploring further.
Idempotent Behavior
This endpoint is safe to call multiple times for the same project. If the project is already connected to Gitar, the response will return"status": "already_connected" instead of creating a duplicate.
Project Identification
You can identify the project to onboard using either:project_id— the numeric GitLab project ID (e.g.12345)project_path— the full path of the project (e.g."my-group/my-project")
project_id takes precedence.
Prerequisites
The Gitar service account must be a Maintainer (or higher) on the project you want to onboard. If the service account doesn’t have access, the request will fail. See Connect GitLab for setup instructions.What This Endpoint Does
When you onboard a project, Gitar will:- Verify the project exists in your connected GitLab instance
- Register the project for Gitar code review
- Configure a project-level webhook so Gitar receives push and merge request events
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Request to onboard a single GitLab project via the external API.
One of project_id or project_path must be provided.
If both are present, project_id takes precedence.
Response
Project onboarded successfully or already connected
Response from onboarding a single GitLab project via the external API.
Onboard a GitLab project