We've rebuilt the Elastic API reference with a fresh design. Share your feedback.

Feedback on this page

  1. Docs /
  2. APIs /
  3. Elasticsearch API v8
View as Markdown
Download OpenAPI spec (JSON) Download OpenAPI spec (YAML)

Document

Version 8.19 View the latest version (v9)

Endpoints

18 endpoints

  • POST Throttle a delete by query operation /_delete_by_query/{task_id}/_rethrottle
  • POST Reindex documents /_reindex
  • POST Throttle a reindex operation /_reindex/{task_id}/_rethrottle
  • POST Throttle an update by query operation /_update_by_query/{task_id}/_rethrottle
  • POST PUT Bulk index or delete documents [/{index}]/_bulk
  • POST PUT Create a new document in the index /{index}/_create/{id}
  • POST Delete documents /{index}/_delete_by_query
  • GET Get a document by its ID /{index}/_doc/{id}
  • POST PUT Create or update a document in an index /{index}/_doc[/{id}]
  • DELETE Delete a document /{index}/_doc/{id}
  • HEAD Check a document /{index}/_doc/{id}
  • POST GET Get multiple documents [/{index}]/_mget
  • POST GET Get multiple term vectors [/{index}]/_mtermvectors
  • GET Get a document's source /{index}/_source/{id}
  • HEAD Check for a document source /{index}/_source/{id}
  • POST GET Get term vector information /{index}/_termvectors[/{id}]
  • POST Update a document /{index}/_update/{id}
  • POST Update documents /{index}/_update_by_query
Learn more
Learn more about reading and writing documents.
On this page
  • Endpoints
