GitLab CI/CD imports API

Operations about imports

Operations 9

POST /api/v4/bulk_imports Start a new GitLab Migration #
GET /api/v4/bulk_imports List all GitLab Migrations #
GET /api/v4/bulk_imports/entities List all GitLab Migrations' entities #
GET /api/v4/bulk_imports/{import_id} Get GitLab Migration details #
GET /api/v4/bulk_imports/{import_id}/entities List GitLab Migration entities #
GET /api/v4/bulk_imports/{import_id}/entities/{entity_id} Get GitLab Migration entity details #
GET /api/v4/bulk_imports/{import_id}/entities/{entity_id}/failures Get GitLab Migration entity failures #
POST /api/v4/bulk_imports/{import_id}/cancel Cancel GitLab Migration #
POST /api/v4/import/github/gists Import User Gists #

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-imports-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-imports-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab access_requests Imports API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: imports
  description: Operations about imports
paths:
  /api/v4/bulk_imports:
    post:
      summary: Start a new GitLab Migration
      description: This feature was introduced in GitLab 14.2.
      responses:
        '201':
          description: Start a new GitLab Migration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_BulkImport'
        '401':
          description: Unauthorized
        '400':
          description: Bad request
        '404':
          description: Not found
        '422':
          description: Unprocessable entity
        '503':
          description: Service unavailable
      tags:
      - imports
      operationId: postApiV4BulkImports
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                configuration[url]:
                  type: string
                  description: Source GitLab instance URL
                configuration[access_token]:
                  type: string
                  description: Access token to the source GitLab instance
                entities[source_type]:
                  type: array
                  items:
                    type: string
                    enum:
                    - group_entity
                    - project_entity
                  description: Source entity type
                entities[source_full_path]:
                  type: array
                  items:
                    type: string
                  description: Relative path of the source entity to import
                entities[destination_namespace]:
                  type: array
                  items:
                    type: string
                  description: Destination namespace for the entity
                entities[destination_slug]:
                  type: array
                  items:
                    type: string
                  description: Destination slug for the entity
                entities[destination_name]:
                  type: array
                  items:
                    type: string
                  description: 'Deprecated: Use :destination_slug instead. Destination slug for the entity'
                entities[migrate_projects]:
                  type: array
                  items:
                    type: boolean
                  default: true
                  description: Indicates group migration should include nested projects
                entities[migrate_memberships]:
                  type: array
                  items:
                    type: boolean
                  default: true
                  description: The option to migrate memberships or not
              required:
              - configuration[url]
              - configuration[access_token]
              - entities[source_type]
              - entities[source_full_path]
              - entities[destination_namespace]
    get:
      summary: List all GitLab Migrations
      description: This feature was introduced in GitLab 14.1.
      parameters:
      - 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: sort
        description: Return GitLab Migrations sorted in created by `asc` or `desc` order.
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: desc
      - in: query
        name: status
        description: Return GitLab Migrations with specified status
        required: false
        schema:
          type: string
          enum:
          - created
          - started
          - finished
          - timeout
          - failed
          - canceled
      responses:
        '200':
          description: List all GitLab Migrations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_BulkImport'
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '503':
          description: Service unavailable
      tags:
      - imports
      operationId: getApiV4BulkImports
  /api/v4/bulk_imports/entities:
    get:
      summary: List all GitLab Migrations' entities
      description: This feature was introduced in GitLab 14.1.
      parameters:
      - 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: sort
        description: Return GitLab Migrations sorted in created by `asc` or `desc` order.
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: desc
      - in: query
        name: status
        description: Return all GitLab Migrations' entities with specified status
        required: false
        schema:
          type: string
          enum:
          - created
          - started
          - finished
          - timeout
          - failed
          - canceled
      responses:
        '200':
          description: List all GitLab Migrations' entities
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_BulkImports'
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '503':
          description: Service unavailable
      tags:
      - imports
      operationId: getApiV4BulkImportsEntities
  /api/v4/bulk_imports/{import_id}:
    get:
      summary: Get GitLab Migration details
      description: This feature was introduced in GitLab 14.1.
      parameters:
      - in: path
        name: import_id
        description: The ID of user's GitLab Migration
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Get GitLab Migration details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_BulkImport'
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '503':
          description: Service unavailable
      tags:
      - imports
      operationId: getApiV4BulkImportsImportId
  /api/v4/bulk_imports/{import_id}/entities:
    get:
      summary: List GitLab Migration entities
      description: This feature was introduced in GitLab 14.1.
      parameters:
      - in: path
        name: import_id
        description: The ID of user's GitLab Migration
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: status
        description: Return import entities with specified status
        required: false
        schema:
          type: string
          enum:
          - created
          - started
          - finished
          - timeout
          - failed
          - canceled
      - 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 GitLab Migration entities
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_BulkImports'
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '503':
          description: Service unavailable
      tags:
      - imports
      operationId: getApiV4BulkImportsImportIdEntities
  /api/v4/bulk_imports/{import_id}/entities/{entity_id}:
    get:
      summary: Get GitLab Migration entity details
      description: This feature was introduced in GitLab 14.1.
      parameters:
      - in: path
        name: import_id
        description: The ID of user's GitLab Migration
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: entity_id
        description: The ID of GitLab Migration entity
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Get GitLab Migration entity details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_BulkImports'
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '503':
          description: Service unavailable
      tags:
      - imports
      operationId: getApiV4BulkImportsImportIdEntitiesEntityId
  /api/v4/bulk_imports/{import_id}/entities/{entity_id}/failures:
    get:
      summary: Get GitLab Migration entity failures
      description: This feature was introduced in GitLab 16.6
      parameters:
      - in: path
        name: import_id
        description: The ID of user's GitLab Migration
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: entity_id
        description: The ID of GitLab Migration entity
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Get GitLab Migration entity failures
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_BulkImports_EntityFailure'
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '503':
          description: Service unavailable
      tags:
      - imports
      operationId: getApiV4BulkImportsImportIdEntitiesEntityIdFailures
  /api/v4/bulk_imports/{import_id}/cancel:
    post:
      summary: Cancel GitLab Migration
      description: This feature was introduced in GitLab 17.1
      parameters:
      - in: path
        name: import_id
        description: The ID of user's GitLab Migration
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Cancel GitLab Migration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_BulkImport'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '503':
          description: Service unavailable
      tags:
      - imports
      operationId: postApiV4BulkImportsImportIdCancel
  /api/v4/import/github/gists:
    post:
      summary: Import User Gists
      description: This feature was introduced in GitLab 15.8
      responses:
        '202':
          description: Import User Gists
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable Entity
        '429':
          description: Too Many Requests
      tags:
      - imports
      operationId: postApiV4ImportGithubGists
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4ImportGithubGists'
        required: true
