openapi: 3.0.1
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: /
    description: Default Server URL
paths:
  /api/v1/data-push/{poolId}/jobs:
    post:
      operationId: createJob
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
        - in: query
          name: validate
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataPushJob'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataPushJob'
          description: OK
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Bad Request
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Not Found
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: Create a new Data Push Job in a Data Pool
      security:
        - Authorization: []
      tags:
        - Data Push API
    get:
      operationId: listJobs
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DataPushJob'
          description: OK
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Bad Request
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Not Found
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: List running Data Push Jobs for a Data Pool
      tags:
        - Data Push API
  /api/v1/data-push/{poolId}/jobs/{id}/chunks/upserted:
    post:
      operationId: addUpsertedChunk
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
        - description: Job Id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Chunk file
              required:
                - file
      responses:
        '200':
          description: OK
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Bad request
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Job not found
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: Add chunk to a Data Push Job
      tags:
        - Data Push API
  /api/v1/data-push/{poolId}/jobs/{id}/chunks:
    get:
      operationId: listChunks
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
        - description: Job Id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DataPushChunk'
          description: OK
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Bad Request
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Job not found
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: List the chunks of a Data Push Job
      tags:
        - Data Push API
  /api/v1/data-push/{poolId}/jobs/{id}/chunks/deleted:
    post:
      operationId: addDeletedChunk
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
        - description: Job Id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Chunk file
              required:
                - file
      responses:
        '200':
          description: OK
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Bad request
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Job not found
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: Delete rows from a table via a Data Push Job
      tags:
        - Data Push API
  /api/v1/data-push/{poolId}/jobs/{id}:
    get:
      operationId: getJob
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataPushJob'
          description: OK
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Bad Request
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Job not found
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: Get the status of a Data Push Job
      tags:
        - Data Push API
    post:
      operationId: executeJob
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
        - description: The ID of the Job you want to execute.
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: The order column to be used for duplicate removal
          in: query
          name: duplicateRemovalColumn
          required: false
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Job already closed
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Job not found
        '409':
          description: >-
            A job on the same target is already running. Parallel job executions
            are not allowed
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: Execute a Data Push Job
      tags:
        - Data Push API
    delete:
      operationId: deleteJob
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
        - description: The ID of the Job you want to delete.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Bad Request
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Not Found
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: Delete a Data Push Job
      tags:
        - Data Push API
  /api/v1/data-push/{poolId}/jobs/{id}/cancel:
    post:
      operationId: cancelJob
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
        - description: The ID of the Job you want to cancel.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontendHandledBackendError'
          description: Bad Request
        '403':
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: string
          description: Not Found
        '429':
          content:
            application/json:
              schema:
                type: string
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionReference'
          description: Internal Server Error
      summary: Cancel a Data Push Job
      tags:
        - Data Push API
components:
  schemas:
    CSVColumnParsingOptions:
      type: object
      properties:
        columnName:
          type: string
        dateFormat:
          type: string
        decimalSeparator:
          type: string
        thousandsSeparator:
          type: string
    CSVParsingOptions:
      type: object
      properties:
        additionalColumnOptions:
          type: array
          items:
            $ref: '#/components/schemas/CSVColumnParsingOptions'
        charSet:
          type: string
        dateFormat:
          type: string
        decimalSeparator:
          type: string
        escapeSequence:
          type: string
        lineEnding:
          type: string
        quoteSequence:
          type: string
        separatorSequence:
          type: string
        thousandSeparator:
          type: string
    ChunkType:
      type: string
      enum:
        - UPSERT
        - DELETE
    ColumnTransport:
      type: object
      properties:
        columnName:
          type: string
        columnType:
          $ref: '#/components/schemas/ColumnType'
        decimals:
          type: integer
          format: int32
        fieldLength:
          type: integer
          format: int32
        pkField:
          type: boolean
    ColumnType:
      type: string
      enum:
        - INTEGER
        - DATE
        - TIME
        - DATETIME
        - FLOAT
        - BOOLEAN
        - STRING
    DataPushChunk:
      type: object
      properties:
        checksum:
          type: string
        creationDate:
          type: string
          format: date-time
        fileLength:
          type: integer
          format: int64
        id:
          type: string
        optionalTenantId:
          type: string
        pushJobId:
          type: string
        tenantId:
          type: string
          writeOnly: true
        type:
          $ref: '#/components/schemas/ChunkType'
    DataPushJob:
      type: object
      properties:
        allowDuplicate:
          type: boolean
        changeDate:
          type: string
          format: date-time
        connectionId:
          type: string
        creationDate:
          type: string
          format: date-time
        csvParsingOptions:
          $ref: '#/components/schemas/CSVParsingOptions'
        dataPoolId:
          type: string
        fallbackVarcharLength:
          type: integer
          format: int32
        fileType:
          $ref: '#/components/schemas/UploadFileType'
        foreignKeys:
          type: string
        id:
          type: string
        keys:
          type: array
          items:
            type: string
        lastModified:
          type: string
          format: date-time
        lastPing:
          type: string
          format: date-time
        logs:
          type: array
          items:
            type: string
        mirrorTargetNames:
          type: array
          items:
            type: string
        optionalTenantId:
          type: string
        postExecutionQuery:
          type: string
        sanitizedPostExecutionQuery:
          type: string
        status:
          $ref: '#/components/schemas/JobStatus'
        tableSchema:
          $ref: '#/components/schemas/TableTransport'
        targetName:
          type: string
        targetSchema:
          type: string
        tenantId:
          type: string
          writeOnly: true
        type:
          $ref: '#/components/schemas/JobType'
        upsertStrategy:
          $ref: '#/components/schemas/DataPushUpsertStrategy'
      description: The descriptor of the Job which you want to create.
    DataPushUpsertStrategy:
      type: string
      enum:
        - UPSERT_WITH_UNCHANGED_METADATA
        - UPSERT_WITH_NULLIFICATION
    DuplicateRemovalOptions:
      type: object
      properties:
        duplicateRemovalOrderColumn:
          type: string
        filterDeletionsOnOrderColumn:
          type: boolean
        prefilterDeletionsAgainstTempTable:
          type: boolean
        removeDuplicates:
          type: boolean
    ExceptionReference:
      type: object
      properties:
        message:
          type: string
        reference:
          type: string
        shortMessage:
          type: string
    Feature:
      type: object
      properties:
        enabled:
          type: boolean
        key:
          type: string
    FrontendHandledBackendError:
      type: object
      properties:
        errorInformation:
          type: object
        frontendErrorKey:
          type: string
    JobStatus:
      type: string
      enum:
        - NEW
        - QUEUED
        - RUNNING
        - DONE
        - ERROR
        - CANCELED
    JobType:
      type: string
      enum:
        - REPLACE
        - DELTA
    TableTransport:
      type: object
      properties:
        columns:
          type: array
          items:
            $ref: '#/components/schemas/ColumnTransport'
        tableName:
          type: string
    UploadFileType:
      type: string
      enum:
        - PARQUET
        - CSV