Version
v9 (latest) v8
Elastic Stack
Elasticsearch API Elasticsearch Serverless API Kibana API Kibana Serverless API Logstash API
Orchestration
Elastic Cloud API Elastic Cloud Billing API Elastic Cloud Connected API Elastic Cloud Enterprise API Elastic Cloud Monitoring API Elastic Cloud Serverless API
All APIs
  • Overview
  • Authentication
  • Operations
    • Autoscaling
      • Get the autoscaling capacity GET
      • Get an autoscaling policy GET
      • Create or update an autoscaling policy PUT
      • Delete an autoscaling policy DELETE
    • Behavioral analytics
      • Create a behavioral analytics collection event POST
      • Get behavioral analytics collections GET
      • Create a behavioral analytics collection PUT
      • Delete a behavioral analytics collection DELETE
    • Cluster
      • Ping the cluster HEAD
      • Explain the shard allocations POSTGET
      • Get the cluster health status GET
      • Get the pending cluster tasks GET
      • Reroute the cluster POST
      • Get cluster-wide settings GET
      • Update the cluster settings PUT
      • Get the cluster state GET
      • Get cluster statistics GET
      • Update voting configuration exclusions POST
      • Clear cluster voting config exclusions DELETE
      • Get cluster subsystem info GET
      • Get cluster repositories metering GET
      • Clear the archived repositories metering DELETE
      • Get the hot threads for nodes GET
      • Reload the keystore on nodes in the cluster POST
      • Get node statistics GET
      • Get feature usage information GET
      • Get node information GET
      • Get remote cluster information GET
    • Cluster - Health
      • Get the cluster health GET
    • Compact and aligned text (CAT)
      • Get CAT help GET
      • Get a compact list of aliases GET
      • Get shard allocation information GET
      • Get a compact list of component templates GET
      • Get a document count GET
      • Get field data cache information GET
      • Get a compact cluster health summary GET
      • Get a compact list of indices GET
      • Get master node information GET
      • Get anomaly detection jobs GET
      • Get data frame analytics jobs GET
      • Get datafeeds GET
      • Get trained models GET
      • Get node attribute information GET
      • Get a compact list of nodes GET
      • Get pending task information GET
      • Get plugin information GET
      • Get shard recovery information GET
      • Get a compact list of snapshot repositories GET
      • Get segment information GET
      • Get shard information GET
      • Get a compact list of snapshots GET
      • Get a compact list of running tasks GET
      • Get index template information GET
      • Get thread pool statistics GET
      • Get transform information GET
    • Connector
      • Get all connectors GET
      • Create a connector POST
      • Get all connector sync jobs GET
      • Create a connector sync job POST
      • Get a connector sync job GET
      • Delete a connector sync job DELETE
      • Cancel a connector sync job PUT
      • Check in a connector sync job PUT
      • Claim a connector sync job PUT
      • Set a connector sync job error PUT
      • Set the connector sync job stats PUT
      • Get a connector GET
      • Create or update a connector PUT
      • Delete a connector DELETE
      • Update the connector API key ID PUT
      • Check in a connector PUT
      • Update the connector configuration PUT
      • Update the connector error field PUT
      • Update the connector features PUT
      • Update the connector filtering PUT
      • Activate the connector draft filter PUT
      • Update the connector draft filtering validation PUT
      • Update the connector index name PUT
      • Update the connector name and description PUT
      • Update the connector is_native flag PUT
      • Update the connector pipeline PUT
      • Update the connector scheduling PUT
      • Update the connector service type PUT
      • Update the connector status PUT
    • Cross-cluster replication
      • Get auto-follow patterns GET
      • Create or update auto-follow patterns PUT
      • Delete auto-follow patterns DELETE
      • Pause an auto-follow pattern POST
      • Resume an auto-follow pattern POST
      • Get cross-cluster replication stats GET
      • Create a follower PUT
      • Forget a follower POST
      • Get follower information GET
      • Pause a follower POST
      • Resume a follower POST
      • Get follower stats GET
      • Unfollow an index POST
    • Data stream
      • Convert an index alias to a data stream POST
      • Update data streams POST
      • Promote a data stream POST
      • Get data streams GET
      • Create a data stream PUT
      • Delete data streams DELETE
      • Get data stream lifecycles GET
      • Update data stream lifecycles PUT
      • Get data stream options GET
      • Update data stream options PUT
      • Delete data stream options DELETE
      • Get data stream settings GET
      • Update data stream settings PUT
      • Get data stream stats GET
      • Get data stream lifecycle stats GET
      • Downsample an index POST
      • Get the status for a data stream lifecycle GET
    • Document
      • Throttle a delete by query operation POST
      • Reindex documents POST
      • Throttle a reindex operation POST
      • Throttle an update by query operation POST
      • Bulk index or delete documents POSTPUT
      • Create a new document in the index POSTPUT
      • Delete documents POST
      • Get a document by its ID GET
      • Create or update a document in an index POSTPUT
      • Delete a document DELETE
      • Check a document HEAD
      • Get multiple documents POSTGET
      • Get multiple term vectors POSTGET
      • Get a document's source GET
      • Check for a document source HEAD
      • Get term vector information POSTGET
      • Update a document POST
      • Update documents POST
    • Enrich
      • Get enrich stats GET
      • Get an enrich policy GET
      • Create an enrich policy PUT
      • Delete an enrich policy DELETE
      • Run an enrich policy PUT
    • EQL
      • Get the async EQL status GET
      • Get async EQL search results GET
      • Delete an async EQL search DELETE
      • Get EQL search results POSTGET
    • ES|QL
      • Run an ES|QL query POST
      • Run an async ES|QL query POST
      • Get async ES|QL query results GET
      • Delete an async ES|QL query DELETE
      • Stop async ES|QL query POST
    • Features
      • Get the features GET
      • Reset the features POST
    • Fleet
      • Executes several fleet searches with a single API request POSTGET
      • The purpose of the fleet search api is to provide a search api where the search will only be executed POSTGET
      • Get global checkpoints GET
    • Graph explore
      • Explore graph analytics POSTGET
    • Index
      • Update aliases and delete indices atomically POST
      • Get component templates GET
      • Create or update a component template POSTPUT
      • Delete component templates DELETE
      • Check component templates HEAD
      • Get the dangling indices GET
      • Import a dangling index POST
      • Delete a dangling index DELETE
      • Delete data stream lifecycles DELETE
      • Simulate an index template POST
      • Simulate an index POST
      • Get index templates GET
      • Create or update an index template POSTPUT
      • Delete an index template DELETE
      • Check index templates HEAD
      • Resolve the cluster GET
      • Resolve indices GET
      • Get legacy index templates Deprecated GET
      • Create or update a legacy index template Deprecated POSTPUT
      • Delete a legacy index template Deprecated DELETE
      • Check existence of index templates HEAD
      • Roll over to a new index POST
      • Get index information GET
      • Create an index PUT
      • Delete indices DELETE
      • Check indices HEAD
      • Get aliases GET
      • Check aliases HEAD
      • Create or update an alias POSTPUT
      • Delete an alias DELETE
      • Get tokens from text analysis POSTGET
      • Add an index block PUT
      • Clear the cache POST
      • Clone an index POSTPUT
      • Close an index POST
      • Analyze the index disk usage POST
      • Get field usage stats GET
      • Flush data streams or indices POSTGET
      • Force a merge POST
      • Get mapping definitions GET
      • Update field mappings POSTPUT
      • Get field mapping definitions GET
      • Open a closed index POST
      • Get index recovery information GET
      • Refresh an index POSTGET
      • Reload search analyzers POSTGET
      • Get index segments GET
      • Update index settings PUT
      • Get index settings GET
      • Get index shard stores GET
      • Shrink an index POSTPUT
      • Split an index POSTPUT
      • Get index statistics GET
      • Unfreeze an index Deprecated POST
      • Validate a query POSTGET
    • Index lifecycle management
      • Migrate to data tiers routing POST
      • Move to a lifecycle step POST
      • Get lifecycle policies GET
      • Create or update a lifecycle policy PUT
      • Delete a lifecycle policy DELETE
      • Start the ILM plugin POST
      • Get the ILM status GET
      • Stop the ILM plugin POST
      • Explain the lifecycle state GET
      • Remove policies from an index POST
      • Retry a policy POST
    • Inference
      • Perform chat completion inference POST
      • Perform completion inference on the service POST
      • Perform streaming inference POST
      • Perform reranking inference on the service POST
      • Perform sparse embedding inference on the service POST
      • Perform text embedding inference on the service POST
      • Create an AlibabaCloud AI Search inference endpoint PUT
      • Create an Amazon Bedrock inference endpoint PUT
      • Create an Amazon SageMaker inference endpoint PUT
      • Create an Anthropic inference endpoint PUT
      • Create an Azure AI studio inference endpoint PUT
      • Create an Azure OpenAI inference endpoint PUT
      • Create a Cohere inference endpoint PUT
      • Create a custom inference endpoint PUT
      • Create a DeepSeek inference endpoint PUT
      • Create an Elasticsearch inference endpoint PUT
      • Create an ELSER inference endpoint Deprecated PUT
      • Create an Google AI Studio inference endpoint PUT
      • Create a Google Vertex AI inference endpoint PUT
      • Create a Hugging Face inference endpoint PUT
      • Get an inference endpoint GET
      • Perform inference on the service POST
      • Create an inference endpoint PUT
      • Delete an inference endpoint DELETE
      • Update an inference endpoint PUT
      • Create an JinaAI inference endpoint PUT
      • Create a Mistral inference endpoint PUT
      • Create an OpenAI inference endpoint PUT
      • Create a VoyageAI inference endpoint PUT
      • Create a Watsonx inference endpoint PUT
    • Info
      • Get cluster info GET
    • Ingest
      • Get GeoIP database configurations GET
      • Create or update a GeoIP database configuration PUT
      • Delete GeoIP database configurations DELETE
      • Get GeoIP statistics GET
      • Get IP geolocation database configurations GET
      • Create or update an IP geolocation database configuration PUT
      • Delete IP geolocation database configurations DELETE
      • Get pipelines GET
      • Create or update a pipeline PUT
      • Delete pipelines DELETE
      • Simulate a pipeline POSTGET
      • Run a grok processor GET
      • Simulate data ingestion POSTGET
    • Licensing
      • Get license information GET
      • Update the license POSTPUT
      • Delete the license DELETE
      • Get the basic license status GET
      • Start a basic license POST
      • Start a trial POST
      • Get the trial status GET
    • Logstash
      • Get Logstash pipelines GET
      • Create or update a Logstash pipeline PUT
      • Delete a Logstash pipeline DELETE
    • Machine learning
      • Get machine learning information GET
      • Get machine learning memory usage info GET
      • Set upgrade_mode for ML indices POST
    • Machine learning anomaly detection
      • Delete expired ML data DELETE
      • Estimate job model memory usage POST
      • Get anomaly detection jobs configuration info GET
      • Create an anomaly detection job PUT
      • Delete an anomaly detection job DELETE
      • Close anomaly detection jobs POST
      • Send data to an anomaly detection job for analysis Deprecated POST
      • Force buffered data to be processed POST
      • Predict future behavior of a time series POST
      • Delete forecasts from a job DELETE
      • Open anomaly detection jobs POST
      • Reset an anomaly detection job POST
      • Get anomaly detection job stats GET
      • Update an anomaly detection job POST
      • Get model snapshots info POSTGET
      • Delete a model snapshot DELETE
      • Revert to a snapshot POST
      • Update a snapshot POST
      • Upgrade a snapshot POST
      • Get anomaly detection job model snapshot upgrade usage info GET
      • Get anomaly detection job results for buckets POSTGET
      • Get anomaly detection job results for categories POSTGET
      • Get anomaly detection job results for influencers POSTGET
      • Get overall bucket results POSTGET
      • Get anomaly records for an anomaly detection job POSTGET
      • Get calendar configuration info POSTGET
      • Create a calendar PUT
      • Delete a calendar DELETE
      • Get info about events in calendars GET
      • Add scheduled events to the calendar POST
      • Delete events from a calendar DELETE
      • Add anomaly detection job to calendar PUT
      • Delete anomaly jobs from a calendar DELETE
      • Get datafeeds configuration info GET
      • Create a datafeed PUT
      • Delete a datafeed DELETE
      • Preview a datafeed POSTGET
      • Start datafeeds POST
      • Get datafeed stats GET
      • Stop datafeeds POST
      • Update a datafeed POST
      • Get filters GET
      • Create a filter PUT
      • Delete a filter DELETE
      • Update a filter POST
    • Machine learning data frame analytics
      • Evaluate data frame analytics POST
      • Get data frame analytics job configuration info GET
      • Create a data frame analytics job PUT
      • Delete a data frame analytics job DELETE
      • Explain data frame analytics config POSTGET
      • Preview features used by data frame analytics POSTGET
      • Start a data frame analytics job POST
      • Get data frame analytics job stats GET
      • Stop data frame analytics jobs POST
      • Update a data frame analytics job POST
    • Machine learning trained model
      • Get trained model configuration info GET
      • Create a trained model PUT
      • Delete an unreferenced trained model DELETE
      • Get trained models usage info GET
      • Create part of a trained model definition PUT
      • Evaluate a trained model POST
      • Start a trained model deployment POST
      • Stop a trained model deployment POST
      • Update a trained model deployment POST
      • Clear trained model deployment cache POST
      • Create or update a trained model alias PUT
      • Delete a trained model alias DELETE
      • Create a trained model vocabulary PUT
    • Migration
      • Create an index from a source index POSTPUT
      • Reindex legacy backing indices POST
      • Cancel a migration reindex operation POST
      • Get the migration reindexing status GET
      • Get feature migration information GET
      • Start the feature migration POST
      • Get deprecation information GET
    • Node lifecycle
      • Get the shutdown status GET
      • Prepare a node to be shut down PUT
      • Cancel node shutdown preparations DELETE
    • Query rules
      • Get all query rulesets GET
      • Get a query ruleset GET
      • Create or update a query ruleset PUT
      • Delete a query ruleset DELETE
      • Get a query rule GET
      • Create or update a query rule PUT
      • Delete a query rule DELETE
      • Test a query ruleset POST
    • Rollup
      • Get the rollup job capabilities Deprecated GET
      • Get rollup job information Deprecated GET
      • Create a rollup job Deprecated PUT
      • Delete a rollup job Deprecated DELETE
      • Start rollup jobs Deprecated POST
      • Stop rollup jobs Deprecated POST
      • Get the rollup index capabilities Deprecated GET
      • Search rolled-up data Deprecated POSTGET
    • Script
      • Get script contexts GET
      • Get script languages GET
      • Run a script POSTGET
      • Get a script or search template GET
      • Delete a script or search template DELETE
      • Create or update a script or search template POSTPUT
    • Search
      • Get the async search status GET
      • Get async search results GET
      • Delete an async search DELETE
      • Close a point in time DELETE
      • Render a search template POSTGET
      • Run a scrolling search POSTGET
      • Clear a scrolling search DELETE
      • Run an async search POST
      • Count search results POSTGET
      • Explain a document match result POSTGET
      • Get the field capabilities POSTGET
      • Run a knn search Deprecated POSTGET
      • Run multiple searches POSTGET
      • Run multiple templated searches POSTGET
      • Search a vector tile POSTGET
      • Open a point in time POST
      • Evaluate ranked search results POSTGET
      • Run a search POSTGET
      • Run a search with a search template POSTGET
      • Get the search shards POSTGET
      • Get terms in an index POSTGET
    • Search application
      • Get search applications GET
      • Get search application details GET
      • Create or update a search application PUT
      • Delete a search application DELETE
      • Render a search application query POST
      • Run a search application search POSTGET
    • Searchable snapshots
      • Get cache statistics GET
      • Mount a snapshot POST
      • Clear the searchable snapshots shared cache POST
      • Get searchable snapshot statistics GET
    • Security
      • Authenticate a user GET
      • Find API keys with a query POSTGET
      • Find roles with a query POSTGET
      • Find users with a query POSTGET
      • Get API key information GET
      • Create an API key POSTPUT
      • Invalidate API keys DELETE
      • Bulk update API keys POST
      • Grant an API key POST
      • Clear the API key cache POST
      • Update an API key PUT
      • Create a cross-cluster API key POST
      • Update a cross-cluster API key PUT
      • Delegate PKI authentication POST
      • Enroll Kibana GET
      • Enroll a node GET
      • Get a token POST
      • Invalidate a token DELETE
      • Authenticate OpenID Connect POST
      • Logout of OpenID Connect POST
      • Prepare OpenID connect authentication POST
      • Create or update application privileges POSTPUT
      • Get builtin privileges GET
      • Clear the privileges cache POST
      • Get application privileges GET
      • Delete application privileges DELETE
      • Activate a user profile POST
      • Check user profile privileges POSTGET
      • Suggest a user profile POSTGET
      • Get a user profile GET
      • Update user profile data POSTPUT
      • Disable a user profile POSTPUT
      • Enable a user profile POSTPUT
      • Clear the user cache POST
      • Bulk create or update roles POST
      • Bulk delete roles DELETE
      • Get roles GET
      • Create or update roles POSTPUT
      • Delete roles DELETE
      • Clear the roles cache POST
      • Get role mappings GET
      • Create or update role mappings POSTPUT
      • Delete role mappings DELETE
      • Authenticate SAML POST
      • Logout of SAML completely POST
      • Invalidate SAML POST
      • Logout of SAML POST
      • Create SAML service provider metadata GET
      • Prepare SAML authentication POST
      • Get service accounts GET
      • Get service account credentials GET
      • Create a service account token POSTPUT
      • Delete service account tokens DELETE
      • Clear service account token caches POST
      • Get security index settings GET
      • Update security index settings PUT
      • Get user privileges GET
      • Get users GET
      • Create or update users POSTPUT
      • Delete users DELETE
      • Disable users POSTPUT
      • Enable users POSTPUT
      • Change passwords POSTPUT
      • Check user privileges POSTGET
      • Get SSL certificates GET
    • Snapshot and restore
      • Get snapshot repository information GET
      • Create or update a snapshot repository POSTPUT
      • Delete snapshot repositories DELETE
      • Analyze a snapshot repository POST
      • Clean up the snapshot repository POST
      • Verify a snapshot repository POST
      • Get snapshot information GET
      • Create a snapshot POSTPUT
      • Delete snapshots DELETE
      • Clone a snapshot PUT
      • Restore a snapshot POST
      • Get the snapshot status GET
    • Snapshot lifecycle management
      • Run a retention policy POST
      • Get policy information GET
      • Create or update a policy PUT
      • Delete a policy DELETE
      • Run a policy PUT
      • Start snapshot lifecycle management POST
      • Get snapshot lifecycle management statistics GET
      • Get the snapshot lifecycle management status GET
      • Stop snapshot lifecycle management POST
    • SQL
      • Get SQL search results POSTGET
      • Delete an async SQL search DELETE
      • Get the async SQL search status GET
      • Get async SQL search results GET
      • Clear an SQL search cursor POST
      • Translate SQL into Elasticsearch queries POSTGET
    • Synonyms
      • Get all synonym sets GET
      • Get a synonym set GET
      • Create or update a synonym set PUT
      • Delete a synonym set DELETE
      • Get a synonym rule GET
      • Create or update a synonym rule PUT
      • Delete a synonym rule DELETE
    • Task management
      • Get all tasks GET
      • Get task information GET
      • Cancel a task POST
    • Text structure
      • Find the structure of a text field GET
      • Find the structure of text messages POSTGET
      • Find the structure of a text file POST
      • Test a Grok pattern POSTGET
    • Transform
      • Get node stats GET
      • Upgrade all transforms POST
      • Set upgrade_mode for transform indices POST
      • Get transforms GET
      • Create a transform PUT
      • Delete a transform DELETE
      • Preview a transform POSTGET
      • Reset a transform POST
      • Schedule a transform to start now POST
      • Start a transform POST
      • Get transform stats GET
      • Stop transforms POST
      • Update a transform POST
    • Usage
      • Get information GET
      • Get usage information GET
    • Watcher
      • Query watches POSTGET
      • Start the watch service POST
      • Stop the watch service POST
      • Get Watcher index settings GET
      • Update Watcher index settings PUT
      • Get Watcher statistics GET
      • Get a watch GET
      • Create or update a watch POSTPUT
      • Delete a watch DELETE
      • Run a watch POSTPUT
      • Acknowledge a watch POSTPUT
      • Activate a watch POSTPUT
      • Deactivate a watch POSTPUT
  • Types
    • Query DSL
      • Query
    • Aggregations
      • Aggregation
      • Aggregation result
    • Ingest
      • Processor
Elastic logo
  • Trademarks
  • Terms of Use
  • Privacy
  • Sitemap

© 2026 Elasticsearch B.V. All Rights Reserved.

This content is available in different formats for convenience only. All original licensing terms apply.

Elasticsearch is a trademark of Elasticsearch B.V., registered in the U.S. and in other countries. Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.

Notice at Collection | Your Privacy Choices