> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rootprint.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Ingest NDJSON log documents

> Proxies an NDJSON (or JSON array) log payload to Quickwit for the index associated with the ingest API key. Accepts application/x-ndjson or application/json content-type. Success and 4xx responses are passed through from Quickwit (400 bodies carry per-document parse errors); upstream 5xx responses are mapped to the standard 503 error contract.



## OpenAPI

````yaml /api/openapi.json post /api/ingest/ndjson
openapi: 3.1.0
info:
  description: HTTP API for the Rootprint log management platform.
  title: Rootprint API
  version: 0.4.0
servers:
  - description: Rootprint API
    url: https://example.com
security:
  - cookieAuth: []
paths:
  /api/ingest/ndjson:
    post:
      tags:
        - Log ingest
      summary: Ingest NDJSON log documents
      description: >-
        Proxies an NDJSON (or JSON array) log payload to Quickwit for the index
        associated with the ingest API key. Accepts application/x-ndjson or
        application/json content-type. Success and 4xx responses are passed
        through from Quickwit (400 bodies carry per-document parse errors);
        upstream 5xx responses are mapped to the standard 503 error contract.
      operationId: postApiIngestNdjson
      responses:
        '200':
          content:
            application/json:
              schema:
                description: Quickwit ingest acknowledgement
                properties:
                  num_docs_for_processing:
                    type: integer
                type: object
          description: Documents accepted for processing
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - ingestBearer: []
components:
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Request validation failed
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Authentication required
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Permission denied
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Resource not found
    PayloadTooLarge:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Payload too large
    TooManyRequests:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Rate limit exceeded
    InternalError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Internal server error
    ServiceUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Upstream service unavailable
  schemas:
    ApiErrorBody:
      properties:
        error:
          properties:
            code:
              type: string
            details:
              items:
                properties:
                  message:
                    type: string
                  path:
                    type: string
                required:
                  - path
                  - message
                type: object
              type: array
            message:
              type: string
            requestId:
              type: string
            statusCode:
              type: number
          required:
            - code
            - message
            - statusCode
            - requestId
          type: object
      required:
        - error
      type: object
  securitySchemes:
    cookieAuth:
      in: cookie
      name: better-auth.session_token
      type: apiKey
    ingestBearer:
      description: Ingest API key
      scheme: bearer
      type: http

````