{
  "bulk": {
    "documentation": {
      "url": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-bulk.html",
      "description": "Bulk index or delete documents"
    },
    "stability": "stable",
    "visibility": "public",
    "headers": {
      "accept": [
        "application/json"
      ],
      "content_type": [
        "application/x-ndjson"
      ]
    },
    "url": {
      "paths": [
        {
          "path": "/_bulk",
          "methods": [
            "POST",
            "PUT"
          ]
        },
        {
          "path": "/{index}/_bulk",
          "methods": [
            "POST",
            "PUT"
          ],
          "parts": {
            "index": {
              "type": "string",
              "description": "Default index for items which don't provide one"
            }
          }
        }
      ]
    },
    "params": {
      "wait_for_active_shards": {
        "type": "string",
        "default": "1",
        "description": "Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
      },
      "refresh": {
        "type": "enum",
        "options": [
          "true",
          "false",
          "wait_for"
        ],
        "default": "false",
        "description": "If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
      },
      "routing": {
        "type": "list",
        "description": "Specific routing value"
      },
      "timeout": {
        "type": "time",
        "default": "1m",
        "description": "Explicit operation timeout"
      },
      "_source": {
        "type": "list",
        "description": "True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"
      },
      "_source_excludes": {
        "type": "list",
        "description": "Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"
      },
      "_source_includes": {
        "type": "list",
        "description": "Default list of fields to extract and return from the _source field, can be overridden on each sub-request"
      },
      "pipeline": {
        "type": "string",
        "description": "The pipeline id to preprocess incoming documents with"
      },
      "require_alias": {
        "type": "boolean",
        "default": false,
        "description": "If true, the request's actions must target an index alias. Defaults to false."
      },
      "require_data_stream": {
        "type": "boolean",
        "default": false,
        "description": "If true, the request's actions must target a data stream (existing or to-be-created). Default to false"
      },
      "list_executed_pipelines": {
        "type": "boolean",
        "default": false,
        "description": "Sets list_executed_pipelines for all incoming documents. Defaults to unset (false)"
      },
      "include_source_on_error": {
        "type": "boolean",
        "default": true,
        "description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
      }
    },
    "body": {
      "description": "The operation definition and data (action-data pairs), separated by newlines",
      "required": true,
      "serialize": "bulk"
    }
  }
}
