All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rest-api-spec.api.index.json Maven / Gradle / Ivy

There is a newer version: 8.17.0
Show newest version
{
  "index":{
    "documentation":{
      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html",
      "description":"Creates or updates a document in an index."
    },
    "stability":"stable",
    "visibility":"public",
    "headers":{
      "accept": [ "application/json"],
      "content_type": ["application/json"]
    },
    "url":{
      "paths":[
        {
          "path":"/{index}/_doc/{id}",
          "methods":[
            "PUT",
            "POST"
          ],
          "parts":{
            "id":{
              "type":"string",
              "description":"Document ID"
            },
            "index":{
              "type":"string",
              "description":"The name of the index"
            }
          }
        },
        {
          "path":"/{index}/_doc",
          "methods":[
            "POST"
          ],
          "parts":{
            "index":{
              "type":"string",
              "description":"The name of the index"
            }
          }
        }
      ]
    },
    "params":{
      "wait_for_active_shards":{
        "type":"string",
        "description":"Sets the number of shard copies that must be active before proceeding with the index 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)"
      },
      "op_type":{
        "type":"enum",
        "options":[
          "index",
          "create"
        ],
        "description":"Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID"
      },
      "refresh":{
        "type":"enum",
        "options":[
          "true",
          "false",
          "wait_for"
        ],
        "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":"string",
        "description":"Specific routing value"
      },
      "timeout":{
        "type":"time",
        "description":"Explicit operation timeout"
      },
      "version":{
        "type":"number",
        "description":"Explicit version number for concurrency control"
      },
      "version_type":{
        "type":"enum",
        "options":[
          "internal",
          "external",
          "external_gte"
        ],
        "description":"Specific version type"
      },
      "if_seq_no":{
        "type":"number",
        "description":"only perform the index operation if the last operation that has changed the document has the specified sequence number"
      },
      "if_primary_term":{
        "type":"number",
        "description":"only perform the index operation if the last operation that has changed the document has the specified primary term"
      },
      "pipeline":{
        "type":"string",
        "description":"The pipeline id to preprocess incoming documents with"
      },
      "require_alias": {
        "type": "boolean",
        "description": "When true, requires destination to be an alias. Default is false"
      },
      "require_data_stream": {
        "type": "boolean",
        "description": "When true, requires the destination to be a data stream (existing or to-be-created). Default is false"
      }
    },
    "body":{
      "description":"The document",
      "required":true
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy