> ## 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.

# Scan Data

> Performs a scan operation across all SeahorseDB nodes, returning relevant data from the specified table. It is almost same as normal SQL "SELECT" execution of normal RDBMSs.



## OpenAPI

````yaml POST /v2/data/scan
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/scan:
    post:
      tags:
        - TABLE_V2
      summary: Scan Data
      description: >-
        Performs a scan operation across all SeahorseDB nodes, returning
        relevant data from the specified table. It is almost same as normal SQL
        "SELECT" execution of normal RDBMSs.
      operationId: scan_handler_v2
      parameters:
        - name: include_metrics
          in: query
          description: Include metrics in the response. Default is false.
          required: false
          schema:
            type: boolean
          example: 'false'
      requestBody:
        description: The scan condition. It includes projection, filter, and limit.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataScanRequest'
            example:
              filter: id = '1'
              limit: 10
              projection: id, metadata, text
        required: true
      responses:
        '200':
          description: Successfully retrieved the scan results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoralResponse_ScanResultSetResponse'
              example:
                code: 200
                data:
                  data:
                    - id: '1'
                      metadata: '{"file_name": "abc.pdf"}'
                      text: hello
                  metrics:
                    elapsed_time: 0.5
                    rss_peak_bytes: 52428800
                  schema:
                    fields:
                      - data_type: LargeUtf8
                        name: id
                        nullable: false
                      - data_type: LargeUtf8
                        name: metadata
                        nullable: true
                      - data_type: LargeUtf8
                        name: text
                        nullable: true
                    metadata: {}
                exception: null
                success: true
        '500':
          description: Error occurred while scaning table
          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:
            - READ
            - WRITE
        - apiKeyAuth:
            - READ
            - WRITE
components:
  schemas:
    DataScanRequest:
      type: object
      properties:
        filter:
          type:
            - string
            - 'null'
          description: >-
            SQL WHERE clause to filter the results. If not specified, no
            filtering will be applied.
          default: ''
          example: text like '%hello%'
        limit:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Number of rows to return in the result set. If set to 0 or not
            specified, returns all matching rows.
          default: '0'
          example: '10'
        projection:
          type:
            - string
            - 'null'
          description: >-
            Columns to include in the result set. Uses SQL projection syntax
            (e.g. "col1, col2"). If not specified, all columns will be returned.
          default: '*'
          example: id, metadata, text
    CoralResponse_ScanResultSetResponse:
      type: object
      required:
        - success
        - code
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code.
          minimum: 0
        data:
          type: object
          required:
            - schema
            - data
          properties:
            data:
              description: >-
                Data of the single resultset in JSON format. Each row is
                represented as a JSON object in an JSON array.
            metrics:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/RequestMetrics'
                  description: Metrics of the request.
            schema:
              description: Schema of the resultset.
        exception:
          type: object
          required:
            - schema
            - data
          properties:
            data:
              description: >-
                Data of the single resultset in JSON format. Each row is
                represented as a JSON object in an JSON array.
            metrics:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/RequestMetrics'
                  description: Metrics of the request.
            schema:
              description: Schema of the resultset.
        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.
    RequestMetrics:
      type: object
      required:
        - elapsed_time
        - rss_peak_bytes
      properties:
        elapsed_time:
          type: number
          format: float
          description: Elapsed time in seconds for the request.
        rss_peak_bytes:
          type: integer
          format: int64
          description: Peak memory usage in bytes.
          minimum: 0
  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

````