openapi: 3.1.0
info:
  title: Elasticsearch-compatible API
  version: subset
  description: '**Status: In progress.** Every route below is on the engine''s main branch and tested
    with the official Python client and against Elasticsearch as an oracle. The subset closes as a milestone
    when the LangChain, LlamaIndex and BEIR suites pass unmodified; until then, expect gaps in less common
    query options.


    Loam serves a targeted subset of the Elasticsearch REST API on port 9200: the document APIs, `_bulk`,
    `_search` with the core Query DSL, `knn` and hybrid search with RRF. Bodies follow Elasticsearch;
    see the [Elasticsearch REST reference](https://www.elastic.co/docs/api/doc/elasticsearch) for fields.
    Routes not listed here are not implemented and return 400 `no handler found`.


    **Namespace and consistency.** Send `Operon-Namespace` to pick a namespace. Writes return `Operon-Consistency-Token`;
    send it back on a read to see the write. Responses carry `X-Elastic-Product: Elasticsearch` so official
    clients accept them.


    **Errors** use the Elasticsearch envelope: `{"error": {"root_cause", "type", "reason"}, "status"}`.'
servers:
- url: http://127.0.0.1:9200
  description: Local engine
tags:
- name: Cluster
- name: Indices
- name: Aliases
- name: Documents
- name: Search
- name: Inference
paths:
  /:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Cluster
      summary: Cluster info
      operationId: get
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_license:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Cluster
      summary: License
      operationId: get___license
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_cluster/health:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Cluster
      summary: Cluster health
      operationId: get___cluster_health
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_cluster/health/{index}:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Cluster
      summary: Index health
      operationId: get___cluster_health_index
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_ml/trained_models/{model_id}/_infer:
    parameters:
    - name: model_id
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    post:
      tags:
      - Inference
      summary: Infer
      operationId: post___ml_trained_models_model_id__infer
      x-badges:
      - name: Available
        color: '#5f8f3a'
      description: Runs the embedding model configured for the namespace, for clients that call ES inference.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_ml/trained_models/{model_id}/deployment/_infer:
    parameters:
    - name: model_id
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    post:
      tags:
      - Inference
      summary: Infer (deployment path)
      operationId: post___ml_trained_models_model_id_deployment__infer
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Indices
      summary: Index (GET)
      operationId: get__index
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    head:
      tags:
      - Indices
      summary: Index (HEAD)
      operationId: head__index
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    put:
      tags:
      - Indices
      summary: Index (PUT)
      operationId: put__index
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    delete:
      tags:
      - Indices
      summary: Index (DELETE)
      operationId: delete__index
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_mapping:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Indices
      summary: Get all mappings
      operationId: get___mapping
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_mapping:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Indices
      summary: Mapping (GET)
      operationId: get__index__mapping
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    put:
      tags:
      - Indices
      summary: Mapping (PUT)
      operationId: put__index__mapping
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Indices
      summary: Mapping (POST)
      operationId: post__index__mapping
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_aliases:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Aliases
      summary: Aliases (GET)
      operationId: get___aliases
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Aliases
      summary: Aliases (POST)
      operationId: post___aliases
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_alias:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Aliases
      summary: List aliases
      operationId: get___alias
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_alias/{name}:
    parameters:
    - name: name
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Aliases
      summary: Get alias
      operationId: get___alias_name
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_alias:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Aliases
      summary: Index aliases
      operationId: get__index__alias
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_alias/{name}:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - name: name
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Aliases
      summary: Index alias (GET)
      operationId: get__index__alias_name
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    put:
      tags:
      - Aliases
      summary: Index alias (PUT)
      operationId: put__index__alias_name
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Aliases
      summary: Index alias (POST)
      operationId: post__index__alias_name
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    delete:
      tags:
      - Aliases
      summary: Index alias (DELETE)
      operationId: delete__index__alias_name
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_aliases/{name}:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - name: name
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    put:
      tags:
      - Aliases
      summary: Index alias (plural path) (PUT)
      operationId: put__index__aliases_name
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Aliases
      summary: Index alias (plural path) (POST)
      operationId: post__index__aliases_name
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    delete:
      tags:
      - Aliases
      summary: Index alias (plural path) (DELETE)
      operationId: delete__index__aliases_name
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_refresh:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Indices
      summary: Refresh all (GET)
      operationId: get___refresh
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Indices
      summary: Refresh all (POST)
      operationId: post___refresh
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_refresh:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Indices
      summary: Refresh index (GET)
      operationId: get__index__refresh
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Indices
      summary: Refresh index (POST)
      operationId: post__index__refresh
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_doc:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    post:
      tags:
      - Documents
      summary: Index a document (auto id)
      operationId: post__index__doc
      x-badges:
      - name: Available
        color: '#5f8f3a'
      description: The generated id is a 26-character ULID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_doc/{id}:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Documents
      summary: Document (GET)
      operationId: get__index__doc_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    head:
      tags:
      - Documents
      summary: Document (HEAD)
      operationId: head__index__doc_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    put:
      tags:
      - Documents
      summary: Document (PUT)
      operationId: put__index__doc_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Documents
      summary: Document (POST)
      operationId: post__index__doc_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    delete:
      tags:
      - Documents
      summary: Document (DELETE)
      operationId: delete__index__doc_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_create/{id}:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    put:
      tags:
      - Documents
      summary: Create a document (PUT)
      operationId: put__index__create_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Documents
      summary: Create a document (POST)
      operationId: post__index__create_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_update/{id}:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    post:
      tags:
      - Documents
      summary: Update a document
      operationId: post__index__update_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_source/{id}:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Documents
      summary: Get a document source (GET)
      operationId: get__index__source_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    head:
      tags:
      - Documents
      summary: Get a document source (HEAD)
      operationId: head__index__source_id
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_mget:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Documents
      summary: Multi get (GET)
      operationId: get___mget
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Documents
      summary: Multi get (POST)
      operationId: post___mget
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_mget:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Documents
      summary: Multi get (GET)
      operationId: get__index__mget
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Documents
      summary: Multi get (POST)
      operationId: post__index__mget
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_search:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Search
      summary: Search (GET)
      operationId: get___search
      x-badges:
      - name: Available
        color: '#5f8f3a'
      description: The core Query DSL, `knn`, hybrid queries with RRF, `search_after`, sorting and aggregations.
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Search
      summary: Search (POST)
      operationId: post___search
      x-badges:
      - name: Available
        color: '#5f8f3a'
      description: The core Query DSL, `knn`, hybrid queries with RRF, `search_after`, sorting and aggregations.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_search:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Search
      summary: Search (GET)
      operationId: get__index__search
      x-badges:
      - name: Available
        color: '#5f8f3a'
      description: The core Query DSL, `knn`, hybrid queries with RRF, `search_after`, sorting and aggregations.
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Search
      summary: Search (POST)
      operationId: post__index__search
      x-badges:
      - name: Available
        color: '#5f8f3a'
      description: The core Query DSL, `knn`, hybrid queries with RRF, `search_after`, sorting and aggregations.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_count:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Search
      summary: Count (GET)
      operationId: get___count
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Search
      summary: Count (POST)
      operationId: post___count
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_count:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Search
      summary: Count (GET)
      operationId: get__index__count
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Search
      summary: Count (POST)
      operationId: post__index__count
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_msearch:
    parameters:
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Search
      summary: Multi search (GET)
      operationId: get___msearch
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Search
      summary: Multi search (POST)
      operationId: post___msearch
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/x-ndjson:
            schema:
              type: string
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_msearch:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    get:
      tags:
      - Search
      summary: Multi search (GET)
      operationId: get__index__msearch
      x-badges:
      - name: Available
        color: '#5f8f3a'
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    post:
      tags:
      - Search
      summary: Multi search (POST)
      operationId: post__index__msearch
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/x-ndjson:
            schema:
              type: string
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_update_by_query:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    post:
      tags:
      - Documents
      summary: Update by query
      operationId: post__index__update_by_query
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_delete_by_query:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    post:
      tags:
      - Documents
      summary: Delete by query
      operationId: post__index__delete_by_query
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /_bulk:
    parameters:
    - $ref: '#/components/parameters/namespace'
    post:
      tags:
      - Documents
      summary: Bulk (POST)
      operationId: post___bulk
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/x-ndjson:
            schema:
              type: string
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    put:
      tags:
      - Documents
      summary: Bulk (PUT)
      operationId: put___bulk
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/x-ndjson:
            schema:
              type: string
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
  /{index}/_bulk:
    parameters:
    - name: index
      in: path
      required: true
      schema:
        type: string
    - $ref: '#/components/parameters/namespace'
    post:
      tags:
      - Documents
      summary: Bulk (POST)
      operationId: post__index__bulk
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/x-ndjson:
            schema:
              type: string
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
    put:
      tags:
      - Documents
      summary: Bulk (PUT)
      operationId: put__index__bulk
      x-badges:
      - name: Available
        color: '#5f8f3a'
      requestBody:
        required: true
        content:
          application/x-ndjson:
            schema:
              type: string
      responses:
        '200':
          $ref: '#/components/responses/Ok'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    namespace:
      name: Operon-Namespace
      in: header
      schema:
        type: string
        default: default
  responses:
    Ok:
      description: Elasticsearch-shaped response.
      content:
        application/json:
          schema:
            type: object
    Error:
      description: Elasticsearch error envelope.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                  reason:
                    type: string
                  root_cause:
                    type: array
                    items:
                      type: object
              status:
                type: integer
