GitLab CI/CD container_registry API

Operations related to container registry

Operations 9

GET /api/v4/groups/{id}/registry/repositories List registry repositories within a group #
GET /api/v4/projects/{id}/registry/repositories List container repositories within a project #
DELETE /api/v4/projects/{id}/registry/repositories/{repository_id} Delete repository #
GET /api/v4/projects/{id}/registry/repositories/{repository_id}/tags List tags of a repository #
DELETE /api/v4/projects/{id}/registry/repositories/{repository_id}/tags Delete repository tags (in bulk) #
GET /api/v4/projects/{id}/registry/repositories/{repository_id}/tags/{tag_name} Get details about a repository tag #
DELETE /api/v4/projects/{id}/registry/repositories/{repository_id}/tags/{tag_name} Delete repository tag #
POST /api/v4/container_registry_event/events Receives notifications from the container registry when an operation occurs #
GET /api/v4/registry/repositories/{id} Get a container repository #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitlab-ci-container-registry-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API 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 Specification

gitlab-ci-container-registry-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab access_requests Container Registry API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: container_registry
  description: Operations related to container registry
paths:
  /api/v4/groups/{id}/registry/repositories:
    get:
      summary: List registry repositories within a group
      description: Get a list of registry repositories in a group. This feature was introduced in GitLab 12.2.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group accessible by the authenticated user
        required: true
        schema:
          type: string
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: List registry repositories within a group
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_ContainerRegistry_Repository'
        '401':
          description: Unauthorized
        '404':
          description: Group Not Found
      tags:
      - container_registry
      operationId: getApiV4GroupsIdRegistryRepositories
  /api/v4/projects/{id}/registry/repositories:
    get:
      summary: List container repositories within a project
      description: This feature was introduced in GitLab 11.8.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      - in: query
        name: tags
        description: Determines if tags should be included
        required: false
        schema:
          type: boolean
          default: false
      - in: query
        name: tags_count
        description: Determines if the tags count should be included
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: List container repositories within a project
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_ContainerRegistry_Repository'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
      - container_registry
      operationId: getApiV4ProjectsIdRegistryRepositories
  /api/v4/projects/{id}/registry/repositories/{repository_id}:
    delete:
      summary: Delete repository
      description: This feature was introduced in GitLab 11.8.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: repository_id
        description: The ID of the repository
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '204':
          description: Success
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
      - container_registry
      operationId: deleteApiV4ProjectsIdRegistryRepositoriesRepositoryId
  /api/v4/projects/{id}/registry/repositories/{repository_id}/tags:
    get:
      summary: List tags of a repository
      description: This feature was introduced in GitLab 11.8.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: repository_id
        description: The ID of the repository
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: List tags of a repository
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_ContainerRegistry_Tag'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '405':
          description: Method Not Allowed
      tags:
      - container_registry
      operationId: getApiV4ProjectsIdRegistryRepositoriesRepositoryIdTags
    delete:
      summary: Delete repository tags (in bulk)
      description: This feature was introduced in GitLab 11.8.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: repository_id
        description: The ID of the repository
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: name_regex_delete
        description: The tag name regexp to delete, specify .* to delete all
        required: false
        schema:
          type: string
      - in: query
        name: name_regex
        description: The tag name regexp to delete, specify .* to delete all
        required: false
        schema:
          type: string
      - in: query
        name: name_regex_keep
        description: The tag name regexp to retain
        required: false
        schema:
          type: string
      - in: query
        name: keep_n
        description: Keep n of latest tags with matching name
        required: false
        schema:
          type: integer
          format: int32
      - in: query
        name: older_than
        description: 'Delete older than: 1h, 1d, 1month'
        required: false
        schema:
          type: string
      responses:
        '204':
          description: Success
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
      - container_registry
      operationId: deleteApiV4ProjectsIdRegistryRepositoriesRepositoryIdTags
  /api/v4/projects/{id}/registry/repositories/{repository_id}/tags/{tag_name}:
    get:
      summary: Get details about a repository tag
      description: This feature was introduced in GitLab 11.8.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: repository_id
        description: The ID of the repository
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: tag_name
        description: The name of the tag
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Get details about a repository tag
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_ContainerRegistry_TagDetails'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
      - container_registry
      operationId: getApiV4ProjectsIdRegistryRepositoriesRepositoryIdTagsTagName
    delete:
      summary: Delete repository tag
      description: This feature was introduced in GitLab 11.8.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: repository_id
        description: The ID of the repository
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: tag_name
        description: The name of the tag
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      tags:
      - container_registry
      operationId: deleteApiV4ProjectsIdRegistryRepositoriesRepositoryIdTagsTagName
  /api/v4/container_registry_event/events:
    post:
      summary: Receives notifications from the container registry when an operation occurs
      description: This feature was introduced in GitLab 12.10
      responses:
        '200':
          description: Success
        '401':
          description: Invalid Token
      tags:
      - container_registry
      operationId: postApiV4ContainerRegistryEventEvents
  /api/v4/registry/repositories/{id}:
    get:
      summary: Get a container repository
      description: This feature was introduced in GitLab 13.6.
      parameters:
      - in: path
        name: id
        description: The ID of the repository
        required: true
        schema:
          type: string
      - in: query
        name: tags
        description: Determines if tags should be included
        required: false
        schema:
          type: boolean
          default: false
      - in: query
        name: tags_count
        description: Determines if the tags count should be included
        required: false
        schema:
          type: boolean
          default: false
      - in: query
        name: size
        description: Determines if the size should be included
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Get a container repository
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_ContainerRegistry_Repository'
        '401':
          description: Unauthorized
        '404':
          description: Repository Not Found
      tags:
      - container_registry
      operationId: getApiV4RegistryRepositoriesId
