# Gitlab API

> Automate GitLab interaction programmatically.

Gitlab is a development API from gitlab.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 358 endpoints.

## At a glance

- Category: [Development](https://www.openparable.com/apis/category/development)
- Provider: gitlab.com
- Authentication: OAuth
- HTTPS: Yes
- CORS: Not stated
- Base URL: https://gitlab.com/api
- Documentation: https://docs.gitlab.com/ee/api/
- OpenAPI description: https://api.apis.guru/v2/specs/gitlab.com/v3/swagger.json
- Version: v3
- Specification updated: 2021-06-21

## Example request

```bash
curl -X GET "https://gitlab.com/api/v3/application/settings" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Endpoints

- `GET /v3/application/settings` — Get the current application settings
- `PUT /v3/application/settings` — Modify application settings
- `POST /v3/ci/lint` — Validation of .gitlab-ci.yml content
- `GET /v3/deploy_keys`
- `GET /v3/dockerfiles` — Get the list of the available template
- `GET /v3/dockerfiles/{name}` — Get the text for a specific template present in local filesystem
- `GET /v3/gitignores` — Get the list of the available template
- `GET /v3/gitignores/{name}` — Get the text for a specific template present in local filesystem
- `GET /v3/gitlab_ci_ymls` — Get the list of the available template
- `GET /v3/gitlab_ci_ymls/{name}` — Get the text for a specific template present in local filesystem
- `GET /v3/groups` — Get a groups list
- `POST /v3/groups` — Create a group. Available only for users who can create groups.
- `GET /v3/groups/owned` — Get list of owned groups for authenticated user
- `GET /v3/groups/{id}` — Get a single group, with containing projects.
- `PUT /v3/groups/{id}` — Update a group. Available only for users who can administrate groups.
- `DELETE /v3/groups/{id}` — Remove a group.
- `GET /v3/groups/{id}/access_requests` — Gets a list of access requests for a group.
- `POST /v3/groups/{id}/access_requests` — Requests access for the authenticated user to a group.
- `DELETE /v3/groups/{id}/access_requests/{user_id}` — Denies an access request for the given user.
- `PUT /v3/groups/{id}/access_requests/{user_id}/approve` — Approves an access request for the given user.
- `GET /v3/groups/{id}/issues` — Get a list of group issues
- `GET /v3/groups/{id}/members` — Gets a list of group or project members viewable by the authenticated user.
- `POST /v3/groups/{id}/members` — Adds a member to a group or project.
- `GET /v3/groups/{id}/members/{user_id}` — Gets a member of a group or project.
- `PUT /v3/groups/{id}/members/{user_id}` — Updates a member of a group or project.
- `DELETE /v3/groups/{id}/members/{user_id}` — Removes a user from a group or project.
- `GET /v3/groups/{id}/notification_settings` — Get group level notification level settings, defaults to Global
- `PUT /v3/groups/{id}/notification_settings` — Update group level notification level settings, defaults to Global
- `GET /v3/groups/{id}/projects` — Get a list of projects in this group.
- `POST /v3/groups/{id}/projects/{project_id}` — Transfer a project to the group namespace. Available only for admin.
- `GET /v3/hooks` — Get the list of system hooks
- `POST /v3/hooks` — Create a new system hook
- `GET /v3/hooks/{id}` — Test a hook
- `DELETE /v3/hooks/{id}` — Delete a hook
- `POST /v3/internal/allowed`
- `GET /v3/internal/broadcast_message`
- `GET /v3/internal/check`
- `GET /v3/internal/discover`
- `POST /v3/internal/lfs_authenticate`
- `GET /v3/internal/merge_request_urls`
- `POST /v3/internal/two_factor_recovery_codes`
- `GET /v3/issues` — Get currently authenticated user's issues
- `GET /v3/keys/{id}` — Get single ssh key by id. Only available to admin users
- `GET /v3/licenses` — Get the list of the available license template
- `GET /v3/licenses/{name}` — Get the text for a specific license
- `GET /v3/namespaces` — Get a namespaces list
- `GET /v3/notification_settings` — Get global notification level settings and email, defaults to Participate
- `PUT /v3/notification_settings` — Update global notification level settings and email, defaults to Participate
- `GET /v3/projects` — Get a projects list for authenticated user
- `POST /v3/projects` — Create new project
- `GET /v3/projects/all` — Get all projects for admin user
- `POST /v3/projects/fork/{id}` — Fork new project for the current user or provided namespace.
- `GET /v3/projects/owned` — Get an owned projects list for authenticated user
- `GET /v3/projects/search/{query}` — Search for projects the current user has access to
- `GET /v3/projects/starred` — Gets starred project for the authenticated user
- `POST /v3/projects/user/{user_id}` — Create new project for a specified user. Only available to admin users.
- `GET /v3/projects/visible` — Get a list of visible projects for authenticated user
- `GET /v3/projects/{id}` — Get a single project
- `PUT /v3/projects/{id}` — Update an existing project
- `DELETE /v3/projects/{id}` — Remove a project
- `POST /v3/projects/{id}/(ref/{ref}/)trigger/builds` — Trigger a GitLab project build
- `GET /v3/projects/{id}/access_requests` — Gets a list of access requests for a project.
- `POST /v3/projects/{id}/access_requests` — Requests access for the authenticated user to a project.
- `DELETE /v3/projects/{id}/access_requests/{user_id}` — Denies an access request for the given user.
- `PUT /v3/projects/{id}/access_requests/{user_id}/approve` — Approves an access request for the given user.
- `POST /v3/projects/{id}/archive` — Archive a project
- `GET /v3/projects/{id}/boards` — Get all project boards
- `GET /v3/projects/{id}/boards/{board_id}/lists` — Get the lists of a project board
- `POST /v3/projects/{id}/boards/{board_id}/lists` — Create a new board list
- `GET /v3/projects/{id}/boards/{board_id}/lists/{list_id}` — Get a list of a project board
- `PUT /v3/projects/{id}/boards/{board_id}/lists/{list_id}` — Moves a board list to a new position
- `DELETE /v3/projects/{id}/boards/{board_id}/lists/{list_id}` — Delete a board list
- `GET /v3/projects/{id}/builds` — Get a project builds
- `GET /v3/projects/{id}/builds/artifacts/{ref_name}/download` — Download the artifacts file from build
- `GET /v3/projects/{id}/builds/{build_id}` — Get a specific build of a project
- `GET /v3/projects/{id}/builds/{build_id}/artifacts` — Download the artifacts file from build
- `POST /v3/projects/{id}/builds/{build_id}/artifacts/keep` — Keep the artifacts to prevent them from being deleted
- `POST /v3/projects/{id}/builds/{build_id}/cancel` — Cancel a specific build of a project
- `POST /v3/projects/{id}/builds/{build_id}/erase` — Erase build (remove artifacts and build trace)
- `POST /v3/projects/{id}/builds/{build_id}/play` — Trigger a manual build
- `POST /v3/projects/{id}/builds/{build_id}/retry` — Retry a specific build of a project
- `GET /v3/projects/{id}/builds/{build_id}/trace` — Get a trace of a specific build of a project
- `GET /v3/projects/{id}/deploy_keys` — Get a specific project's deploy keys
- `POST /v3/projects/{id}/deploy_keys` — Add new deploy key to currently authenticated user
- `GET /v3/projects/{id}/deploy_keys/{key_id}` — Get single deploy key
- `DELETE /v3/projects/{id}/deploy_keys/{key_id}` — Delete deploy key for a project
- `DELETE /v3/projects/{id}/deploy_keys/{key_id}/disable` — Disable a deploy key for a project
- `POST /v3/projects/{id}/deploy_keys/{key_id}/enable` — Enable a deploy key for a project
- `GET /v3/projects/{id}/deployments` — Get all deployments of the project
- `GET /v3/projects/{id}/deployments/{deployment_id}` — Gets a specific deployment
- `GET /v3/projects/{id}/environments` — Get all environments of the project
- `POST /v3/projects/{id}/environments` — Creates a new environment
- `PUT /v3/projects/{id}/environments/{environment_id}` — Updates an existing environment
- `DELETE /v3/projects/{id}/environments/{environment_id}` — Deletes an existing environment
- `GET /v3/projects/{id}/events` — Get events for a single project
- `DELETE /v3/projects/{id}/fork` — Remove a forked_from relationship
- `POST /v3/projects/{id}/fork/{forked_from_id}` — Mark this project as forked from another
- `GET /v3/projects/{id}/hooks` — Get project hooks
- `POST /v3/projects/{id}/hooks` — Add hook to project
- `GET /v3/projects/{id}/hooks/{hook_id}` — Get a project hook

## Questions

### Does the Gitlab API need an API key?

Yes. The Gitlab API uses OAuth authentication; the documentation explains how to get credentials.

### Does the Gitlab API support HTTPS?

Yes, the Gitlab API is served over HTTPS.

### How many endpoints does the Gitlab API have?

Its OpenAPI description lists 358 endpoints in version v3. The first 100 are shown on this page.

### What are alternatives to the Gitlab API?

Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.

## Similar development APIs

- [Cloudflare](https://www.openparable.com/apis/cloudflare): Manage DNS, CDN, Workers and other services; documented with an official OpenAPI 3.0 spec
- [Azure DevOps](https://www.openparable.com/apis/azure-devops): The Azure DevOps basic components of a REST API request/response pair
- [IPify](https://www.openparable.com/apis/ipify): A simple IP Address API
- [App Store Connect API](https://www.openparable.com/apis/app-store-connect): The data structure that represents an app store connect api resource.
- [StackExchange](https://www.openparable.com/apis/stackexchange): Q&A forum for developers
- [IPinfo](https://www.openparable.com/apis/ipinfo): Another simple IP Address API
- [IBM Text to Speech](https://www.openparable.com/apis/ibm-text-to-speech): Convert text to speech
- [SiteIntel](https://www.openparable.com/apis/siteintel): Extract metadata, tech stack, emails, and screenshots from any URL
- [DigitalOcean Status](https://www.openparable.com/apis/digitalocean-status): Status of all DigitalOcean services
- [Netlify](https://www.openparable.com/apis/netlify): Netlify is a hosting service for the programmable web
- [Docker Hub](https://www.openparable.com/apis/docker-hub): Interact with Docker Hub
- [MineSkin API](https://www.openparable.com/apis/mineskin): Client implementations: Java: https://github.com/InventivetalentDev/MineskinClient NodeJS: https://github.com/InventivetalentDev/mineskin-client Examples: https://github.com/MineSkin/examples

Listed from: public-apis (MIT), public-apis database (MIT), APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/gitlab (OpenParable). Cite the canonical URL above.
