Elasticsearch API logo
Elastic APIs hub
  • Elastic Cloud API
  • Elastic Cloud Billing API
  • Elastic Cloud Enterprise API
  • Elastic Cloud Serverless API
  • Elasticsearch API
  • Elasticsearch Serverless API
  • Kibana API
  • Kibana Serverless API
  • Logstash API
  • Observability Intake Serverless API
Back to hub page
API Changelog
Download source
  • JSON OpenAPI specification
  • YAML OpenAPI specification
Feedback
v8
  • main default
  • v8
  • v9

Topics

  • Introduction
  • Authentication

Endpoints

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

Get EQL search results Added in 7.9.0

GET /{index}/_eql/search
Api key auth Basic auth Bearer auth

Returns search results for an Event Query Language (EQL) query. EQL assumes each document in a data stream or index corresponds to an event.

External documentation

Path parameters

  • index string | array[string] Required

    The name of the index to scope the operation

Query parameters

  • allow_no_indices boolean
  • allow_partial_search_results boolean

    If true, returns partial results if there are shard failures. If false, returns an error with no partial results.

  • allow_partial_sequence_results boolean

    If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all. This flag has effect only if allow_partial_search_results is true.

  • expand_wildcards string | array[string]
  • ignore_unavailable boolean

    If true, missing or closed indices are not included in the response.

  • keep_alive string

    Period for which the search and its results are stored on the cluster.

  • keep_on_completion boolean

    If true, the search and its results are stored on the cluster.

  • wait_for_completion_timeout string

    Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.

application/json

Body Required

  • query string Required

    EQL query you wish to run.

  • case_sensitive boolean
  • event_category_field string

    Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

  • tiebreaker_field string

    Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

  • timestamp_field string

    Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

  • fetch_size number
  • filter object | array[object]

    Query, written in Query DSL, used to filter the events on which the EQL query runs.

    One of:
    QueryContainer object array-2 array[object]

    An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.

    External documentation

    An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.

    An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.

    External documentation
  • keep_alive string

    A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

  • keep_on_completion boolean
  • wait_for_completion_timeout string

    A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

  • allow_partial_search_results boolean

    Allow query execution also in case of shard failures. If true, the query will keep running and will return results based on the available shards. For sequences, the behavior can be further refined using allow_partial_sequence_results

  • allow_partial_sequence_results boolean

    This flag applies only to sequences and has effect only if allow_partial_search_results=true. If true, the sequence query will return results based on the available shards, ignoring the others. If false, the sequence query will return successfully, but will always have empty results.

  • size number
  • fields object | array[object]

    Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.

    One of:
    FieldAndFormat object array-2 array[object]
    Hide attributes Show attributes
    • field string Required

      Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

    • format string

      The format in which the values are returned.

    • include_unmapped boolean
    Hide attributes Show attributes object
    • field string Required

      Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

    • format string

      The format in which the values are returned.

    • include_unmapped boolean
  • result_position string

    Values are tail or head.

  • runtime_mappings object
    Hide runtime_mappings attribute Show runtime_mappings attribute object
    • * object Additional properties
      Hide * attributes Show * attributes object
      • fields object

        For type composite

        Hide fields attribute Show fields attribute object
        • * object Additional properties
          Hide * attribute Show * attribute object
          • type string Required

            Values are boolean, composite, date, double, geo_point, geo_shape, ip, keyword, long, or lookup.

      • fetch_fields array[object]

        For type lookup

        Hide fetch_fields attributes Show fetch_fields attributes object
        • field string Required

          Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

        • format string
      • format string

        A custom format for date type runtime fields.

      • input_field string

        Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

      • target_field string

        Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

      • target_index string
      • script object
        Hide script attributes Show script attributes object
        • source string

          The script source.

        • id string
        • params object

          Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.

          Hide params attribute Show params attribute object
          • * object Additional properties
        • lang string

          Any of:
          ScriptLanguage string ScriptLanguage string

          Values are painless, expression, mustache, or java.

        • options object
          Hide options attribute Show options attribute object
          • * string Additional properties
      • type string Required

        Values are boolean, composite, date, double, geo_point, geo_shape, ip, keyword, long, or lookup.

  • max_samples_per_key number

    By default, the response of a sample query contains up to 10 samples, with one sample per unique set of join keys. Use the size parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the max_samples_per_key parameter. Pipes are not supported for sample queries.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • id string
    • is_partial boolean

      If true, the response does not contain complete search results.

    • is_running boolean

      If true, the search request is still executing.

    • took number

      Time unit for milliseconds

    • timed_out boolean

      If true, the request timed out before completion.

    • hits object Required
      Hide hits attributes Show hits attributes object
      • total object
        Hide total attributes Show total attributes object
        • relation string Required

          Values are eq or gte.

        • value number Required
      • events array[object]

        Contains events matching the query. Each object represents a matching event.

        Hide events attributes Show events attributes object
        • _index string Required
        • _id string Required
        • _source object Required

          Original JSON body passed for the event at index time.

        • missing boolean

          Set to true for events in a timespan-constrained sequence that do not meet a given condition.

        • fields object
          Hide fields attribute Show fields attribute object
          • * array[object] Additional properties
      • sequences array[object]

        Contains event sequences matching the query. Each object represents a matching sequence. This parameter is only returned for EQL queries containing a sequence.

        Hide sequences attributes Show sequences attributes object
        • events array[object] Required

          Contains events matching the query. Each object represents a matching event.

          Hide events attributes Show events attributes object
          • _index string Required
          • _id string Required
          • _source object Required

            Original JSON body passed for the event at index time.

          • missing boolean

            Set to true for events in a timespan-constrained sequence that do not meet a given condition.

          • fields object
        • join_keys array[object]

          Shared field values used to constrain matches in the sequence. These are defined using the by keyword in the EQL query syntax.

    • shard_failures array[object]

      Contains information about shard failures (if any), in case allow_partial_search_results=true

      Hide shard_failures attributes Show shard_failures attributes object
      • index string
      • node string
      • reason object Required
        Hide reason attributes Show reason attributes object
        • type string Required

          The type of error

        • reason string

          A human-readable explanation of the error, in English.

        • stack_trace string

          The server stack trace. Present only if the error_trace=true parameter was sent with the request.

        • caused_by object
        • root_cause array[object]
        • suppressed array[object]
      • shard number Required
      • status string
