Skip to content

REST Implementation Non-Standard Operation - InsertIntoTable

REST Route Definition

  /v1/table/{id}/insert:
    parameters:
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/delimiter'
      - name: mode
        in: query
        description: |
          How the insert should behave:
          - append (default): insert data to the existing table
          - overwrite: remove all data in the table and then insert data to it
        required: false
        schema:
          type: string
          enum:
            - append
            - overwrite
          default: append
    post:
      tags:
        - Table
        - Data
      summary: Insert records into a table
      operationId: InsertIntoTable
      description: |
        Insert new records into table `id`.

        REST NAMESPACE ONLY
        REST namespace uses Arrow IPC stream as the request body.
        It passes in the `InsertIntoTableRequest` information in the following way:
        - `id`: pass through path parameter of the same name
        - `mode`: pass through query parameter of the same name
      requestBody:
        description: Arrow IPC stream containing the records to insert
        content:
          application/vnd.apache.arrow.stream:
            schema:
              type: string
              format: binary
        required: true
      responses:
        200:
          $ref: '#/components/responses/InsertIntoTableResponse'
        400:
          $ref: '#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        403:
          $ref: '#/components/responses/ForbiddenErrorResponse'
        404:
          $ref: '#/components/responses/NotFoundErrorResponse'
        503:
          $ref: '#/components/responses/ServiceUnavailableErrorResponse'
        5XX:
          $ref: '#/components/responses/ServerErrorResponse'