LanceDB Table API

Operations that are related to a table

OpenAPI Specification

lancedb-table-api-openapi.yml Raw ↑
openapi: 3.1.1
info:
  title: Lance Namespace Specification Data Table API
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
  description: 'This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts:


    The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define

    the request and response shape for each operation in a Lance Namespace across all implementations.

    See https://lance.org/format/namespace/operations for more details.


    The `servers`, `security`, `paths`, `components/parameters` sections are for the

    Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets.

    See https://lance.org/format/namespace/rest for more details.

    '
servers:
- url: '{scheme}://{host}:{port}/{basePath}'
  description: Generic server URL with all parts configurable
  variables:
    scheme:
      default: http
    host:
      default: localhost
    port:
      default: '2333'
    basePath:
      default: ''
- url: '{scheme}://{host}/{basePath}'
  description: Server URL when the port can be inferred from the scheme
  variables:
    scheme:
      default: http
    host:
      default: localhost
    basePath:
      default: ''
security:
- OAuth2: []
- BearerAuth: []
- ApiKeyAuth: []
tags:
- name: Table
  description: 'Operations that are related to a table

    '
paths:
  /v1/namespace/{id}/table/list:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    - $ref: '#/components/parameters/page_token'
    - $ref: '#/components/parameters/limit'
    - $ref: '#/components/parameters/include_declared'
    get:
      tags:
      - Table
      summary: List tables in a namespace
      operationId: ListTables
      description: 'List all child table names of the parent namespace `id`.


        REST NAMESPACE ONLY

        REST namespace uses GET to perform this operation without a request body.

        It passes in the `ListTablesRequest` information in the following way:

        - `id`: pass through path parameter of the same name

        - `page_token`: pass through query parameter of the same name

        - `limit`: pass through query parameter of the same name

        - `include_declared`: pass through query parameter of the same name

        '
      responses:
        200:
          $ref: '#/components/responses/ListTablesResponse'
        400:
          $ref: '#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        403:
          $ref: '#/components/responses/ForbiddenErrorResponse'
        404:
          $ref: '#/components/responses/NotFoundErrorResponse'
        406:
          $ref: '#/components/responses/UnsupportedOperationErrorResponse'
        503:
          $ref: '#/components/responses/ServiceUnavailableErrorResponse'
        5XX:
          $ref: '#/components/responses/ServerErrorResponse'
  /v1/table:
    get:
      tags:
      - Table
      summary: List all tables
      operationId: ListAllTables
      description: 'List all tables across all namespaces.


        REST NAMESPACE ONLY

        REST namespace uses GET to perform this operation without a request body.

        It passes in the `ListAllTablesRequest` information in the following way:

        - `page_token`: pass through query parameter of the same name

        - `limit`: pass through query parameter of the same name

        - `delimiter`: pass through query parameter of the same name

        - `include_declared`: pass through query parameter of the same name

        '
      parameters:
      - $ref: '#/components/parameters/delimiter'
      - $ref: '#/components/parameters/page_token'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/include_declared'
      responses:
        200:
          $ref: '#/components/responses/ListTablesResponse'
        400:
          $ref: '#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        403:
          $ref: '#/components/responses/ForbiddenErrorResponse'
        503:
          $ref: '#/components/responses/ServiceUnavailableErrorResponse'
        5XX:
          $ref: '#/components/responses/ServerErrorResponse'
  /v1/table/{id}/register:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Register a table to a namespace
      operationId: RegisterTable
      description: 'Register an existing table at a given storage location as `id`.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterTableRequest'
      responses:
        200:
          $ref: '#/components/responses/RegisterTableResponse'
        400:
          $ref: '#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        403:
          $ref: '#/components/responses/ForbiddenErrorResponse'
        404:
          $ref: '#/components/responses/NotFoundErrorResponse'
        406:
          $ref: '#/components/responses/UnsupportedOperationErrorResponse'
        409:
          $ref: '#/components/responses/ConflictErrorResponse'
        503:
          $ref: '#/components/responses/ServiceUnavailableErrorResponse'
        5XX:
          $ref: '#/components/responses/ServerErrorResponse'
  /v1/table/{id}/describe:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    - $ref: '#/components/parameters/with_table_uri'
    - $ref: '#/components/parameters/load_detailed_metadata'
    - $ref: '#/components/parameters/check_declared'
    post:
      tags:
      - Table
      summary: Describe information of a table
      operationId: DescribeTable
      description: 'Describe the detailed information for table `id`.


        REST NAMESPACE ONLY

        REST namespace passes `with_table_uri`, `load_detailed_metadata`, and `check_declared` as query parameters instead of in the request body.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DescribeTableRequest'
      responses:
        200:
          $ref: '#/components/responses/DescribeTableResponse'
        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'
  /v1/table/{id}/exists:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Check if a table exists
      operationId: TableExists
      description: 'Check if table `id` exists.


        This operation should behave exactly like DescribeTable,

        except it does not contain a response body.


        For DirectoryNamespace implementation, a table exists if either:

        - The table has Lance data versions (regular table created with CreateTable)

        - A `.lance-reserved` file exists in the table directory (declared table created with DeclareTable)

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableExistsRequest'
      responses:
        200:
          description: Success, no content
        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'
  /v1/table/{id}/drop:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Drop a table
      operationId: DropTable
      description: 'Drop table `id` and delete its data.


        REST NAMESPACE ONLY

        REST namespace does not use a request body for this operation.

        The `DropTableRequest` information is passed in the following way:

        - `id`: pass through path parameter of the same name

        '
      responses:
        200:
          $ref: '#/components/responses/DropTableResponse'
        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'
  /v1/table/{id}/deregister:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Deregister a table
      operationId: DeregisterTable
      description: 'Deregister table `id` from its namespace.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeregisterTableRequest'
      responses:
        200:
          $ref: '#/components/responses/DeregisterTableResponse'
        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'
  /v1/table/{id}/restore:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Restore table to a specific version
      operationId: RestoreTable
      description: 'Restore table `id` to a specific version.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestoreTableRequest'
      responses:
        200:
          $ref: '#/components/responses/RestoreTableResponse'
        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'
  /v1/table/{id}/rename:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Rename a table
      operationId: RenameTable
      description: 'Rename table `id` to a new name.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenameTableRequest'
      responses:
        200:
          $ref: '#/components/responses/RenameTableResponse'
        400:
          $ref: '#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        403:
          $ref: '#/components/responses/ForbiddenErrorResponse'
        404:
          $ref: '#/components/responses/NotFoundErrorResponse'
        409:
          $ref: '#/components/responses/ConflictErrorResponse'
        503:
          $ref: '#/components/responses/ServiceUnavailableErrorResponse'
        5XX:
          $ref: '#/components/responses/ServerErrorResponse'
  /v1/table/{id}/schema_metadata/update:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Update table schema metadata
      operationId: UpdateTableSchemaMetadata
      description: 'Replace the schema metadata for table `id` with the provided key-value pairs.


        REST NAMESPACE ONLY

        REST namespace uses a direct object (map of string to string) as both request and response body

        instead of the wrapped `UpdateTableSchemaMetadataRequest` and `UpdateTableSchemaMetadataResponse`.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: string
              description: Schema metadata key-value pairs
      responses:
        200:
          description: Schema metadata update result
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
                description: The updated schema metadata
        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'
  /v1/table/{id}/version/list:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    - $ref: '#/components/parameters/page_token'
    - $ref: '#/components/parameters/limit'
    - name: descending
      in: query
      description: 'When true, versions are guaranteed to be returned in descending order (latest to oldest).

        When false or not specified, the ordering is implementation-defined.

        '
      required: false
      schema:
        type: boolean
    post:
      tags:
      - Table
      summary: List all versions of a table
      operationId: ListTableVersions
      description: 'List all versions (commits) of table `id` with their metadata.


        Use `descending=true` to guarantee versions are returned in descending order (latest to oldest).

        Otherwise, the ordering is implementation-defined.


        REST NAMESPACE ONLY

        REST namespace does not use a request body for this operation.

        The `ListTableVersionsRequest` information is passed in the following way:

        - `id`: pass through path parameter of the same name

        - `page_token`: pass through query parameter of the same name

        - `limit`: pass through query parameter of the same name

        - `descending`: pass through query parameter of the same name

        '
      responses:
        200:
          $ref: '#/components/responses/ListTableVersionsResponse'
        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'
  /v1/table/{id}/version/create:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Create a new table version
      operationId: CreateTableVersion
      description: 'Create a new version entry for table `id`.


        This operation supports `put_if_not_exists` semantics.

        The operation will fail with 409 Conflict if the version already exists.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTableVersionRequest'
      responses:
        200:
          $ref: '#/components/responses/CreateTableVersionResponse'
        400:
          $ref: '#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        403:
          $ref: '#/components/responses/ForbiddenErrorResponse'
        404:
          $ref: '#/components/responses/NotFoundErrorResponse'
        409:
          $ref: '#/components/responses/ConflictErrorResponse'
        503:
          $ref: '#/components/responses/ServiceUnavailableErrorResponse'
        5XX:
          $ref: '#/components/responses/ServerErrorResponse'
  /v1/table/{id}/version/describe:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Describe a specific table version
      operationId: DescribeTableVersion
      description: 'Describe the detailed information for a specific version of table `id`.


        Returns the manifest path and metadata for the specified version.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DescribeTableVersionRequest'
      responses:
        200:
          $ref: '#/components/responses/DescribeTableVersionResponse'
        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'
  /v1/table/{id}/version/delete:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Delete table version records
      operationId: BatchDeleteTableVersions
      description: 'Delete version metadata records for table `id`.


        This operation deletes version tracking records, NOT the actual table data.

        It supports deleting ranges of versions for efficient bulk cleanup.


        Special range values:

        - `start_version: 0` with `end_version: -1` means delete ALL version records

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchDeleteTableVersionsRequest'
      responses:
        200:
          $ref: '#/components/responses/BatchDeleteTableVersionsResponse'
        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'
  /v1/table/version/batch-create:
    parameters:
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Atomically create versions for multiple tables
      operationId: BatchCreateTableVersions
      description: 'Atomically create new version entries for multiple tables.


        This operation is atomic: either all table versions are created successfully,

        or none are created. If any version creation fails (e.g., due to conflict),

        the entire batch operation fails.


        Each entry in the request specifies the table identifier and version details.

        This supports `put_if_not_exists` semantics for each version entry.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchCreateTableVersionsRequest'
      responses:
        200:
          $ref: '#/components/responses/BatchCreateTableVersionsResponse'
        400:
          $ref: '#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        403:
          $ref: '#/components/responses/ForbiddenErrorResponse'
        404:
          $ref: '#/components/responses/NotFoundErrorResponse'
        409:
          $ref: '#/components/responses/ConflictErrorResponse'
        503:
          $ref: '#/components/responses/ServiceUnavailableErrorResponse'
        5XX:
          $ref: '#/components/responses/ServerErrorResponse'
  /v1/table/batch-commit:
    parameters:
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Atomically commit a batch of mixed table operations
      operationId: BatchCommitTables
      description: 'Atomically commit a batch of table operations. This is a generalized version

        of `BatchCreateTableVersions` that supports mixed operation types within a

        single atomic transaction at the metadata layer.


        Supported operation types:

        - `DeclareTable`: Declare (reserve) a new table

        - `CreateTableVersion`: Create a new version entry for a table

        - `DeleteTableVersions`: Delete version ranges from a table

        - `DeregisterTable`: Deregister (soft-delete) a table


        All operations are committed atomically: either all succeed or none are applied.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchCommitTablesRequest'
      responses:
        200:
          $ref: '#/components/responses/BatchCommitTablesResponse'
        400:
          $ref: '#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        403:
          $ref: '#/components/responses/ForbiddenErrorResponse'
        404:
          $ref: '#/components/responses/NotFoundErrorResponse'
        409:
          $ref: '#/components/responses/ConflictErrorResponse'
        503:
          $ref: '#/components/responses/ServiceUnavailableErrorResponse'
        5XX:
          $ref: '#/components/responses/ServerErrorResponse'
  /v1/table/{id}/alter_columns:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Modify existing columns
      operationId: AlterTableAlterColumns
      description: 'Modify existing columns in table `id`, such as renaming or changing data types.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlterTableAlterColumnsRequest'
      responses:
        200:
          $ref: '#/components/responses/AlterTableAlterColumnsResponse'
        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'
  /v1/table/{id}/drop_columns:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Remove columns from table
      operationId: AlterTableDropColumns
      description: 'Remove specified columns from table `id`.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlterTableDropColumnsRequest'
      responses:
        200:
          $ref: '#/components/responses/AlterTableDropColumnsResponse'
        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'
  /v1/table/{id}/stats:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    post:
      tags:
      - Table
      summary: Get table statistics
      operationId: GetTableStats
      description: 'Get statistics for table `id`, including row counts, data sizes, and column statistics.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTableStatsRequest'
      responses:
        200:
          $ref: '#/components/responses/GetTableStatsResponse'
        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'
  /v1/table/{id}/insert:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    - name: mode
      in: query
      description: 'How the insert should behave. Case insensitive, supports both PascalCase and snake_case. Valid values are:

        - 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
        default: append
    post:
      tags:
      - Table
      summary: Insert records into a table
      operationId: InsertIntoTable
      description: 'Insert new records into table `id`.


        For tables that have been declared but not yet created on storage

        (is_only_declared=true), this operation will create the table with

        the provided data.


        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'
  /v1/table/{id}/merge_insert:
    parameters:
    - $ref: '#/components/parameters/id'
    - $ref: '#/components/parameters/delimiter'
    - name: 'on'
      in: query
      description: Column name to use for matching rows (required)
      required: true
      schema:
        type: string
    - name: when_matched_update_all
      in: query
      description: Update all columns when rows match
      required: false
      schema:
        type: boolean
        default: false
    - name: when_matched_update_all_filt
      in: query
      description: The row is updated (similar to UpdateAll) only for rows where the SQL expression evaluates to true
      required: false
      schema:
        type: string
    - name: when_not_matched_insert_all
      in: query
      description: Insert all columns when rows don't match
      required: false
      schema:
        type: boolean
        default: false
    - name: when_not_matched_by_source_delete
      in: query
      description: Delete all rows from target table that don't match a row in the source table
      required: false
      schema:
        type: boolean
        default: false
    - name: when_not_matched_by_source_delete_filt
      in: query
      description: Delete rows from the target table if there is no match AND the SQL expression evaluates to true
      schema:
        type: string
    - name: timeout
      in: query
      description: Timeout for the operation (e.g., "30s", "5m")
      required: false
      schema:
        type: string
    - name: use_index
      in: query
      description: Whether to use index for matching rows
      required: false
      schema:
        type: boolean
        default: false
    post:
      tags:
      - Table
      summary: Merge insert (upsert) records into a table
      operationId: MergeInsertIntoTable
      description: 'Performs a merge insert (upsert) operation on table `id`.

        This operation updates existing rows

        based on a matching column and inserts new rows that don''t match.

        It returns the number of rows inserted and updated.


        For tables that have been declared but not yet created on storage

        (is_only_declared=true), this operation will create the table with

        the provided data (since there are no existing rows to merge with).


        REST NAMESPACE ONLY

        REST namespace uses Arrow IPC stream as the request body.

        It passes in the `MergeInsertIntoTableRequest` information in the following way:

        - `id`: pass through path parameter of the same name

        - `on`: pass through query parameter of the same name

        - `when_matched_update_all`: pass through query parameter of the same name

        - `when_matched_update_all_filt`: pass through query parameter of the same name

        - `when_not_matched_insert_all`: pass through query parameter of the same name

        - `when_not_matched_by_source_delete`: pass through query parameter of the same name

        - `when_not_matched_by_source_delete_filt`: pass through query parameter of the same name

        '
      requestBody:
        description: Arrow IPC stream containing the records to merge
        content:
          application/vnd.apache.arrow.stream:
            schema:
              type: string
              format: binary
        required: true
      responses:
        200:
          $ref: '#/components/responses/MergeInsertIntoTableResponse'
        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'
  /v1/table/{id}/update:
    parameters:
    - $ref: '#/components/paramet

# --- truncated at 32 KB (142 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lancedb/refs/heads/main/openapi/lancedb-table-api-openapi.yml