GET /{index}/_eql/search
curl \
 --request GET 'http://api.example.com/{index}/_eql/search' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"query\": \"\"\"\n    process where (process.name == \"cmd.exe\" and process.pid != 2013)\n  \"\"\"\n}"'
Request examples
Basic query
  • Basic query
  • Sequence query
Run `GET /my-data-stream/_eql/search` to search for events that have a `process.name` of `cmd.exe` and a `process.pid` other than `2013`.
{
  "query": """
    process where (process.name == "cmd.exe" and process.pid != 2013)
  """
}
Run `GET /my-data-stream/_eql/search` to search for a sequence of events. The sequence starts with an event with an `event.category` of `file`, a `file.name` of `cmd.exe`, and a `process.pid` other than `2013`. It is followed by an event with an `event.category` of `process` and a `process.executable` that contains the substring `regsvr32`. These events must also share the same `process.pid` value.
{
  "query": """
    sequence by process.pid
      [ file where file.name == "cmd.exe" and process.pid != 2013 ]
      [ process where stringContains(process.executable, "regsvr32") ]
  """
}
Response examples (200)
{
  "is_partial": false,
  "is_running": false,
  "took": 6,
  "timed_out": false,
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "sequences": [
      {
        "join_keys": [
          2012
        ],
        "events": [
          {
            "_index": ".ds-my-data-stream-2099.12.07-000001",
            "_id": "AtOJ4UjUBAAx3XR5kcCM",
            "_source": {
              "@timestamp": "2099-12-06T11:04:07.000Z",
              "event": {
                "category": "file",
                "id": "dGCHwoeS",
                "sequence": 2
              },
              "file": {
                "accessed": "2099-12-07T11:07:08.000Z",
                "name": "cmd.exe",
                "path": "C:\\Windows\\System32\\cmd.exe",
                "type": "file",
                "size": 16384
              },
              "process": {
                "pid": 2012,
                "name": "cmd.exe",
                "executable": "C:\\Windows\\System32\\cmd.exe"
              }
            }
          },
          {
            "_index": ".ds-my-data-stream-2099.12.07-000001",
            "_id": "OQmfCaduce8zoHT93o4H",
            "_source": {
              "@timestamp": "2099-12-07T11:07:09.000Z",
              "event": {
                "category": "process",
                "id": "aR3NWVOs",
                "sequence": 4
              },
              "process": {
                "pid": 2012,
                "name": "regsvr32.exe",
                "command_line": "regsvr32.exe  /s /u /i:https://...RegSvr32.sct scrobj.dll",
                "executable": "C:\\Windows\\System32\\regsvr32.exe"
              }
            }
          }
        ]
      }
    ]
  }
}