components:
  schemas:
    API_Entities_BulkImports:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        bulk_import_id:
          type: integer
          format: int32
          example: 1
        status:
          type: string
          enum:
          - created
          - started
          - finished
          - timeout
          - failed
          example: created
        entity_type:
          type: string
          enum:
          - group
          - project
        source_full_path:
          type: string
          example: source_group
        destination_full_path:
          type: string
          example: some_group/source_project
        destination_name:
          type: string
          example: destination_slug
        destination_slug:
          type: string
          example: destination_slug
        destination_namespace:
          type: string
          example: destination_path
        parent_id:
          type: integer
          format: int32
          example: 1
        namespace_id:
          type: integer
          format: int32
          example: 1
        project_id:
          type: integer
          format: int32
          example: 1
        created_at:
          type: string
          format: date-time
          example: '2012-05-28T04:42:42-07:00'
        updated_at:
          type: string
          format: date-time
          example: '2012-05-28T04:42:42-07:00'
        failures:
          type: array
          items:
            $ref: '#/components/schemas/API_Entities_BulkImports_EntityFailure'
        migrate_projects:
          type: boolean
          example: true
        migrate_memberships:
          type: boolean
          example: true
        has_failures:
          type: boolean
          example: false
        stats:
          type: object
      required:
      - id
      - bulk_import_id
      - status
      - entity_type
      - source_full_path
      - destination_full_path
      - destination_name
      - destination_slug
      - destination_namespace
      - parent_id
      - namespace_id
      - project_id
      - created_at
      - updated_at
      - failures
      - migrate_projects
      - migrate_memberships
      - has_failures
      - stats
      description: API_Entities_BulkImports model
    API_Entities_BulkImports_EntityFailure:
      type: object
      properties:
        relation:
          type: string
          example: label
        exception_message:
          type: string
          example: error message
        exception_class:
          type: string
          example: Exception
        correlation_id_value:
          type: string
          example: dfcf583058ed4508e4c7c617bd7f0edd
        source_url:
          type: string
          example: https://source.gitlab.com/group/-/epics/1
        source_title:
          type: string
          example: title
      required:
      - relation
      - exception_message
      - exception_class
      - correlation_id_value
      - source_url
      - source_title
      description: API_Entities_BulkImports_EntityFailure model
    API_Entities_BulkImport:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        status:
          type: string
          enum:
          - created
          - started
          - finished
          - timeout
          - failed
          example: finished
        source_type:
          type: string
          example: gitlab
        source_url:
          type: string
          example: https://source.gitlab.com/
        created_at:
          type: string
          format: date-time
          example: '2012-05-28T04:42:42-07:00'
        updated_at:
          type: string
          format: date-time
          example: '2012-05-28T04:42:42-07:00'
        has_failures:
          type: boolean
          example: false
      required:
      - id
      - status
      - source_type
      - source_url
      - created_at
      - updated_at
      - has_failures
      description: API_Entities_BulkImport model
    postApiV4ImportGithubGists:
      type: object
      properties:
        personal_access_token:
          type: string
          description: GitHub personal access token
      required:
      - personal_access_token
      description: Import User Gists
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query