components:
  schemas:
    API_Entities_ContainerRegistry_Tag:
      type: object
      properties:
        name:
          type: string
          example: latest
        path:
          type: string
          example: namespace1/project1/test_image_1:latest
        location:
          type: string
          example: registry.dev/namespace1/project1/test_image_1:latest
      required:
      - name
      - path
      - location
      description: API_Entities_ContainerRegistry_Tag model
    API_Entities_ContainerRegistry_TagDetails:
      type: object
      properties:
        name:
          type: string
          example: latest
        path:
          type: string
          example: namespace1/project1/test_image_1:latest
        location:
          type: string
          example: registry.dev/namespace1/project1/test_image_1:latest
        revision:
          type: string
          example: tagrevision
        short_revision:
          type: string
          example: shortrevison
        digest:
          type: string
          example: shadigest
        created_at:
          type: string
          format: date-time
          example: '2022-01-10T13:39:08.229Z'
        total_size:
          type: integer
          format: int32
          example: 3
      required:
      - name
      - path
      - location
      - revision
      - short_revision
      - digest
      - created_at
      - total_size
      description: API_Entities_ContainerRegistry_TagDetails model
    API_Entities_ContainerRegistry_Repository:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        name:
          type: string
          example: releases
        path:
          type: string
          example: group/project/releases
        project_id:
          type: integer
          format: int32
          example: 9
        location:
          type: string
          example: gitlab.example.com/group/project/releases
        created_at:
          type: string
          format: date-time
          example: '2019-01-10T13:39:08.229Z'
        cleanup_policy_started_at:
          type: string
          format: date-time
          example: '2020-08-17T03:12:35.489Z'
        tags_count:
          type: integer
          format: int32
          example: 3
        tags:
          $ref: '#/components/schemas/API_Entities_ContainerRegistry_Tag'
        delete_api_path:
          type: string
          example: delete/api/path
        size:
          type: integer
          format: int32
          example: 12345
        status:
          type: string
          example: delete_scheduled
      required:
      - id
      - name
      - path
      - project_id
      - location
      - created_at
      - cleanup_policy_started_at
      - status
      description: API_Entities_ContainerRegistry_Repository model
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query