> ## Documentation Index
> Fetch the complete documentation index at: https://manual.seahorse.dnotitia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Insert rows into table

> Insert rows into table from the given request. The rows are in json format.



## OpenAPI

````yaml POST /v2/data
openapi: 3.1.0
info:
  title: Seahorse API Gateway
  description: >-
    Seahorse API Gateway is an API gateway that integrates vector database, AI
    inference, and storage services. It provides features such as vector search,
    embedding generation, text generation, and object storage.
  license:
    name: ''
  version: 2.0.0-rc1
servers:
  - url: https://{resource_uuid}.api.seahorse.dnotitia.ai
    description: >-
      리소스(스토리지/테이블/인퍼런스 endpoint)별 UUID 서브도메인. UUID 는 콘솔 → 리소스 상세 페이지 "API URL"
      항목에서 확인
    variables:
      resource_uuid:
        default: your-resource-uuid-here
        description: '대시 제거된 32자리 UUID (예: b0348a15cf0e48079e290fe03901247b)'
security: []
tags:
  - name: TABLE_V2
    description: Table operations v2
  - name: STORAGE
    description: Storage Object operations
paths:
  /v2/data:
    post:
      tags:
        - TABLE_V2
      summary: Insert rows into table
      description: >-
        Insert rows into table from the given request. The rows are in json
        format.
      operationId: insert_data_handler_v2
      parameters:
        - name: reader_batch_size
          in: query
          description: >-
            Number of the maximum rows to insert at a time. It determines the
            size of each record batch. Default is 1024.
          required: false
          schema:
            type: integer
            minimum: 0
          example: '1024'
      requestBody:
        description: >-
          List of rows that will be inserted into the table. Format is Jsonl
          (Json Lines). The length of the embedding vector must be the same as
          the vector dimension you specified when you generated the table.


          Primary Key Generation Rules:

          - Format: {Document Id: String}{Record Separator: \RS, ASCII 30}{Chunk
          Id: Int}

          - Document Id: A hash value for duplicate data detection. Recommended
          length is around 128 characters.

          - Record Separator: ASCII 30 character (\u001E)

          - Chunk Id: 4-byte unsigned integer (maximum: 2^32-1). Sequential
          numbers are recommended.

          - Do NOT assign the same primary key value (pk) to different chunks.
          Each pk must be unique per chunk.
        content:
          text/plain:
            example: >-
              {"id":"random1\\u001E1","metadata":"{\"file_name\":
              \"abc.pdf\"}","text":"hello","embedding":[1.0,2.0,...,3.0]}

              {"id":"random1\\u001E2","metadata":"{\"file_name\":
              \"def.pdf\"}","text":"world","embedding":[4.0,5.0,...,6.0]}

              {"id":"random1\\u001E3","metadata":"{\"file_name\":
              \"ghi.pdf\"}","text":"rust","embedding":[7.0,8.0,...,9.0]}
      responses:
        '200':
          description: Data successfully inserted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoralResponse_DataInsertResult'
              example:
                code: 200
                data:
                  elapsed_time: null
                  inserted_record_batches: 1
                  inserted_row_count: 4
                exception: null
                success: true
        '400':
          description: Invalid input provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoralResponse_ErrorBody'
              example:
                code: 400
                data: null
                exception:
                  error_code: 400001
                  error_message: >-
                    Bad Request: Multiple nodes found, it supported only for
                    single node deployment.
                success: false
        '500':
          description: Error occurred while trying to insert data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoralResponse_ErrorBody'
              example:
                code: 500
                data: null
                exception:
                  error_code: 500001
                  error_message: 'Internal error: '
                success: false
      security:
        - bearerAuth:
            - WRITE
        - apiKeyAuth:
            - WRITE
components:
  schemas:
    CoralResponse_DataInsertResult:
      type: object
      required:
        - success
        - code
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code.
          minimum: 0
        data:
          type: object
          required:
            - inserted_record_batches
            - inserted_row_count
          properties:
            elapsed_time:
              type:
                - number
                - 'null'
              format: float
              description: >-
                Elapsed time in seconds for reading the file and inserting the
                data into the table.

                This measures the time taken by the underlying data insertion
                process,

                but does not include the full duration of the API request.
            inserted_record_batches:
              type: integer
              description: Number of total record batches inserted.
              minimum: 0
            inserted_row_count:
              type: integer
              description: Number of total rows inserted.
              minimum: 0
        exception:
          type: object
          required:
            - inserted_record_batches
            - inserted_row_count
          properties:
            elapsed_time:
              type:
                - number
                - 'null'
              format: float
              description: >-
                Elapsed time in seconds for reading the file and inserting the
                data into the table.

                This measures the time taken by the underlying data insertion
                process,

                but does not include the full duration of the API request.
            inserted_record_batches:
              type: integer
              description: Number of total record batches inserted.
              minimum: 0
            inserted_row_count:
              type: integer
              description: Number of total rows inserted.
              minimum: 0
        success:
          type: boolean
          description: Whether the request was successful.
    CoralResponse_ErrorBody:
      type: object
      required:
        - success
        - code
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code.
          minimum: 0
        data:
          type: object
          required:
            - error_code
            - error_message
          properties:
            error_code:
              type: integer
              format: int32
              minimum: 0
            error_message:
              type: string
        exception:
          type: object
          required:
            - error_code
            - error_message
          properties:
            error_code:
              type: integer
              format: int32
              minimum: 0
            error_message:
              type: string
        success:
          type: boolean
          description: Whether the request was successful.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token authentication. Include the token in the Authorization
        header as 'Bearer <token>'
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key
      description: API key authentication. Include the key in the api-key header

````