DevOps
Bearer Token
GitLab REST API
Complete DevOps platform REST API for CI/CD automation
GitLab's REST API provides comprehensive access to repositories, CI/CD pipelines, issue tracking, and project management. Developers use it to automate DevOps workflows, integrate GitLab with external tools, and build custom applications on top of GitLab's complete DevOps platform. The API supports everything from repository operations to advanced pipeline orchestration and security scanning.
Base URL
https://gitlab.com/api/v4
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /projects | List all projects accessible to the authenticated user |
| GET | /projects/:id | Get details of a specific project by ID or URL-encoded path |
| POST | /projects | Create a new project with specified configuration |
| GET | /projects/:id/repository/commits | List commits in a project repository |
| GET | /projects/:id/pipelines | List CI/CD pipelines for a project |
| POST | /projects/:id/pipeline | Trigger a new CI/CD pipeline run |
| GET | /projects/:id/pipelines/:pipeline_id/jobs | List jobs in a specific pipeline |
| GET | /projects/:id/merge_requests | List merge requests for a project |
| POST | /projects/:id/merge_requests | Create a new merge request |
| PUT | /projects/:id/merge_requests/:merge_request_iid/merge | Accept and merge a merge request |
| GET | /projects/:id/issues | List issues for a project |
| POST | /projects/:id/issues | Create a new issue in a project |
| GET | /users | List all users in the GitLab instance |
| GET | /groups | List all groups accessible to the authenticated user |
| GET | /projects/:id/repository/branches | List all branches in a project repository |
Code Examples
curl --header "PRIVATE-TOKEN: glpat-xxxxxxxxxxxxxxxxxxxx" \
"https://gitlab.com/api/v4/projects/12345/pipelines" \
| jq '.[] | {id: .id, status: .status, ref: .ref}'
Connect GitLab to AI
Deploy a GitLab MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to GitLab through these tools:
trigger_gitlab_pipeline
Trigger a CI/CD pipeline run for a specific project and branch with optional variables
create_merge_request
Create a merge request from source to target branch with title, description, and assignees
get_pipeline_status
Check the status of running pipelines and retrieve job logs for debugging
manage_project_issues
Create, update, and search issues across GitLab projects with filtering and labeling
analyze_repository_metrics
Retrieve commit history, contributor statistics, and code quality metrics for projects
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy GitLab MCP Server →