Gitar GitLab Projects API
The GitLab Projects API from Gitar — 1 operation(s) for gitlab projects.
The GitLab Projects API from Gitar — 1 operation(s) for gitlab projects.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/gitar:gitar-gitlab-projects-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Gitar External GitLab Projects API
description: API for managing your Gitar installation and integrations
contact:
name: Gitar
url: https://gitar.ai
email: noreply@gitar.ai
license:
name: ''
version: 1.0.0
servers:
- url: https://api.gitar.ai/v1
tags:
- name: GitLab Projects
paths:
/external/gitlab/projects:
post:
tags:
- GitLab Projects
summary: Onboard a GitLab project
description: '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`.
**Selecting a GitLab instance.** Organizations with a single connected GitLab instance can omit `host`. Once an organization connects more than one instance, `host` becomes required: without it Gitar cannot tell which instance a project id or path refers to, and the request is rejected with `409 Conflict` listing the connected instances.'
operationId: onboardGitlabProject
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OnboardGitlabProjectApiRequest'
required: true
responses:
'200':
description: Project onboarded successfully or already connected
content:
application/json:
schema:
$ref: '#/components/schemas/OnboardGitlabProjectApiResponse'
'400':
description: Bad request (missing project_id and project_path, or no GitLab integration for this organization)
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseFailure'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseFailure'
'403':
description: Insufficient scopes
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseFailure'
'404':
description: Organization not found
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseFailure'
'409':
description: The organization has several GitLab instances and `host` did not identify one, or the project id is already connected from a different instance
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseFailure'
security:
- bearerAuth: []
components:
schemas:
OnboardGitlabProjectApiResponse:
type: object
description: Response from onboarding a single GitLab project via the external API.
required:
- success
- project_path
- status
- webhook_configured
properties:
error:
type:
- string
- 'null'
project_id:
type:
- integer
- 'null'
format: int64
minimum: 0
project_path:
type: string
status:
$ref: '#/components/schemas/OnboardProjectStatus'
success:
type: boolean
webhook_configured:
type: boolean
ResponseFailure:
type: object
required:
- message
properties:
error_code:
type:
- string
- 'null'
message:
type: string
OnboardProjectStatus:
type: string
description: Status of an individual project onboard operation.
enum:
- onboarded
- already_connected
- failed
OnboardGitlabProjectApiRequest:
type: object
description: '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.'
properties:
host:
type:
- string
- 'null'
description: 'GitLab instance the project lives on (e.g. "https://gitlab.com").
Optional for organizations with a single connected GitLab instance, and
required once there is more than one — without it the project would be
looked up on an arbitrary instance. A request that omits or misnames the
host on a multi-instance organization is rejected with `409 Conflict`
listing the connected instances.'
project_id:
type:
- integer
- 'null'
format: int64
description: GitLab project numeric ID (e.g. 12345)
minimum: 0
project_path:
type:
- string
- 'null'
description: GitLab project path (e.g. "group/subgroup/project")
securitySchemes:
bearerAuth:
type: http
scheme: bearer
x-provenance:
method: harvested
publisher: Gitar
source: https://docs.gitar.ai/openapi.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)