GitLab REST API
APIManage GitLab projects, repositories and merge requests over REST
- Access
- Access token for private projects
About
GitLab's versioned REST API lets applications read and manage projects, repository files, branches, issues and merge requests on GitLab.com or a self-managed instance. Access depends on the token's scopes and the user's project permissions. This card covers the REST API.
What you can do with it
- List and create GitLab projects from an internal developer portal
- Read repository files and create branches or merge requests for code changes
- Sync GitLab issues with an external project management system
Get started
- Create a personal access token with the needed scopes
- Use your host's /api/v4; GitLab.com project tokens need Premium or Ultimate
- Send the token in the PRIVATE-TOKEN header for protected resources
Example
curl --request GET \
--header "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" \
"https://gitlab.com/api/v4/projects"Details
- Hosting
- Hosted service, Self-hosted
- Available in
- Worldwide
- MCP server
- None