GitLab CI/CD offline_transfers API

Operations about offline_transfers

OpenAPI Specification

gitlab-ci-offline-transfers-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: GitLab access_requests offline_transfers API
  version: v4
  description: Operations related to access requests
host: gitlab.com
produces:
- application/json
tags:
- name: offline_transfers
  description: Operations about offline_transfers
paths:
  /api/v4/offline_exports:
    post:
      summary: Start a new offline transfer export
      description: Initiates a new offline transfer export
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - name: postApiV4OfflineExports
        in: body
        required: true
        schema:
          $ref: '#/definitions/postApiV4OfflineExports'
      responses:
        '201':
          description: Start a new offline transfer export
      tags:
      - offline_transfers
      operationId: postApiV4OfflineExports
    get:
      summary: List all offline transfer exports
      description: Lists all offline transfer exports
      produces:
      - application/json
      parameters:
      - in: query
        name: page
        description: Current page number
        type: integer
        format: int32
        default: 1
        required: false
        example: 1
      - in: query
        name: per_page
        description: Number of items per page
        type: integer
        format: int32
        default: 20
        required: false
        example: 20
      - in: query
        name: sort
        description: Return offline transfer exports sorted in created by `asc` or `desc` order.
        type: string
        default: desc
        enum:
        - asc
        - desc
        required: false
      - in: query
        name: status
        description: Return offline transfer exports with specified status
        type: string
        enum:
        - created
        - started
        - finished
        - failed
        required: false
      responses:
        '200':
          description: List all offline transfer exports
      tags:
      - offline_transfers
      operationId: getApiV4OfflineExports
  /api/v4/offline_exports/{id}:
    get:
      summary: Get offline transfer export details
      description: Retrieves details of an offline transfer export
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID of user's offline transfer export
        type: integer
        format: int32
        required: true
      responses:
        '200':
          description: Get offline transfer export details
      tags:
      - offline_transfers
      operationId: getApiV4OfflineExportsId
  /api/v4/offline_imports:
    post:
      summary: Start a new offline transfer import
      description: Initiates a new offline transfer import from object storage
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - name: postApiV4OfflineImports
        in: body
        required: true
        schema:
          $ref: '#/definitions/postApiV4OfflineImports'
      responses:
        '201':
          description: Start a new offline transfer import
          schema:
            $ref: '#/definitions/API_Entities_BulkImport'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '422':
          description: Unprocessable entity
        '429':
          description: Too many requests
      tags:
      - offline_transfers
      operationId: postApiV4OfflineImports
definitions:
  postApiV4OfflineImports:
    type: object
    properties:
      bucket:
        type: string
        description: Name of the object storage bucket where export data is stored
      aws_s3_configuration:
        type: object
        description: AWS S3 object storage configuration
        properties:
          aws_access_key_id:
            type: string
            description: AWS S3 access key ID
          aws_secret_access_key:
            type: string
            description: AWS S3 secret access key
          region:
            type: string
            description: AWS S3 object storage region
          path_style:
            type: boolean
            description: Use path-style URLs instead of virtual-hosted-style URLs
            default: false
        required:
        - aws_access_key_id
        - aws_secret_access_key
        - region
      s3_compatible_configuration:
        type: object
        description: MinIO or other S3-compatible object storage configuration
        properties:
          aws_access_key_id:
            type: string
            description: S3-compatible access key ID
          aws_secret_access_key:
            type: string
            description: S3-compatible secret access key
          region:
            type: string
            description: S3-compatible object storage region
          endpoint:
            type: string
            description: Object storage location endpoint
          path_style:
            type: boolean
            description: Use path-style URLs instead of virtual-hosted-style URLs
            default: true
        required:
        - aws_access_key_id
        - aws_secret_access_key
        - region
        - endpoint
      export_prefix:
        type: string
        description: Prefix of the export within the bucket
      entities:
        type: array
        description: List of entities to import
        items:
          type: object
          properties:
            source_type:
              type: string
              description: Type of the entity to import
              enum:
              - group_entity
              - project_entity
            source_full_path:
              type: string
              description: Full path of the entity on the source instance
            destination_namespace:
              type: string
              description: Full path of the destination namespace
            destination_slug:
              type: string
              description: Destination slug for the imported entity
          required:
          - source_type
          - source_full_path
          - destination_namespace
    required:
    - bucket
    - export_prefix
    - entities
    description: Start a new offline transfer import
  postApiV4OfflineExports:
    type: object
    properties:
      bucket:
        type: string
        description: Name of the object storage bucket where export data is stored
      aws_s3_configuration:
        type: object
        description: AWS S3 object storage configuration
        properties:
          aws_access_key_id:
            type: string
            description: AWS S3 access key ID
          aws_secret_access_key:
            type: string
            description: AWS S3 secret access key
          region:
            type: string
            description: AWS S3 object storage region
          path_style:
            type: boolean
            description: Use path-style URLs instead of virtual-hosted-style URLs
            default: false
        required:
        - aws_access_key_id
        - aws_secret_access_key
        - region
      s3_compatible_configuration:
        type: object
        description: MinIO or other S3-compatible object storage configuration
        properties:
          aws_access_key_id:
            type: string
            description: S3-compatible access key ID
          aws_secret_access_key:
            type: string
            description: S3-compatible secret access key
          region:
            type: string
            description: S3-compatible object storage region
          endpoint:
            type: string
            description: Object storage location endpoint
          path_style:
            type: boolean
            description: Use path-style URLs instead of virtual-hosted-style URLs
            default: true
        required:
        - aws_access_key_id
        - aws_secret_access_key
        - region
        - endpoint
      entities:
        type: array
        description: List of entities to export
        items:
          type: object
          properties:
            full_path:
              type: string
              description: Relative path of the entity to export
              example: '''source/full/path'' not ''https://example.com/source/full/path'''
          required:
          - full_path
    required:
    - bucket
    - entities
    description: Start a new offline transfer export
  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
securityDefinitions:
  access_token_header:
    type: apiKey
    name: PRIVATE-TOKEN
    in: header
  access_token_query:
    type: apiKey
    name: private_token
    in: query