---
title: "Add GitLab Self-Managed container registry"
method: POST
path: "/containers/registries/gitlab-self"
---

# Add GitLab Self-Managed container registry

`POST /containers/registries/gitlab-self`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/containers/registries/gitlab-self`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `containers:write`

Add a GitLab Self-Managed (self-hosted) container registry to Aikido to scan

## Request body

- object
  - `username` string, required: The GitLab username (use the @ handle, without spaces)
  - `accesstoken` string, required: A GitLab personal or group access token with registry read permissions
  - `registry_name` string, required: The numeric GitLab group ID whose container registry should be scanned
  - `api_url` string, uri, required: The base URL of the GitLab self-managed instance (e.g. https://gitlab.example.com)

## Response `200`

The GitLab self-managed container registry has been added to aikido.

- object
  - `registry_id` integer: The id of the newly added container registry in aikido

## Other responses

- `400`: One or more of the provided fields are invalid.

---

[API](https://skmtc.dev/aikido/apis/aikido-security-api-documentation.md) - [All operations](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/revisions/da8691338133?raw)
