API Reference

edit

This document contains the entire list of the Elasticsearch API supported by the client, both OSS and commercial. The client is entirely licensed under Apache 2.0.

Elasticsearch exposes an HTTP layer to communicate with, and the client is a library that will help you do this. Because of this reason, you will see HTTP related parameters, such as body or headers.

Every API can accept two objects, the first contains all the parameters that will be sent to Elasticsearch, while the second includes the request specific parameters, such as timeouts, headers, and so on. In the first object, every parameter but the body will be sent via querystring or url parameter, depending on the API, and every unrecognized parameter will be sent as querystring.

// promise API
const result = await client.search({
  index: 'my-index',
  from: 20,
  size: 10,
  body: { foo: 'bar' }
}, {
  ignore: [404],
  maxRetries: 3
})

// callback API
client.search({
  index: 'my-index',
  from: 20,
  size: 10,
  body: { foo: 'bar' }
}, {
  ignore: [404],
  maxRetries: 3
}, (err, result) => {
  if (err) console.log(err)
})

In this document, you will find the reference of every parameter accepted by the querystring or the url. If you also need to send the body, you can find the documentation of its format in the reference link that is present along with every endpoint.

Common parameters

edit

Parameters that are accepted by all API endpoints.

Documentation

pretty

boolean - Pretty format the returned JSON response.

human

boolean - Return human readable values for statistics.
Default: true

error_trace or errorTrace

boolean - Include the stack trace of returned errors.

source

string - The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_path or filterPath

list - A comma-separated list of filters used to reduce the response.

asyncSearch.delete

edit
client.asyncSearch.delete({
  id: string
})

Documentation

id

string - The async search ID

asyncSearch.get

edit
client.asyncSearch.get({
  id: string,
  wait_for_completion_timeout: string,
  keep_alive: string,
  typed_keys: boolean
})

Documentation

id

string - The async search ID

wait_for_completion_timeout or waitForCompletionTimeout

string - Specify the time that the request should block waiting for the final response

keep_alive or keepAlive

string - Specify the time interval in which the results (partial or final) for this search will be available

typed_keys or typedKeys

boolean - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

asyncSearch.status

edit
client.asyncSearch.status({
  id: string
})

Documentation

id

string - The async search ID

asyncSearch.submit

edit
client.asyncSearch.submit({
  index: string | string[],
  wait_for_completion_timeout: string,
  keep_on_completion: boolean,
  keep_alive: string,
  batched_reduce_size: number,
  request_cache: boolean,
  analyzer: string,
  analyze_wildcard: boolean,
  default_operator: 'AND' | 'OR',
  df: string,
  explain: boolean,
  stored_fields: string | string[],
  docvalue_fields: string | string[],
  from: number,
  ignore_unavailable: boolean,
  ignore_throttled: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  lenient: boolean,
  preference: string,
  q: string,
  routing: string | string[],
  search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
  size: number,
  sort: string | string[],
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  terminate_after: number,
  stats: string | string[],
  suggest_field: string,
  suggest_mode: 'missing' | 'popular' | 'always',
  suggest_size: number,
  suggest_text: string,
  timeout: string,
  track_scores: boolean,
  track_total_hits: boolean,
  allow_partial_search_results: boolean,
  typed_keys: boolean,
  version: boolean,
  seq_no_primary_term: boolean,
  max_concurrent_shard_requests: number,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

wait_for_completion_timeout or waitForCompletionTimeout

string - Specify the time that the request should block waiting for the final response
Default: 1s

keep_on_completion or keepOnCompletion

boolean - Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)

keep_alive or keepAlive

string - Update the time interval in which the results (partial or final) for this search will be available
Default: 5d

batched_reduce_size or batchedReduceSize

number - The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.
Default: 5

request_cache or requestCache

boolean - Specify if request cache should be used for this request or not, defaults to true

analyzer

string - The analyzer to use for the query string

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcard and prefix queries should be analyzed (default: false)

default_operator or defaultOperator

'AND' | 'OR' - The default operator for query string query (AND or OR)
Default: OR

df

string - The field to use as default where no field prefix is given in the query string

explain

boolean - Specify whether to return detailed information about score computation as part of a hit

stored_fields or storedFields

string | string[] - A comma-separated list of stored fields to return as part of a hit

docvalue_fields or docvalueFields

string | string[] - A comma-separated list of fields to return as the docvalue representation of a field for each hit

from

number - Starting offset (default: 0)

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

ignore_throttled or ignoreThrottled

boolean - Whether specified concrete, expanded or aliased indices should be ignored when throttled

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

lenient

boolean - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

preference

string - Specify the node or shard the operation should be performed on (default: random)

q

string - Query in the Lucene query string syntax

routing

string | string[] - A comma-separated list of specific routing values

search_type or searchType

'query_then_fetch' | 'dfs_query_then_fetch' - Search operation type

size

number - Number of hits to return (default: 10)

sort

string | string[] - A comma-separated list of <field>:<direction> pairs

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

terminate_after or terminateAfter

number - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

stats

string | string[] - Specific tag of the request for logging and statistical purposes

suggest_field or suggestField

string - Specify which field to use for suggestions

suggest_mode or suggestMode

'missing' | 'popular' | 'always' - Specify suggest mode
Default: missing

suggest_size or suggestSize

number - How many suggestions to return in response

suggest_text or suggestText

string - The source text for which the suggestions should be returned

timeout

string - Explicit operation timeout

track_scores or trackScores

boolean - Whether to calculate and return scores even if they are not used for sorting

track_total_hits or trackTotalHits

boolean - Indicate if the number of documents that match the query should be tracked

allow_partial_search_results or allowPartialSearchResults

boolean - Indicate if an error should be returned if there is a partial search failure or timeout
Default: true

typed_keys or typedKeys

boolean - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

version

boolean - Specify whether to return document version as part of a hit

seq_no_primary_term or seqNoPrimaryTerm

boolean - Specify whether to return sequence number and primary term of the last modification of each hit

max_concurrent_shard_requests or maxConcurrentShardRequests

number - The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
Default: 5

body

object - The search definition using the Query DSL

autoscaling.deleteAutoscalingPolicy

edit
client.autoscaling.deleteAutoscalingPolicy({
  name: string
})

Documentation

name

string - the name of the autoscaling policy

autoscaling.getAutoscalingCapacity

edit
client.autoscaling.getAutoscalingCapacity()

Documentation

autoscaling.getAutoscalingPolicy

edit
client.autoscaling.getAutoscalingPolicy({
  name: string
})

Documentation

name

string - the name of the autoscaling policy

autoscaling.putAutoscalingPolicy

edit
client.autoscaling.putAutoscalingPolicy({
  name: string,
  body: object
})

Documentation

name

string - the name of the autoscaling policy

body

object - the specification of the autoscaling policy

bulk

edit
client.bulk({
  index: string,
  type: string,
  wait_for_active_shards: string,
  refresh: 'true' | 'false' | 'wait_for',
  routing: string,
  timeout: string,
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  pipeline: string,
  require_alias: boolean,
  body: object
})

Documentation
Code Example

index

string - Default index for items which don’t provide one

type

string - Default document type for items which don’t provide one

wait_for_active_shards or waitForActiveShards

string - 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

'true' | 'false' | 'wait_for' - 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

string - Specific routing value

timeout

string - Explicit operation timeout

_source

string | string[] - 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 or _sourceExcludes

string | string[] - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request

_source_includes or _sourceIncludes

string | string[] - Default list of fields to extract and return from the _source field, can be overridden on each sub-request

pipeline

string - The pipeline id to preprocess incoming documents with

require_alias or requireAlias

boolean - Sets require_alias for all incoming documents. Defaults to unset (false)

body

object - The operation definition and data (action-data pairs), separated by newlines

cat.aliases

edit
client.cat.aliases({
  name: string | string[],
  format: string,
  local: boolean,
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

name

string | string[] - A comma-separated list of alias names to return

format

string - a short version of the Accept header, e.g. json, yaml

local

boolean - Return local information, do not retrieve the state from master node (default: false)

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: all

cat.allocation

edit
client.cat.allocation({
  node_id: string | string[],
  format: string,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs or names to limit the returned information

format

string - a short version of the Accept header, e.g. json, yaml

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.count

edit
client.cat.count({
  index: string | string[],
  format: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names to limit the returned information

format

string - a short version of the Accept header, e.g. json, yaml

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.fielddata

edit
client.cat.fielddata({
  fields: string | string[],
  format: string,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

fields

string | string[] - A comma-separated list of fields to return the fielddata size

format

string - a short version of the Accept header, e.g. json, yaml

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.health

edit
client.cat.health({
  format: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  ts: boolean,
  v: boolean
})

Documentation

format

string - a short version of the Accept header, e.g. json, yaml

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

ts

boolean - Set to false to disable timestamping
Default: true

v

boolean - Verbose mode. Display column headers

cat.help

edit
client.cat.help({
  help: boolean,
  s: string | string[]
})

Documentation

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

cat.indices

edit
client.cat.indices({
  index: string | string[],
  format: string,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  local: boolean,
  master_timeout: string,
  h: string | string[],
  health: 'green' | 'yellow' | 'red',
  help: boolean,
  pri: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean,
  include_unloaded_segments: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names to limit the returned information

format

string - a short version of the Accept header, e.g. json, yaml

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

local

boolean - Return local information, do not retrieve the state from master node (default: false)

WARNING: This parameter has been deprecated.

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

health

'green' | 'yellow' | 'red' - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status

help

boolean - Return help information

pri

boolean - Set to true to return stats only for primary shards

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

include_unloaded_segments or includeUnloadedSegments

boolean - If set to true segment stats will include stats for segments that are not currently loaded into memory

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: all

cat.master

edit
client.cat.master({
  format: string,
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

format

string - a short version of the Accept header, e.g. json, yaml

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.mlDataFrameAnalytics

edit
client.cat.mlDataFrameAnalytics({
  id: string,
  allow_no_match: boolean,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  format: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

id

string - The ID of the data frame analytics to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no configs. (This includes _all string or when no configs have been specified)

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

format

string - a short version of the Accept header, e.g. json, yaml

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.mlDatafeeds

edit
client.cat.mlDatafeeds({
  datafeed_id: string,
  allow_no_match: boolean,
  allow_no_datafeeds: boolean,
  format: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeeds stats to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no datafeeds. (This includes _all string or when no datafeeds have been specified)

allow_no_datafeeds or allowNoDatafeeds

boolean - Whether to ignore if a wildcard expression matches no datafeeds. (This includes _all string or when no datafeeds have been specified)

WARNING: This parameter has been deprecated.

format

string - a short version of the Accept header, e.g. json, yaml

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.mlJobs

edit
client.cat.mlJobs({
  job_id: string,
  allow_no_match: boolean,
  allow_no_jobs: boolean,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  format: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

job_id or jobId

string - The ID of the jobs stats to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

allow_no_jobs or allowNoJobs

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

WARNING: This parameter has been deprecated.

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

format

string - a short version of the Accept header, e.g. json, yaml

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.mlTrainedModels

edit
client.cat.mlTrainedModels({
  model_id: string,
  allow_no_match: boolean,
  from: number,
  size: number,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  format: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

model_id or modelId

string - The ID of the trained models stats to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no trained models. (This includes _all string or when no trained models have been specified)
Default: true

from

number - skips a number of trained models

size

number - specifies a max number of trained models to get
Default: 100

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

format

string - a short version of the Accept header, e.g. json, yaml

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.nodeattrs

edit
client.cat.nodeattrs({
  format: string,
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

format

string - a short version of the Accept header, e.g. json, yaml

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.nodes

edit
client.cat.nodes({
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  format: string,
  full_id: boolean,
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean,
  include_unloaded_segments: boolean
})

Documentation

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

format

string - a short version of the Accept header, e.g. json, yaml

full_id or fullId

boolean - Return the full node ID instead of the shortened version (default: false)

local

boolean - Calculate the selected nodes using the local cluster state rather than the state from master node (default: false)

WARNING: This parameter has been deprecated.

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

include_unloaded_segments or includeUnloadedSegments

boolean - If set to true segment stats will include stats for segments that are not currently loaded into memory

cat.pendingTasks

edit
client.cat.pendingTasks({
  format: string,
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

format

string - a short version of the Accept header, e.g. json, yaml

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.plugins

edit
client.cat.plugins({
  format: string,
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  include_bootstrap: boolean,
  s: string | string[],
  v: boolean
})

Documentation

format

string - a short version of the Accept header, e.g. json, yaml

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

include_bootstrap or includeBootstrap

boolean - Include bootstrap plugins in the response

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.recovery

edit
client.cat.recovery({
  index: string | string[],
  format: string,
  active_only: boolean,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  detailed: boolean,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

index

string | string[] - Comma-separated list or wildcard expression of index names to limit the returned information

format

string - a short version of the Accept header, e.g. json, yaml

active_only or activeOnly

boolean - If true, the response only includes ongoing shard recoveries

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

detailed

boolean - If true, the response includes detailed information about shard recoveries

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.repositories

edit
client.cat.repositories({
  format: string,
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

format

string - a short version of the Accept header, e.g. json, yaml

local

boolean - Return local information, do not retrieve the state from master node

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.segments

edit
client.cat.segments({
  index: string | string[],
  format: string,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names to limit the returned information

format

string - a short version of the Accept header, e.g. json, yaml

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.shards

edit
client.cat.shards({
  index: string | string[],
  format: string,
  bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names to limit the returned information

format

string - a short version of the Accept header, e.g. json, yaml

bytes

'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb' - The unit in which to display byte values

local

boolean - Return local information, do not retrieve the state from master node (default: false)

WARNING: This parameter has been deprecated.

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.snapshots

edit
client.cat.snapshots({
  repository: string | string[],
  format: string,
  ignore_unavailable: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

repository

string | string[] - Name of repository from which to fetch the snapshot information

format

string - a short version of the Accept header, e.g. json, yaml

ignore_unavailable or ignoreUnavailable

boolean - Set to true to ignore unavailable snapshots

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.tasks

edit
client.cat.tasks({
  format: string,
  nodes: string | string[],
  actions: string | string[],
  detailed: boolean,
  parent_task_id: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

format

string - a short version of the Accept header, e.g. json, yaml

nodes

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

actions

string | string[] - A comma-separated list of actions that should be returned. Leave empty to return all.

detailed

boolean - Return detailed task information (default: false)

parent_task_id or parentTaskId

string - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

cat.templates

edit
client.cat.templates({
  name: string,
  format: string,
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

name

string - A pattern that returned template names must match

format

string - a short version of the Accept header, e.g. json, yaml

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.threadPool

edit
client.cat.threadPool({
  thread_pool_patterns: string | string[],
  format: string,
  size: '' | 'k' | 'm' | 'g' | 't' | 'p',
  local: boolean,
  master_timeout: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  v: boolean
})

Documentation

thread_pool_patterns or threadPoolPatterns

string | string[] - A comma-separated list of regular-expressions to filter the thread pools in the output

format

string - a short version of the Accept header, e.g. json, yaml

size

'' | 'k' | 'm' | 'g' | 't' | 'p' - The multiplier in which to display values

WARNING: This parameter has been deprecated.

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

v

boolean - Verbose mode. Display column headers

cat.transforms

edit
client.cat.transforms({
  transform_id: string,
  from: number,
  size: number,
  allow_no_match: boolean,
  format: string,
  h: string | string[],
  help: boolean,
  s: string | string[],
  time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos',
  v: boolean
})

Documentation

transform_id or transformId

string - The id of the transform for which to get stats. _all or * implies all transforms

from

number - skips a number of transform configs, defaults to 0

size

number - specifies a max number of transforms to get, defaults to 100

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no transforms. (This includes _all string or when no transforms have been specified)

format

string - a short version of the Accept header, e.g. json, yaml

h

string | string[] - Comma-separated list of column names to display

help

boolean - Return help information

s

string | string[] - Comma-separated list of column names or column aliases to sort by

time

'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos' - The unit in which to display time values

v

boolean - Verbose mode. Display column headers

ccr.deleteAutoFollowPattern

edit
client.ccr.deleteAutoFollowPattern({
  name: string
})

Documentation

name

string - The name of the auto follow pattern.

ccr.follow

edit
client.ccr.follow({
  index: string,
  wait_for_active_shards: string,
  body: object
})

Documentation

index

string - The name of the follower index

wait_for_active_shards or waitForActiveShards

string - Sets the number of shard copies that must be active before returning. Defaults to 0. 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)
Default: 0

body

object - The name of the leader index and other optional ccr related parameters

ccr.followInfo

edit
client.ccr.followInfo({
  index: string | string[]
})

Documentation

index

string | string[] - A comma-separated list of index patterns; use _all to perform the operation on all indices

ccr.followStats

edit
client.ccr.followStats({
  index: string | string[]
})

Documentation

index

string | string[] - A comma-separated list of index patterns; use _all to perform the operation on all indices

ccr.forgetFollower

edit
client.ccr.forgetFollower({
  index: string,
  body: object
})

Documentation

index

string - the name of the leader index for which specified follower retention leases should be removed

body

object - the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index

ccr.getAutoFollowPattern

edit
client.ccr.getAutoFollowPattern({
  name: string
})

Documentation

name

string - The name of the auto follow pattern.

ccr.pauseAutoFollowPattern

edit
client.ccr.pauseAutoFollowPattern({
  name: string
})

Documentation

name

string - The name of the auto follow pattern that should pause discovering new indices to follow.

ccr.pauseFollow

edit
client.ccr.pauseFollow({
  index: string
})

Documentation

index

string - The name of the follower index that should pause following its leader index.

ccr.putAutoFollowPattern

edit
client.ccr.putAutoFollowPattern({
  name: string,
  body: object
})

Documentation

name

string - The name of the auto follow pattern.

body

object - The specification of the auto follow pattern

ccr.resumeAutoFollowPattern

edit
client.ccr.resumeAutoFollowPattern({
  name: string
})

Documentation

name

string - The name of the auto follow pattern to resume discovering new indices to follow.

ccr.resumeFollow

edit
client.ccr.resumeFollow({
  index: string,
  body: object
})

Documentation

index

string - The name of the follow index to resume following.

body

object - The name of the leader index and other optional ccr related parameters

ccr.stats

edit
client.ccr.stats()

Documentation

ccr.unfollow

edit
client.ccr.unfollow({
  index: string
})

Documentation

index

string - The name of the follower index that should be turned into a regular index.

clearScroll

edit
client.clearScroll({
  scroll_id: string | string[],
  body: object
})

Documentation

scroll_id or scrollId

string | string[] - A comma-separated list of scroll IDs to clear

WARNING: This parameter has been deprecated.

body

object - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter

closePointInTime

edit
client.closePointInTime({
  body: object
})

Documentation

body

object - a point-in-time id to close

cluster.allocationExplain

edit
client.cluster.allocationExplain({
  include_yes_decisions: boolean,
  include_disk_info: boolean,
  body: object
})

Documentation

include_yes_decisions or includeYesDecisions

boolean - Return YES decisions in explanation (default: false)

include_disk_info or includeDiskInfo

boolean - Return information about disk usage and shard sizes (default: false)

body

object - The index, shard, and primary flag to explain. Empty means explain a randomly-chosen unassigned shard

cluster.deleteComponentTemplate

edit
client.cluster.deleteComponentTemplate({
  name: string,
  timeout: string,
  master_timeout: string
})

Documentation

name

string - The name of the template

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

cluster.deleteVotingConfigExclusions

edit
client.cluster.deleteVotingConfigExclusions({
  wait_for_removal: boolean
})

Documentation

wait_for_removal or waitForRemoval

boolean - Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
Default: true

cluster.existsComponentTemplate

edit
client.cluster.existsComponentTemplate({
  name: string,
  master_timeout: string,
  local: boolean
})

Documentation

name

string - The name of the template

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

local

boolean - Return local information, do not retrieve the state from master node (default: false)

cluster.getComponentTemplate

edit
client.cluster.getComponentTemplate({
  name: string | string[],
  master_timeout: string,
  local: boolean
})

Documentation

name

string | string[] - The comma separated names of the component templates

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

local

boolean - Return local information, do not retrieve the state from master node (default: false)

cluster.getSettings

edit
client.cluster.getSettings({
  flat_settings: boolean,
  master_timeout: string,
  timeout: string,
  include_defaults: boolean
})

Documentation

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

include_defaults or includeDefaults

boolean - Whether to return all default clusters setting.

cluster.health

edit
client.cluster.health({
  index: string | string[],
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  level: 'cluster' | 'indices' | 'shards',
  local: boolean,
  master_timeout: string,
  timeout: string,
  wait_for_active_shards: string,
  wait_for_nodes: string,
  wait_for_events: 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid',
  wait_for_no_relocating_shards: boolean,
  wait_for_no_initializing_shards: boolean,
  wait_for_status: 'green' | 'yellow' | 'red'
})

Documentation

index

string | string[] - Limit the information returned to a specific index

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: all

level

'cluster' | 'indices' | 'shards' - Specify the level of detail for returned information
Default: cluster

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

wait_for_active_shards or waitForActiveShards

string - Wait until the specified number of shards is active

wait_for_nodes or waitForNodes

string - Wait until the specified number of nodes is available

wait_for_events or waitForEvents

'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid' - Wait until all currently queued events with the given priority are processed

wait_for_no_relocating_shards or waitForNoRelocatingShards

boolean - Whether to wait until there are no relocating shards in the cluster

wait_for_no_initializing_shards or waitForNoInitializingShards

boolean - Whether to wait until there are no initializing shards in the cluster

wait_for_status or waitForStatus

'green' | 'yellow' | 'red' - Wait until cluster is in a specific state

cluster.pendingTasks

edit
client.cluster.pendingTasks({
  local: boolean,
  master_timeout: string
})

Documentation

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Specify timeout for connection to master

cluster.postVotingConfigExclusions

edit
client.cluster.postVotingConfigExclusions({
  node_ids: string,
  node_names: string,
  timeout: string
})

Documentation

node_ids or nodeIds

string - A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names.

node_names or nodeNames

string - A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids.

timeout

string - Explicit operation timeout
Default: 30s

cluster.putComponentTemplate

edit
client.cluster.putComponentTemplate({
  name: string,
  create: boolean,
  timeout: string,
  master_timeout: string,
  body: object
})

Documentation

name

string - The name of the template

create

boolean - Whether the index template should only be added if new or can also replace an existing one

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - The template definition

cluster.putSettings

edit
client.cluster.putSettings({
  flat_settings: boolean,
  master_timeout: string,
  timeout: string,
  body: object
})

Documentation

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

body

object - The settings to be updated. Can be either transient or persistent (survives cluster restart).

cluster.remoteInfo

edit
client.cluster.remoteInfo()

Documentation

cluster.reroute

edit
client.cluster.reroute({
  dry_run: boolean,
  explain: boolean,
  retry_failed: boolean,
  metric: string | string[],
  master_timeout: string,
  timeout: string,
  body: object
})

Documentation

dry_run or dryRun

boolean - Simulate the operation only and return the resulting state

explain

boolean - Return an explanation of why the commands can or cannot be executed

retry_failed or retryFailed

boolean - Retries allocation of shards that are blocked due to too many subsequent allocation failures

metric

string | string[] - Limit the information returned to the specified metrics. Defaults to all but metadata

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

body

object - The definition of commands to perform (move, cancel, allocate)

cluster.state

edit
client.cluster.state({
  index: string | string[],
  metric: string | string[],
  local: boolean,
  master_timeout: string,
  flat_settings: boolean,
  wait_for_metadata_version: number,
  wait_for_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

metric

string | string[] - Limit the information returned to the specified metrics

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Specify timeout for connection to master

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

wait_for_metadata_version or waitForMetadataVersion

number - Wait for the metadata version to be equal or greater than the specified metadata version

wait_for_timeout or waitForTimeout

string - The maximum time to wait for wait_for_metadata_version before timing out

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

cluster.stats

edit
client.cluster.stats({
  node_id: string | string[],
  flat_settings: boolean,
  timeout: string
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

timeout

string - Explicit operation timeout

count

edit
client.count({
  index: string | string[],
  type: string | string[],
  ignore_unavailable: boolean,
  ignore_throttled: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  min_score: number,
  preference: string,
  routing: string | string[],
  q: string,
  analyzer: string,
  analyze_wildcard: boolean,
  default_operator: 'AND' | 'OR',
  df: string,
  lenient: boolean,
  terminate_after: number,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of indices to restrict the results

type

string | string[] - A comma-separated list of types to restrict the results

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

ignore_throttled or ignoreThrottled

boolean - Whether specified concrete, expanded or aliased indices should be ignored when throttled

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

min_score or minScore

number - Include only documents with a specific _score value in the result

preference

string - Specify the node or shard the operation should be performed on (default: random)

routing

string | string[] - A comma-separated list of specific routing values

q

string - Query in the Lucene query string syntax

analyzer

string - The analyzer to use for the query string

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcard and prefix queries should be analyzed (default: false)

default_operator or defaultOperator

'AND' | 'OR' - The default operator for query string query (AND or OR)
Default: OR

df

string - The field to use as default where no field prefix is given in the query string

lenient

boolean - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

terminate_after or terminateAfter

number - The maximum count for each shard, upon reaching which the query execution will terminate early

body

object - A query to restrict the results specified with the Query DSL (optional)

create

edit
client.create({
  id: string,
  index: string,
  type: string,
  wait_for_active_shards: string,
  refresh: 'true' | 'false' | 'wait_for',
  routing: string,
  timeout: string,
  version: number,
  version_type: 'internal' | 'external' | 'external_gte',
  pipeline: string,
  body: object
})

Documentation

id

string - Document ID

index

string - The name of the index

type

string - The type of the document

WARNING: This parameter has been deprecated.

wait_for_active_shards or waitForActiveShards

string - 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)

refresh

'true' | 'false' | 'wait_for' - 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

string - Specific routing value

timeout

string - Explicit operation timeout

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' - Specific version type

pipeline

string - The pipeline id to preprocess incoming documents with

body

object - The document

danglingIndices.deleteDanglingIndex

edit
client.danglingIndices.deleteDanglingIndex({
  index_uuid: string,
  accept_data_loss: boolean,
  timeout: string,
  master_timeout: string
})

Documentation

index_uuid or indexUuid

string - The UUID of the dangling index

accept_data_loss or acceptDataLoss

boolean - Must be set to true in order to delete the dangling index

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

danglingIndices.importDanglingIndex

edit
client.danglingIndices.importDanglingIndex({
  index_uuid: string,
  accept_data_loss: boolean,
  timeout: string,
  master_timeout: string
})

Documentation

index_uuid or indexUuid

string - The UUID of the dangling index

accept_data_loss or acceptDataLoss

boolean - Must be set to true in order to import the dangling index

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

danglingIndices.listDanglingIndices

edit
client.danglingIndices.listDanglingIndices()

Documentation

delete

edit
client.delete({
  id: string,
  index: string,
  type: string,
  wait_for_active_shards: string,
  refresh: 'true' | 'false' | 'wait_for',
  routing: string,
  timeout: string,
  if_seq_no: number,
  if_primary_term: number,
  version: number,
  version_type: 'internal' | 'external' | 'external_gte' | 'force'
})

Documentation

id

string - The document ID

index

string - The name of the index

type

string - The type of the document

WARNING: This parameter has been deprecated.

wait_for_active_shards or waitForActiveShards

string - Sets the number of shard copies that must be active before proceeding with the delete 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

'true' | 'false' | 'wait_for' - 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

string - Specific routing value

timeout

string - Explicit operation timeout

if_seq_no or ifSeqNo

number - only perform the delete operation if the last operation that has changed the document has the specified sequence number

if_primary_term or ifPrimaryTerm

number - only perform the delete operation if the last operation that has changed the document has the specified primary term

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' | 'force' - Specific version type

deleteByQuery

edit
client.deleteByQuery({
  index: string | string[],
  type: string | string[],
  analyzer: string,
  analyze_wildcard: boolean,
  default_operator: 'AND' | 'OR',
  df: string,
  from: number,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  conflicts: 'abort' | 'proceed',
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  lenient: boolean,
  preference: string,
  q: string,
  routing: string | string[],
  scroll: string,
  search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
  search_timeout: string,
  size: number,
  max_docs: number,
  sort: string | string[],
  terminate_after: number,
  stats: string | string[],
  version: boolean,
  request_cache: boolean,
  refresh: boolean,
  timeout: string,
  wait_for_active_shards: string,
  scroll_size: number,
  wait_for_completion: boolean,
  requests_per_second: number,
  slices: number|string,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

type

string | string[] - A comma-separated list of document types to search; leave empty to perform the operation on all types

analyzer

string - The analyzer to use for the query string

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcard and prefix queries should be analyzed (default: false)

default_operator or defaultOperator

'AND' | 'OR' - The default operator for query string query (AND or OR)
Default: OR

df

string - The field to use as default where no field prefix is given in the query string

from

number - Starting offset (default: 0)

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

conflicts

'abort' | 'proceed' - What to do when the delete by query hits version conflicts?
Default: abort

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

lenient

boolean - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

preference

string - Specify the node or shard the operation should be performed on (default: random)

q

string - Query in the Lucene query string syntax

routing

string | string[] - A comma-separated list of specific routing values

scroll

string - Specify how long a consistent view of the index should be maintained for scrolled search

search_type or searchType

'query_then_fetch' | 'dfs_query_then_fetch' - Search operation type

search_timeout or searchTimeout

string - Explicit timeout for each search request. Defaults to no timeout.

size

number - Deprecated, please use max_docs instead

max_docs or maxDocs

number - Maximum number of documents to process (default: all documents)

sort

string | string[] - A comma-separated list of <field>:<direction> pairs

terminate_after or terminateAfter

number - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

stats

string | string[] - Specific tag of the request for logging and statistical purposes

version

boolean - Specify whether to return document version as part of a hit

request_cache or requestCache

boolean - Specify if request cache should be used for this request or not, defaults to index level setting

refresh

boolean - Should the effected indexes be refreshed?

timeout

string - Time each individual bulk request should wait for shards that are unavailable.
Default: 1m

wait_for_active_shards or waitForActiveShards

string - Sets the number of shard copies that must be active before proceeding with the delete by query 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)

scroll_size or scrollSize

number - Size on the scroll request powering the delete by query
Default: 100

wait_for_completion or waitForCompletion

boolean - Should the request should block until the delete by query is complete.
Default: true

requests_per_second or requestsPerSecond

number - The throttle for this request in sub-requests per second. -1 means no throttle.

slices

number|string - The number of slices this task should be divided into. Defaults to 1, meaning the task isn’t sliced into subtasks. Can be set to auto.
Default: 1

body

object - The search definition using the Query DSL

deleteByQueryRethrottle

edit
client.deleteByQueryRethrottle({
  task_id: string,
  requests_per_second: number
})

Documentation

task_id or taskId

string - The task id to rethrottle

requests_per_second or requestsPerSecond

number - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.

deleteScript

edit
client.deleteScript({
  id: string,
  timeout: string,
  master_timeout: string
})

Documentation

id

string - Script ID

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

enrich.deletePolicy

edit
client.enrich.deletePolicy({
  name: string
})

Documentation

name

string - The name of the enrich policy

enrich.executePolicy

edit
client.enrich.executePolicy({
  name: string,
  wait_for_completion: boolean
})

Documentation

name

string - The name of the enrich policy

wait_for_completion or waitForCompletion

boolean - Should the request should block until the execution is complete.
Default: true

enrich.getPolicy

edit
client.enrich.getPolicy({
  name: string | string[]
})

Documentation

name

string | string[] - A comma-separated list of enrich policy names

enrich.putPolicy

edit
client.enrich.putPolicy({
  name: string,
  body: object
})

Documentation

name

string - The name of the enrich policy

body

object - The enrich policy to register

enrich.stats

edit
client.enrich.stats()

Documentation

eql.delete

edit
client.eql.delete({
  id: string
})

Documentation

id

string - The async search ID

eql.get

edit
client.eql.get({
  id: string,
  wait_for_completion_timeout: string,
  keep_alive: string
})

Documentation

id

string - The async search ID

wait_for_completion_timeout or waitForCompletionTimeout

string - Specify the time that the request should block waiting for the final response

keep_alive or keepAlive

string - Update the time interval in which the results (partial or final) for this search will be available
Default: 5d

eql.getStatus

edit
client.eql.getStatus({
  id: string
})

Documentation

id

string - The async search ID

eql.search

edit
client.eql.search({
  index: string,
  wait_for_completion_timeout: string,
  keep_on_completion: boolean,
  keep_alive: string,
  body: object
})

Documentation

index

string - The name of the index to scope the operation

wait_for_completion_timeout or waitForCompletionTimeout

string - Specify the time that the request should block waiting for the final response

keep_on_completion or keepOnCompletion

boolean - Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)

keep_alive or keepAlive

string - Update the time interval in which the results (partial or final) for this search will be available
Default: 5d

body

object - Eql request body. Use the query to limit the query scope.

exists

edit
client.exists({
  id: string,
  index: string,
  type: string,
  stored_fields: string | string[],
  preference: string,
  realtime: boolean,
  refresh: boolean,
  routing: string,
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  version: number,
  version_type: 'internal' | 'external' | 'external_gte' | 'force'
})

Documentation
Code Example

id

string - The document ID

index

string - The name of the index

type

string - The type of the document (use _all to fetch the first document matching the ID across all types)

WARNING: This parameter has been deprecated.

stored_fields or storedFields

string | string[] - A comma-separated list of stored fields to return in the response

preference

string - Specify the node or shard the operation should be performed on (default: random)

realtime

boolean - Specify whether to perform the operation in realtime or search mode

refresh

boolean - Refresh the shard containing the document before performing the operation

routing

string - Specific routing value

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' | 'force' - Specific version type

existsSource

edit
client.existsSource({
  id: string,
  index: string,
  type: string,
  preference: string,
  realtime: boolean,
  refresh: boolean,
  routing: string,
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  version: number,
  version_type: 'internal' | 'external' | 'external_gte' | 'force'
})

Documentation

id

string - The document ID

index

string - The name of the index

type

string - The type of the document; deprecated and optional starting with 7.0

WARNING: This parameter has been deprecated.

preference

string - Specify the node or shard the operation should be performed on (default: random)

realtime

boolean - Specify whether to perform the operation in realtime or search mode

refresh

boolean - Refresh the shard containing the document before performing the operation

routing

string - Specific routing value

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' | 'force' - Specific version type

explain

edit
client.explain({
  id: string,
  index: string,
  type: string,
  analyze_wildcard: boolean,
  analyzer: string,
  default_operator: 'AND' | 'OR',
  df: string,
  stored_fields: string | string[],
  lenient: boolean,
  preference: string,
  q: string,
  routing: string,
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  body: object
})

Documentation

id

string - The document ID

index

string - The name of the index

type

string - The type of the document

WARNING: This parameter has been deprecated.

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)

analyzer

string - The analyzer for the query string query

default_operator or defaultOperator

'AND' | 'OR' - The default operator for query string query (AND or OR)
Default: OR

df

string - The default field for query string query (default: _all)

stored_fields or storedFields

string | string[] - A comma-separated list of stored fields to return in the response

lenient

boolean - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

preference

string - Specify the node or shard the operation should be performed on (default: random)

q

string - Query in the Lucene query string syntax

routing

string - Specific routing value

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

body

object - The query definition using the Query DSL

features.getFeatures

edit
client.features.getFeatures({
  master_timeout: string
})

Documentation

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

features.resetFeatures

edit

Stability: experimental

client.features.resetFeatures()

Documentation

fieldCaps

edit
client.fieldCaps({
  index: string | string[],
  fields: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  include_unmapped: boolean,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

fields

string | string[] - A comma-separated list of field names

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

include_unmapped or includeUnmapped

boolean - Indicates whether unmapped fields should be included in the response.

body

object - An index filter specified with the Query DSL

fleet.globalCheckpoints

edit
client.fleet.globalCheckpoints({
  index: string,
  wait_for_advance: boolean,
  wait_for_index: boolean,
  checkpoints: string | string[],
  timeout: string
})

Documentation

index

string - The name of the index.

wait_for_advance or waitForAdvance

boolean - Whether to wait for the global checkpoint to advance past the specified current checkpoints
Default: false

wait_for_index or waitForIndex

boolean - Whether to wait for the target index to exist and all primary shards be active
Default: false

checkpoints

string | string[] - Comma separated list of checkpoints

timeout

string - Timeout to wait for global checkpoint to advance
Default: 30s

fleet.msearch

edit

Stability: experimental

client.fleet.msearch({
  index: string,
  body: object
})

index

string - The index name to use as the default

body

object - The request definitions (metadata-fleet search request definition pairs), separated by newlines

fleet.search

edit

Stability: experimental

client.fleet.search({
  index: string,
  wait_for_checkpoints: string | string[],
  wait_for_checkpoints_timeout: string,
  allow_partial_search_results: boolean,
  body: object
})

index

string - The index name to search.

wait_for_checkpoints or waitForCheckpoints

string | string[] - Comma separated list of checkpoints, one per shard

wait_for_checkpoints_timeout or waitForCheckpointsTimeout

string - Explicit wait_for_checkpoints timeout

allow_partial_search_results or allowPartialSearchResults

boolean - Indicate if an error should be returned if there is a partial search failure or timeout
Default: true

body

object - The search definition using the Query DSL

get

edit
client.get({
  id: string,
  index: string,
  type: string,
  stored_fields: string | string[],
  preference: string,
  realtime: boolean,
  refresh: boolean,
  routing: string,
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  version: number,
  version_type: 'internal' | 'external' | 'external_gte' | 'force'
})

Documentation
Code Example

id

string - The document ID

index

string - The name of the index

type

string - The type of the document (use _all to fetch the first document matching the ID across all types)

WARNING: This parameter has been deprecated.

stored_fields or storedFields

string | string[] - A comma-separated list of stored fields to return in the response

preference

string - Specify the node or shard the operation should be performed on (default: random)

realtime

boolean - Specify whether to perform the operation in realtime or search mode

refresh

boolean - Refresh the shard containing the document before performing the operation

routing

string - Specific routing value

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' | 'force' - Specific version type

getScript

edit
client.getScript({
  id: string,
  master_timeout: string
})

Documentation

id

string - Script ID

master_timeout or masterTimeout

string - Specify timeout for connection to master

getScriptContext

edit
client.getScriptContext()

Documentation

getScriptLanguages

edit
client.getScriptLanguages()

Documentation

getSource

edit
client.getSource({
  id: string,
  index: string,
  type: string,
  preference: string,
  realtime: boolean,
  refresh: boolean,
  routing: string,
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  version: number,
  version_type: 'internal' | 'external' | 'external_gte' | 'force'
})

Documentation

id

string - The document ID

index

string - The name of the index

type

string - The type of the document; deprecated and optional starting with 7.0

WARNING: This parameter has been deprecated.

preference

string - Specify the node or shard the operation should be performed on (default: random)

realtime

boolean - Specify whether to perform the operation in realtime or search mode

refresh

boolean - Refresh the shard containing the document before performing the operation

routing

string - Specific routing value

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' | 'force' - Specific version type

graph.explore

edit
client.graph.explore({
  index: string | string[],
  type: string | string[],
  routing: string,
  timeout: string,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

type

string | string[] - A comma-separated list of document types to search; leave empty to perform the operation on all types

WARNING: This parameter has been deprecated.

routing

string - Specific routing value

timeout

string - Explicit operation timeout

body

object - Graph Query DSL

ilm.deleteLifecycle

edit
client.ilm.deleteLifecycle({
  policy: string
})

Documentation

policy

string - The name of the index lifecycle policy

ilm.explainLifecycle

edit
client.ilm.explainLifecycle({
  index: string,
  only_managed: boolean,
  only_errors: boolean
})

Documentation

index

string - The name of the index to explain

only_managed or onlyManaged

boolean - filters the indices included in the response to ones managed by ILM

only_errors or onlyErrors

boolean - filters the indices included in the response to ones in an ILM error state, implies only_managed

ilm.getLifecycle

edit
client.ilm.getLifecycle({
  policy: string
})

Documentation

policy

string - The name of the index lifecycle policy

ilm.getStatus

edit
client.ilm.getStatus()

Documentation

ilm.migrateToDataTiers

edit
client.ilm.migrateToDataTiers({
  dry_run: boolean,
  body: object
})

Documentation

dry_run or dryRun

boolean - If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false

body

object - Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data")

ilm.moveToStep

edit
client.ilm.moveToStep({
  index: string,
  body: object
})

Documentation

index

string - The name of the index whose lifecycle step is to change

body

object - The new lifecycle step to move to

ilm.putLifecycle

edit
client.ilm.putLifecycle({
  policy: string,
  body: object
})

Documentation

policy

string - The name of the index lifecycle policy

body

object - The lifecycle policy definition to register

ilm.removePolicy

edit
client.ilm.removePolicy({
  index: string
})

Documentation

index

string - The name of the index to remove policy on

ilm.retry

edit
client.ilm.retry({
  index: string
})

Documentation

index

string - The name of the indices (comma-separated) whose failed lifecycle step is to be retry

ilm.start

edit
client.ilm.start()

Documentation

ilm.stop

edit
client.ilm.stop()

Documentation

index

edit
client.index({
  id: string,
  index: string,
  type: string,
  wait_for_active_shards: string,
  op_type: 'index' | 'create',
  refresh: 'true' | 'false' | 'wait_for',
  routing: string,
  timeout: string,
  version: number,
  version_type: 'internal' | 'external' | 'external_gte',
  if_seq_no: number,
  if_primary_term: number,
  pipeline: string,
  require_alias: boolean,
  body: object
})

Documentation

id

string - Document ID

index

string - The name of the index

type

string - The type of the document

WARNING: This parameter has been deprecated.

wait_for_active_shards or waitForActiveShards

string - 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 or opType

'index' | 'create' - Explicit operation type. Defaults to index for requests with an explicit document ID, and to `create`for requests without an explicit document ID

refresh

'true' | 'false' | 'wait_for' - 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

string - Specific routing value

timeout

string - Explicit operation timeout

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' - Specific version type

if_seq_no or ifSeqNo

number - only perform the index operation if the last operation that has changed the document has the specified sequence number

if_primary_term or ifPrimaryTerm

number - only perform the index operation if the last operation that has changed the document has the specified primary term

pipeline

string - The pipeline id to preprocess incoming documents with

require_alias or requireAlias

boolean - When true, requires destination to be an alias. Default is false

body

object - The document

indices.addBlock

edit
client.indices.addBlock({
  index: string | string[],
  block: string,
  timeout: string,
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma separated list of indices to add a block to

block

string - The block to add (one of read, write, read_only or metadata)

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.analyze

edit
client.indices.analyze({
  index: string,
  body: object
})

Documentation

index

string - The name of the index to scope the operation

body

object - Define analyzer/tokenizer parameters and the text on which the analysis should be performed

indices.clearCache

edit
client.indices.clearCache({
  index: string | string[],
  fielddata: boolean,
  fields: string | string[],
  query: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  request: boolean
})

Documentation

index

string | string[] - A comma-separated list of index name to limit the operation

fielddata

boolean - Clear field data

fields

string | string[] - A comma-separated list of fields to clear when using the fielddata parameter (default: all)

query

boolean - Clear query caches

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

request

boolean - Clear request cache

indices.clone

edit
client.indices.clone({
  index: string,
  target: string,
  timeout: string,
  master_timeout: string,
  wait_for_active_shards: string,
  body: object
})

Documentation

index

string - The name of the source index to clone

target

string - The name of the target index to clone into

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

wait_for_active_shards or waitForActiveShards

string - Set the number of active shards to wait for on the cloned index before the operation returns.

body

object - The configuration for the target index (settings and aliases)

indices.close

edit
client.indices.close({
  index: string | string[],
  timeout: string,
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  wait_for_active_shards: string
})

Documentation

index

string | string[] - A comma separated list of indices to close

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

wait_for_active_shards or waitForActiveShards

string - Sets the number of active shards to wait for before the operation returns. Set to index-setting to wait according to the index setting index.write.wait_for_active_shards, or all to wait for all shards, or an integer. Defaults to 0.

indices.create

edit
client.indices.create({
  index: string,
  include_type_name: boolean,
  wait_for_active_shards: string,
  timeout: string,
  master_timeout: string,
  body: object
})

Documentation

index

string - The name of the index

include_type_name or includeTypeName

boolean - Whether a type should be expected in the body of the mappings.

wait_for_active_shards or waitForActiveShards

string - Set the number of active shards to wait for before the operation returns.

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - The configuration for the index (settings and mappings)

indices.createDataStream

edit
client.indices.createDataStream({
  name: string
})

Documentation

name

string - The name of the data stream

indices.dataStreamsStats

edit
client.indices.dataStreamsStats({
  name: string | string[]
})

Documentation

name

string | string[] - A comma-separated list of data stream names; use _all or empty string to perform the operation on all data streams

indices.delete

edit
client.indices.delete({
  index: string | string[],
  timeout: string,
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of indices to delete; use _all or * string to delete all indices

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Ignore unavailable indexes (default: false)

allow_no_indices or allowNoIndices

boolean - Ignore if a wildcard expression resolves to no concrete indices (default: false)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether wildcard expressions should get expanded to open, closed, or hidden indices
Default: open,closed

indices.deleteAlias

edit
client.indices.deleteAlias({
  index: string | string[],
  name: string | string[],
  timeout: string,
  master_timeout: string
})

Documentation

index

string | string[] - A comma-separated list of index names (supports wildcards); use _all for all indices

name

string | string[] - A comma-separated list of aliases to delete (supports wildcards); use _all to delete all aliases for the specified indices.

timeout

string - Explicit timestamp for the document

master_timeout or masterTimeout

string - Specify timeout for connection to master

indices.deleteDataStream

edit
client.indices.deleteDataStream({
  name: string | string[],
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

name

string | string[] - A comma-separated list of data streams to delete; use * to delete all data streams

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether wildcard expressions should get expanded to open or closed indices (default: open)
Default: open

indices.deleteIndexTemplate

edit
client.indices.deleteIndexTemplate({
  name: string,
  timeout: string,
  master_timeout: string
})

Documentation

name

string - The name of the template

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

indices.deleteTemplate

edit
client.indices.deleteTemplate({
  name: string,
  timeout: string,
  master_timeout: string
})

Documentation

name

string - The name of the template

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

indices.diskUsage

edit

Stability: experimental

client.indices.diskUsage({
  index: string,
  run_expensive_tasks: boolean,
  flush: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string - Comma-separated list of indices or data streams to analyze the disk usage

run_expensive_tasks or runExpensiveTasks

boolean - Must be set to [true] in order for the task to be performed. Defaults to false.

flush

boolean - Whether flush or not before analyzing the index disk usage. Defaults to true

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.exists

edit
client.indices.exists({
  index: string | string[],
  local: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  flat_settings: boolean,
  include_defaults: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names

local

boolean - Return local information, do not retrieve the state from master node (default: false)

ignore_unavailable or ignoreUnavailable

boolean - Ignore unavailable indexes (default: false)

allow_no_indices or allowNoIndices

boolean - Ignore if a wildcard expression resolves to no concrete indices (default: false)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether wildcard expressions should get expanded to open or closed indices (default: open)
Default: open

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

include_defaults or includeDefaults

boolean - Whether to return all default setting for each of the indices.

indices.existsAlias

edit
client.indices.existsAlias({
  name: string | string[],
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  local: boolean
})

Documentation

name

string | string[] - A comma-separated list of alias names to return

index

string | string[] - A comma-separated list of index names to filter aliases

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: all

local

boolean - Return local information, do not retrieve the state from master node (default: false)

indices.existsIndexTemplate

edit
client.indices.existsIndexTemplate({
  name: string,
  flat_settings: boolean,
  master_timeout: string,
  local: boolean
})

Documentation

name

string - The name of the template

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

local

boolean - Return local information, do not retrieve the state from master node (default: false)

indices.existsTemplate

edit
client.indices.existsTemplate({
  name: string | string[],
  flat_settings: boolean,
  master_timeout: string,
  local: boolean
})

Documentation

name

string | string[] - The comma separated names of the index templates

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

local

boolean - Return local information, do not retrieve the state from master node (default: false)

indices.existsType

edit
client.indices.existsType({
  index: string | string[],
  type: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  local: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all to check the types across all indices

type

string | string[] - A comma-separated list of document types to check

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

local

boolean - Return local information, do not retrieve the state from master node (default: false)

indices.fieldUsageStats

edit

Stability: experimental

client.indices.fieldUsageStats({
  index: string,
  fields: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

fields

string | string[] - A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards)

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.flush

edit
client.indices.flush({
  index: string | string[],
  force: boolean,
  wait_if_ongoing: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string for all indices

force

boolean - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)

wait_if_ongoing or waitIfOngoing

boolean - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.flushSynced

edit
client.indices.flushSynced({
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string for all indices

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.forcemerge

edit
client.indices.forcemerge({
  index: string | string[],
  flush: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  max_num_segments: number,
  only_expunge_deletes: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

flush

boolean - Specify whether the index should be flushed after performing the operation (default: true)

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

max_num_segments or maxNumSegments

number - The number of segments the index should be merged into (default: dynamic)

only_expunge_deletes or onlyExpungeDeletes

boolean - Specify whether the operation should only expunge deleted documents

indices.freeze

edit
client.indices.freeze({
  index: string,
  timeout: string,
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  wait_for_active_shards: string
})

Documentation

index

string - The name of the index to freeze

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: closed

wait_for_active_shards or waitForActiveShards

string - Sets the number of active shards to wait for before the operation returns.

indices.get

edit
client.indices.get({
  index: string | string[],
  include_type_name: boolean,
  local: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  flat_settings: boolean,
  include_defaults: boolean,
  master_timeout: string
})

Documentation

index

string | string[] - A comma-separated list of index names

include_type_name or includeTypeName

boolean - Whether to add the type name to the response (default: false)

local

boolean - Return local information, do not retrieve the state from master node (default: false)

ignore_unavailable or ignoreUnavailable

boolean - Ignore unavailable indexes (default: false)

allow_no_indices or allowNoIndices

boolean - Ignore if a wildcard expression resolves to no concrete indices (default: false)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether wildcard expressions should get expanded to open or closed indices (default: open)
Default: open

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

include_defaults or includeDefaults

boolean - Whether to return all default setting for each of the indices.

master_timeout or masterTimeout

string - Specify timeout for connection to master

indices.getAlias

edit
client.indices.getAlias({
  name: string | string[],
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  local: boolean
})

Documentation

name

string | string[] - A comma-separated list of alias names to return

index

string | string[] - A comma-separated list of index names to filter aliases

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: all

local

boolean - Return local information, do not retrieve the state from master node (default: false)

indices.getDataStream

edit
client.indices.getDataStream({
  name: string | string[],
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

name

string | string[] - A comma-separated list of data streams to get; use * to get all data streams

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether wildcard expressions should get expanded to open or closed indices (default: open)
Default: open

indices.getFieldMapping

edit
client.indices.getFieldMapping({
  fields: string | string[],
  index: string | string[],
  type: string | string[],
  include_type_name: boolean,
  include_defaults: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  local: boolean
})

Documentation

fields

string | string[] - A comma-separated list of fields

index

string | string[] - A comma-separated list of index names

type

string | string[] - A comma-separated list of document types

WARNING: This parameter has been deprecated.

include_type_name or includeTypeName

boolean - Whether a type should be returned in the body of the mappings.

include_defaults or includeDefaults

boolean - Whether the default mapping values should be returned as well

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

local

boolean - Return local information, do not retrieve the state from master node (default: false)

indices.getIndexTemplate

edit
client.indices.getIndexTemplate({
  name: string,
  flat_settings: boolean,
  master_timeout: string,
  local: boolean
})

Documentation

name

string - A pattern that returned template names must match

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

local

boolean - Return local information, do not retrieve the state from master node (default: false)

indices.getMapping

edit
client.indices.getMapping({
  index: string | string[],
  type: string | string[],
  include_type_name: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  master_timeout: string,
  local: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names

type

string | string[] - A comma-separated list of document types

WARNING: This parameter has been deprecated.

include_type_name or includeTypeName

boolean - Whether to add the type name to the response (default: false)

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

master_timeout or masterTimeout

string - Specify timeout for connection to master

local

boolean - Return local information, do not retrieve the state from master node (default: false)

WARNING: This parameter has been deprecated.

indices.getSettings

edit
client.indices.getSettings({
  index: string | string[],
  name: string | string[],
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  flat_settings: boolean,
  local: boolean,
  include_defaults: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

name

string | string[] - The name of the settings that should be included

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: all

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

local

boolean - Return local information, do not retrieve the state from master node (default: false)

include_defaults or includeDefaults

boolean - Whether to return all default setting for each of the indices.

indices.getTemplate

edit
client.indices.getTemplate({
  name: string | string[],
  include_type_name: boolean,
  flat_settings: boolean,
  master_timeout: string,
  local: boolean
})

Documentation

name

string | string[] - The comma separated names of the index templates

include_type_name or includeTypeName

boolean - Whether a type should be returned in the body of the mappings.

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

local

boolean - Return local information, do not retrieve the state from master node (default: false)

indices.getUpgrade

edit
client.indices.getUpgrade({
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.migrateToDataStream

edit
client.indices.migrateToDataStream({
  name: string
})

Documentation

name

string - The name of the alias to migrate

indices.modifyDataStream

edit
client.indices.modifyDataStream({
  body: object
})

Documentation

body

object - The data stream modifications

indices.open

edit
client.indices.open({
  index: string | string[],
  timeout: string,
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  wait_for_active_shards: string
})

Documentation

index

string | string[] - A comma separated list of indices to open

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: closed

wait_for_active_shards or waitForActiveShards

string - Sets the number of active shards to wait for before the operation returns.

indices.promoteDataStream

edit
client.indices.promoteDataStream({
  name: string
})

Documentation

name

string - The name of the data stream

indices.putAlias

edit
client.indices.putAlias({
  index: string | string[],
  name: string,
  timeout: string,
  master_timeout: string,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names the alias should point to (supports wildcards); use _all to perform the operation on all indices.

name

string - The name of the alias to be created or updated

timeout

string - Explicit timestamp for the document

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - The settings for the alias, such as routing or filter

indices.putIndexTemplate

edit
client.indices.putIndexTemplate({
  name: string,
  create: boolean,
  cause: string,
  master_timeout: string,
  body: object
})

Documentation

name

string - The name of the template

create

boolean - Whether the index template should only be added if new or can also replace an existing one

cause

string - User defined reason for creating/updating the index template

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - The template definition

indices.putMapping

edit
client.indices.putMapping({
  index: string | string[],
  type: string,
  include_type_name: boolean,
  timeout: string,
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  write_index_only: boolean,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names the mapping should be added to (supports wildcards); use _all or omit to add the mapping on all indices.

type

string - The name of the document type

WARNING: This parameter has been deprecated.

include_type_name or includeTypeName

boolean - Whether a type should be expected in the body of the mappings.

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

write_index_only or writeIndexOnly

boolean - When true, applies mappings only to the write index of an alias or data stream

body

object - The mapping definition

indices.putSettings

edit
client.indices.putSettings({
  index: string | string[],
  master_timeout: string,
  timeout: string,
  preserve_existing: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  flat_settings: boolean,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

master_timeout or masterTimeout

string - Specify timeout for connection to master

timeout

string - Explicit operation timeout

preserve_existing or preserveExisting

boolean - Whether to update existing settings. If set to true existing settings on an index remain unchanged, the default is false

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

body

object - The index settings to be updated

indices.putTemplate

edit
client.indices.putTemplate({
  name: string,
  include_type_name: boolean,
  order: number,
  create: boolean,
  master_timeout: string,
  body: object
})

Documentation

name

string - The name of the template

include_type_name or includeTypeName

boolean - Whether a type should be returned in the body of the mappings.

order

number - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)

create

boolean - Whether the index template should only be added if new or can also replace an existing one

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - The template definition

indices.recovery

edit
client.indices.recovery({
  index: string | string[],
  detailed: boolean,
  active_only: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

detailed

boolean - Whether to display detailed information about shard recovery

active_only or activeOnly

boolean - Display only those recoveries that are currently on-going

indices.refresh

edit
client.indices.refresh({
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.reloadSearchAnalyzers

edit
client.indices.reloadSearchAnalyzers({
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names to reload analyzers for

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.resolveIndex

edit
client.indices.resolveIndex({
  name: string | string[],
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

name

string | string[] - A comma-separated list of names or wildcard expressions

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether wildcard expressions should get expanded to open or closed indices (default: open)
Default: open

indices.rollover

edit
client.indices.rollover({
  alias: string,
  new_index: string,
  include_type_name: boolean,
  timeout: string,
  dry_run: boolean,
  master_timeout: string,
  wait_for_active_shards: string,
  body: object
})

Documentation

alias

string - The name of the alias to rollover

new_index or newIndex

string - The name of the rollover index

include_type_name or includeTypeName

boolean - Whether a type should be included in the body of the mappings.

timeout

string - Explicit operation timeout

dry_run or dryRun

boolean - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false

master_timeout or masterTimeout

string - Specify timeout for connection to master

wait_for_active_shards or waitForActiveShards

string - Set the number of active shards to wait for on the newly created rollover index before the operation returns.

body

object - The conditions that needs to be met for executing rollover

indices.segments

edit
client.indices.segments({
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  verbose: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

verbose

boolean - Includes detailed memory usage by Lucene.

indices.shardStores

edit
client.indices.shardStores({
  index: string | string[],
  status: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

status

string | string[] - A comma-separated list of statuses used to filter on shards to get store information for

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

indices.shrink

edit
client.indices.shrink({
  index: string,
  target: string,
  copy_settings: boolean,
  timeout: string,
  master_timeout: string,
  wait_for_active_shards: string,
  body: object
})

Documentation

index

string - The name of the source index to shrink

target

string - The name of the target index to shrink into

copy_settings or copySettings

boolean - whether or not to copy settings from the source index (defaults to false)

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

wait_for_active_shards or waitForActiveShards

string - Set the number of active shards to wait for on the shrunken index before the operation returns.

body

object - The configuration for the target index (settings and aliases)

indices.simulateIndexTemplate

edit
client.indices.simulateIndexTemplate({
  name: string,
  create: boolean,
  cause: string,
  master_timeout: string,
  body: object
})

Documentation

name

string - The name of the index (it must be a concrete index name)

create

boolean - Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one

cause

string - User defined reason for dry-run creating the new template for simulation purposes

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - New index template definition, which will be included in the simulation, as if it already exists in the system

indices.simulateTemplate

edit
client.indices.simulateTemplate({
  name: string,
  create: boolean,
  cause: string,
  master_timeout: string,
  body: object
})

Documentation

name

string - The name of the index template

create

boolean - Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one

cause

string - User defined reason for dry-run creating the new template for simulation purposes

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - New index template definition to be simulated, if no index template name is specified

indices.split

edit
client.indices.split({
  index: string,
  target: string,
  copy_settings: boolean,
  timeout: string,
  master_timeout: string,
  wait_for_active_shards: string,
  body: object
})

Documentation

index

string - The name of the source index to split

target

string - The name of the target index to split into

copy_settings or copySettings

boolean - whether or not to copy settings from the source index (defaults to false)

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

wait_for_active_shards or waitForActiveShards

string - Set the number of active shards to wait for on the shrunken index before the operation returns.

body

object - The configuration for the target index (settings and aliases)

indices.stats

edit
client.indices.stats({
  metric: string | string[],
  index: string | string[],
  completion_fields: string | string[],
  fielddata_fields: string | string[],
  fields: string | string[],
  groups: string | string[],
  level: 'cluster' | 'indices' | 'shards',
  types: string | string[],
  include_segment_file_sizes: boolean,
  include_unloaded_segments: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  forbid_closed_indices: boolean
})

Documentation

metric

string | string[] - Limit the information returned the specific metrics.

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

completion_fields or completionFields

string | string[] - A comma-separated list of fields for fielddata and suggest index metric (supports wildcards)

fielddata_fields or fielddataFields

string | string[] - A comma-separated list of fields for fielddata index metric (supports wildcards)

fields

string | string[] - A comma-separated list of fields for fielddata and completion index metric (supports wildcards)

groups

string | string[] - A comma-separated list of search groups for search index metric

level

'cluster' | 'indices' | 'shards' - Return stats aggregated at cluster, index or shard level
Default: indices

types

string | string[] - A comma-separated list of document types for the indexing index metric

include_segment_file_sizes or includeSegmentFileSizes

boolean - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)

include_unloaded_segments or includeUnloadedSegments

boolean - If set to true segment stats will include stats for segments that are not currently loaded into memory

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

forbid_closed_indices or forbidClosedIndices

boolean - If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices
Default: true

indices.unfreeze

edit
client.indices.unfreeze({
  index: string,
  timeout: string,
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  wait_for_active_shards: string
})

Documentation

index

string - The name of the index to unfreeze

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: closed

wait_for_active_shards or waitForActiveShards

string - Sets the number of active shards to wait for before the operation returns.

indices.updateAliases

edit
client.indices.updateAliases({
  timeout: string,
  master_timeout: string,
  body: object
})

Documentation

timeout

string - Request timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - The definition of actions to perform

indices.upgrade

edit
client.indices.upgrade({
  index: string | string[],
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  ignore_unavailable: boolean,
  wait_for_completion: boolean,
  only_ancient_segments: boolean
})

Documentation

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

wait_for_completion or waitForCompletion

boolean - Specify whether the request should block until the all segments are upgraded (default: false)

only_ancient_segments or onlyAncientSegments

boolean - If true, only ancient (an older Lucene major release) segments will be upgraded

indices.validateQuery

edit
client.indices.validateQuery({
  index: string | string[],
  type: string | string[],
  explain: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  q: string,
  analyzer: string,
  analyze_wildcard: boolean,
  default_operator: 'AND' | 'OR',
  df: string,
  lenient: boolean,
  rewrite: boolean,
  all_shards: boolean,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names to restrict the operation; use _all or empty string to perform the operation on all indices

type

string | string[] - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types

WARNING: This parameter has been deprecated.

explain

boolean - Return detailed information about the error

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

q

string - Query in the Lucene query string syntax

analyzer

string - The analyzer to use for the query string

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcard and prefix queries should be analyzed (default: false)

default_operator or defaultOperator

'AND' | 'OR' - The default operator for query string query (AND or OR)
Default: OR

df

string - The field to use as default where no field prefix is given in the query string

lenient

boolean - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

rewrite

boolean - Provide a more detailed explanation showing the actual Lucene query that will be executed.

all_shards or allShards

boolean - Execute validation on all shards instead of one random shard per index

body

object - The query definition specified with the Query DSL

info

edit
client.info()

Documentation

ingest.deletePipeline

edit
client.ingest.deletePipeline({
  id: string,
  master_timeout: string,
  timeout: string
})

Documentation

id

string - Pipeline ID

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

ingest.geoIpStats

edit
client.ingest.geoIpStats()

Documentation

ingest.getPipeline

edit
client.ingest.getPipeline({
  id: string,
  summary: boolean,
  master_timeout: string
})

Documentation

id

string - Comma separated list of pipeline ids. Wildcards supported

summary

boolean - Return pipelines without their definitions (default: false)

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

ingest.processorGrok

edit
client.ingest.processorGrok()

Documentation

ingest.putPipeline

edit
client.ingest.putPipeline({
  id: string,
  if_version: number,
  master_timeout: string,
  timeout: string,
  body: object
})

Documentation

id

string - Pipeline ID

if_version or ifVersion

number - Required version for optimistic concurrency control for pipeline updates

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

body

object - The ingest definition

ingest.simulate

edit
client.ingest.simulate({
  id: string,
  verbose: boolean,
  body: object
})

Documentation

id

string - Pipeline ID

verbose

boolean - Verbose mode. Display data output for each processor in executed pipeline

body

object - The simulate definition

license.delete

edit
client.license.delete()

Documentation

license.get

edit
client.license.get({
  local: boolean,
  accept_enterprise: boolean
})

Documentation

local

boolean - Return local information, do not retrieve the state from master node (default: false)

accept_enterprise or acceptEnterprise

boolean - If the active license is an enterprise license, return type as enterprise (default: false)

license.getBasicStatus

edit
client.license.getBasicStatus()

Documentation

license.getTrialStatus

edit
client.license.getTrialStatus()

Documentation

license.post

edit
client.license.post({
  acknowledge: boolean,
  body: object
})

Documentation

acknowledge

boolean - whether the user has acknowledged acknowledge messages (default: false)

body

object - licenses to be installed

license.postStartBasic

edit
client.license.postStartBasic({
  acknowledge: boolean
})

Documentation

acknowledge

boolean - whether the user has acknowledged acknowledge messages (default: false)

license.postStartTrial

edit
client.license.postStartTrial({
  type: string,
  acknowledge: boolean
})

Documentation

type

string - The type of trial license to generate (default: "trial")

acknowledge

boolean - whether the user has acknowledged acknowledge messages (default: false)

logstash.deletePipeline

edit
client.logstash.deletePipeline({
  id: string
})

Documentation

id

string - The ID of the Pipeline

logstash.getPipeline

edit
client.logstash.getPipeline({
  id: string
})

Documentation

id

string - A comma-separated list of Pipeline IDs

logstash.putPipeline

edit
client.logstash.putPipeline({
  id: string,
  body: object
})

Documentation

id

string - The ID of the Pipeline

body

object - The Pipeline to add or update

mget

edit
client.mget({
  index: string,
  type: string,
  stored_fields: string | string[],
  preference: string,
  realtime: boolean,
  refresh: boolean,
  routing: string,
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  body: object
})

Documentation

index

string - The name of the index

type

string - The type of the document

WARNING: This parameter has been deprecated.

stored_fields or storedFields

string | string[] - A comma-separated list of stored fields to return in the response

preference

string - Specify the node or shard the operation should be performed on (default: random)

realtime

boolean - Specify whether to perform the operation in realtime or search mode

refresh

boolean - Refresh the shard containing the document before performing the operation

routing

string - Specific routing value

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

body

object - Document identifiers; can be either docs (containing full document information) or ids (when index and type is provided in the URL.

migration.deprecations

edit
client.migration.deprecations({
  index: string
})

Documentation

index

string - Index pattern

migration.getFeatureUpgradeStatus

edit
client.migration.getFeatureUpgradeStatus()

Documentation

migration.postFeatureUpgrade

edit
client.migration.postFeatureUpgrade()

Documentation

ml.closeJob

edit
client.ml.closeJob({
  job_id: string,
  allow_no_match: boolean,
  allow_no_jobs: boolean,
  force: boolean,
  timeout: string,
  body: object
})

Documentation

job_id or jobId

string - The name of the job to close

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

allow_no_jobs or allowNoJobs

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

WARNING: This parameter has been deprecated.

force

boolean - True if the job should be forcefully closed

timeout

string - Controls the time to wait until a job has closed. Default to 30 minutes

body

object - The URL params optionally sent in the body

ml.deleteCalendar

edit
client.ml.deleteCalendar({
  calendar_id: string
})

Documentation

calendar_id or calendarId

string - The ID of the calendar to delete

ml.deleteCalendarEvent

edit
client.ml.deleteCalendarEvent({
  calendar_id: string,
  event_id: string
})

Documentation

calendar_id or calendarId

string - The ID of the calendar to modify

event_id or eventId

string - The ID of the event to remove from the calendar

ml.deleteCalendarJob

edit
client.ml.deleteCalendarJob({
  calendar_id: string,
  job_id: string
})

Documentation

calendar_id or calendarId

string - The ID of the calendar to modify

job_id or jobId

string - The ID of the job to remove from the calendar

ml.deleteDataFrameAnalytics

edit
client.ml.deleteDataFrameAnalytics({
  id: string,
  force: boolean,
  timeout: string
})

Documentation

id

string - The ID of the data frame analytics to delete

force

boolean - True if the job should be forcefully deleted

timeout

string - Controls the time to wait until a job is deleted. Defaults to 1 minute

ml.deleteDatafeed

edit
client.ml.deleteDatafeed({
  datafeed_id: string,
  force: boolean
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeed to delete

force

boolean - True if the datafeed should be forcefully deleted

ml.deleteExpiredData

edit
client.ml.deleteExpiredData({
  job_id: string,
  requests_per_second: number,
  timeout: string,
  body: object
})

Documentation

job_id or jobId

string - The ID of the job(s) to perform expired data hygiene for

requests_per_second or requestsPerSecond

number - The desired requests per second for the deletion processes.

timeout

string - How long can the underlying delete processes run until they are canceled

body

object - deleting expired data parameters

ml.deleteFilter

edit
client.ml.deleteFilter({
  filter_id: string
})

Documentation

filter_id or filterId

string - The ID of the filter to delete

ml.deleteForecast

edit
client.ml.deleteForecast({
  job_id: string,
  forecast_id: string,
  allow_no_forecasts: boolean,
  timeout: string
})

Documentation

job_id or jobId

string - The ID of the job from which to delete forecasts

forecast_id or forecastId

string - The ID of the forecast to delete, can be comma delimited list. Leaving blank implies _all

allow_no_forecasts or allowNoForecasts

boolean - Whether to ignore if _all matches no forecasts

timeout

string - Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds

ml.deleteJob

edit
client.ml.deleteJob({
  job_id: string,
  force: boolean,
  wait_for_completion: boolean
})

Documentation

job_id or jobId

string - The ID of the job to delete

force

boolean - True if the job should be forcefully deleted

wait_for_completion or waitForCompletion

boolean - Should this request wait until the operation has completed before returning
Default: true

ml.deleteModelSnapshot

edit
client.ml.deleteModelSnapshot({
  job_id: string,
  snapshot_id: string
})

Documentation

job_id or jobId

string - The ID of the job to fetch

snapshot_id or snapshotId

string - The ID of the snapshot to delete

ml.deleteTrainedModel

edit
client.ml.deleteTrainedModel({
  model_id: string
})

Documentation

model_id or modelId

string - The ID of the trained model to delete

ml.deleteTrainedModelAlias

edit
client.ml.deleteTrainedModelAlias({
  model_alias: string,
  model_id: string
})

Documentation

model_alias or modelAlias

string - The trained model alias to delete

model_id or modelId

string - The trained model where the model alias is assigned

ml.estimateModelMemory

edit
client.ml.estimateModelMemory({
  body: object
})

Documentation

body

object - The analysis config, plus cardinality estimates for fields it references

ml.evaluateDataFrame

edit
client.ml.evaluateDataFrame({
  body: object
})

Documentation

body

object - The evaluation definition

ml.explainDataFrameAnalytics

edit
client.ml.explainDataFrameAnalytics({
  id: string,
  body: object
})

Documentation

id

string - The ID of the data frame analytics to explain

body

object - The data frame analytics config to explain

ml.findFileStructure

edit

Stability: experimental

client.ml.findFileStructure({
  lines_to_sample: number,
  line_merge_size_limit: number,
  timeout: string,
  charset: string,
  format: 'ndjson' | 'xml' | 'delimited' | 'semi_structured_text',
  has_header_row: boolean,
  column_names: string | string[],
  delimiter: string,
  quote: string,
  should_trim_fields: boolean,
  grok_pattern: string,
  timestamp_field: string,
  timestamp_format: string,
  explain: boolean,
  body: object
})

Documentation

lines_to_sample or linesToSample

number - How many lines of the file should be included in the analysis
Default: 1000

line_merge_size_limit or lineMergeSizeLimit

number - Maximum number of characters permitted in a single message when lines are merged to create messages.
Default: 10000

timeout

string - Timeout after which the analysis will be aborted
Default: 25s

charset

string - Optional parameter to specify the character set of the file

format

'ndjson' | 'xml' | 'delimited' | 'semi_structured_text' - Optional parameter to specify the high level file format

has_header_row or hasHeaderRow

boolean - Optional parameter to specify whether a delimited file includes the column names in its first row

column_names or columnNames

string | string[] - Optional parameter containing a comma separated list of the column names for a delimited file

delimiter

string - Optional parameter to specify the delimiter character for a delimited file - must be a single character

quote

string - Optional parameter to specify the quote character for a delimited file - must be a single character

should_trim_fields or shouldTrimFields

boolean - Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them

grok_pattern or grokPattern

string - Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file

timestamp_field or timestampField

string - Optional parameter to specify the timestamp field in the file

timestamp_format or timestampFormat

string - Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format

explain

boolean - Whether to include a commentary on how the structure was derived

body

object - The contents of the file to be analyzed

ml.flushJob

edit
client.ml.flushJob({
  job_id: string,
  calc_interim: boolean,
  start: string,
  end: string,
  advance_time: string,
  skip_time: string,
  body: object
})

Documentation

job_id or jobId

string - The name of the job to flush

calc_interim or calcInterim

boolean - Calculates interim results for the most recent bucket or all buckets within the latency period

start

string - When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results

end

string - When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results

advance_time or advanceTime

string - Advances time to the given value generating results and updating the model for the advanced interval

skip_time or skipTime

string - Skips time to the given value without generating results or updating the model for the skipped interval

body

object - Flush parameters

ml.forecast

edit
client.ml.forecast({
  job_id: string,
  duration: string,
  expires_in: string,
  max_model_memory: string,
  body: object
})

Documentation

job_id or jobId

string - The ID of the job to forecast for

duration

string - The duration of the forecast

expires_in or expiresIn

string - The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity.

max_model_memory or maxModelMemory

string - The max memory able to be used by the forecast. Default is 20mb.

body

object - Query parameters can be specified in the body

ml.getBuckets

edit
client.ml.getBuckets({
  job_id: string,
  timestamp: string,
  expand: boolean,
  exclude_interim: boolean,
  from: number,
  size: number,
  start: string,
  end: string,
  anomaly_score: number,
  sort: string,
  desc: boolean,
  body: object
})

Documentation

job_id or jobId

string - ID of the job to get bucket results from

timestamp

string - The timestamp of the desired single bucket result

expand

boolean - Include anomaly records

exclude_interim or excludeInterim

boolean - Exclude interim results

from

number - skips a number of buckets

size

number - specifies a max number of buckets to get

start

string - Start time filter for buckets

end

string - End time filter for buckets

anomaly_score or anomalyScore

number - Filter for the most anomalous buckets

sort

string - Sort buckets by a particular field

desc

boolean - Set the sort direction

body

object - Bucket selection details if not provided in URI

ml.getCalendarEvents

edit
client.ml.getCalendarEvents({
  calendar_id: string,
  job_id: string,
  start: string,
  end: string,
  from: number,
  size: number
})

Documentation

calendar_id or calendarId

string - The ID of the calendar containing the events

job_id or jobId

string - Get events for the job. When this option is used calendar_id must be _all

start

string - Get events after this time

end

string - Get events before this time

from

number - Skips a number of events

size

number - Specifies a max number of events to get

ml.getCalendars

edit
client.ml.getCalendars({
  calendar_id: string,
  from: number,
  size: number,
  body: object
})

Documentation

calendar_id or calendarId

string - The ID of the calendar to fetch

from

number - skips a number of calendars

size

number - specifies a max number of calendars to get

body

object - The from and size parameters optionally sent in the body

ml.getCategories

edit
client.ml.getCategories({
  job_id: string,
  category_id: number,
  from: number,
  size: number,
  partition_field_value: string,
  body: object
})

Documentation

job_id or jobId

string - The name of the job

category_id or categoryId

number - The identifier of the category definition of interest

from

number - skips a number of categories

size

number - specifies a max number of categories to get

partition_field_value or partitionFieldValue

string - Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled.

body

object - Category selection details if not provided in URI

ml.getDataFrameAnalytics

edit
client.ml.getDataFrameAnalytics({
  id: string,
  allow_no_match: boolean,
  from: number,
  size: number,
  exclude_generated: boolean
})

Documentation

id

string - The ID of the data frame analytics to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no data frame analytics. (This includes _all string or when no data frame analytics have been specified)
Default: true

from

number - skips a number of analytics

size

number - specifies a max number of analytics to get
Default: 100

exclude_generated or excludeGenerated

boolean - Omits fields that are illegal to set on data frame analytics PUT

ml.getDataFrameAnalyticsStats

edit
client.ml.getDataFrameAnalyticsStats({
  id: string,
  allow_no_match: boolean,
  from: number,
  size: number,
  verbose: boolean
})

Documentation

id

string - The ID of the data frame analytics stats to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no data frame analytics. (This includes _all string or when no data frame analytics have been specified)
Default: true

from

number - skips a number of analytics

size

number - specifies a max number of analytics to get
Default: 100

verbose

boolean - whether the stats response should be verbose

ml.getDatafeedStats

edit
client.ml.getDatafeedStats({
  datafeed_id: string,
  allow_no_match: boolean,
  allow_no_datafeeds: boolean
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeeds stats to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no datafeeds. (This includes _all string or when no datafeeds have been specified)

allow_no_datafeeds or allowNoDatafeeds

boolean - Whether to ignore if a wildcard expression matches no datafeeds. (This includes _all string or when no datafeeds have been specified)

WARNING: This parameter has been deprecated.

ml.getDatafeeds

edit
client.ml.getDatafeeds({
  datafeed_id: string,
  allow_no_match: boolean,
  allow_no_datafeeds: boolean,
  exclude_generated: boolean
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeeds to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no datafeeds. (This includes _all string or when no datafeeds have been specified)

allow_no_datafeeds or allowNoDatafeeds

boolean - Whether to ignore if a wildcard expression matches no datafeeds. (This includes _all string or when no datafeeds have been specified)

WARNING: This parameter has been deprecated.

exclude_generated or excludeGenerated

boolean - Omits fields that are illegal to set on datafeed PUT

ml.getFilters

edit
client.ml.getFilters({
  filter_id: string,
  from: number,
  size: number
})

Documentation

filter_id or filterId

string - The ID of the filter to fetch

from

number - skips a number of filters

size

number - specifies a max number of filters to get

ml.getInfluencers

edit
client.ml.getInfluencers({
  job_id: string,
  exclude_interim: boolean,
  from: number,
  size: number,
  start: string,
  end: string,
  influencer_score: number,
  sort: string,
  desc: boolean,
  body: object
})

Documentation

job_id or jobId

string - Identifier for the anomaly detection job

exclude_interim or excludeInterim

boolean - Exclude interim results

from

number - skips a number of influencers

size

number - specifies a max number of influencers to get

start

string - start timestamp for the requested influencers

end

string - end timestamp for the requested influencers

influencer_score or influencerScore

number - influencer score threshold for the requested influencers

sort

string - sort field for the requested influencers

desc

boolean - whether the results should be sorted in decending order

body

object - Influencer selection criteria

ml.getJobStats

edit
client.ml.getJobStats({
  job_id: string,
  allow_no_match: boolean,
  allow_no_jobs: boolean
})

Documentation

job_id or jobId

string - The ID of the jobs stats to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

allow_no_jobs or allowNoJobs

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

WARNING: This parameter has been deprecated.

ml.getJobs

edit
client.ml.getJobs({
  job_id: string,
  allow_no_match: boolean,
  allow_no_jobs: boolean,
  exclude_generated: boolean
})

Documentation

job_id or jobId

string - The ID of the jobs to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

allow_no_jobs or allowNoJobs

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

WARNING: This parameter has been deprecated.

exclude_generated or excludeGenerated

boolean - Omits fields that are illegal to set on job PUT

ml.getModelSnapshotUpgradeStats

edit
client.ml.getModelSnapshotUpgradeStats({
  job_id: string,
  snapshot_id: string,
  allow_no_match: boolean
})

Documentation

job_id or jobId

string - The ID of the job. May be a wildcard, comma separated list or _all.

snapshot_id or snapshotId

string - The ID of the snapshot. May be a wildcard, comma separated list or _all.

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no jobs or no snapshots. (This includes the _all string.)

ml.getModelSnapshots

edit
client.ml.getModelSnapshots({
  job_id: string,
  snapshot_id: string,
  from: number,
  size: number,
  start: string,
  end: string,
  sort: string,
  desc: boolean,
  body: object
})

Documentation

job_id or jobId

string - The ID of the job to fetch

snapshot_id or snapshotId

string - The ID of the snapshot to fetch

from

number - Skips a number of documents

size

number - The default number of documents returned in queries as a string.

start

string - The filter start query parameter

end

string - The filter end query parameter

sort

string - Name of the field to sort on

desc

boolean - True if the results should be sorted in descending order

body

object - Model snapshot selection criteria

ml.getOverallBuckets

edit
client.ml.getOverallBuckets({
  job_id: string,
  top_n: number,
  bucket_span: string,
  overall_score: number,
  exclude_interim: boolean,
  start: string,
  end: string,
  allow_no_match: boolean,
  allow_no_jobs: boolean,
  body: object
})

Documentation

job_id or jobId

string - The job IDs for which to calculate overall bucket results

top_n or topN

number - The number of top job bucket scores to be used in the overall_score calculation

bucket_span or bucketSpan

string - The span of the overall buckets. Defaults to the longest job bucket_span

overall_score or overallScore

number - Returns overall buckets with overall scores higher than this value

exclude_interim or excludeInterim

boolean - If true overall buckets that include interim buckets will be excluded

start

string - Returns overall buckets with timestamps after this time

end

string - Returns overall buckets with timestamps earlier than this time

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

allow_no_jobs or allowNoJobs

boolean - Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

WARNING: This parameter has been deprecated.

body

object - Overall bucket selection details if not provided in URI

ml.getRecords

edit
client.ml.getRecords({
  job_id: string,
  exclude_interim: boolean,
  from: number,
  size: number,
  start: string,
  end: string,
  record_score: number,
  sort: string,
  desc: boolean,
  body: object
})

Documentation

job_id or jobId

string - The ID of the job

exclude_interim or excludeInterim

boolean - Exclude interim results

from

number - skips a number of records

size

number - specifies a max number of records to get

start

string - Start time filter for records

end

string - End time filter for records

record_score or recordScore

number - Returns records with anomaly scores greater or equal than this value

sort

string - Sort records by a particular field

desc

boolean - Set the sort direction

body

object - Record selection criteria

ml.getTrainedModels

edit
client.ml.getTrainedModels({
  model_id: string,
  allow_no_match: boolean,
  include: string,
  include_model_definition: boolean,
  decompress_definition: boolean,
  from: number,
  size: number,
  tags: string | string[],
  exclude_generated: boolean
})

Documentation

model_id or modelId

string - The ID of the trained models to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no trained models. (This includes _all string or when no trained models have been specified)
Default: true

include

string - A comma-separate list of fields to optionally include. Valid options are definition and total_feature_importance. Default is none.

include_model_definition or includeModelDefinition

boolean - Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false.

WARNING: This parameter has been deprecated.

decompress_definition or decompressDefinition

boolean - Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true.
Default: true

from

number - skips a number of trained models

size

number - specifies a max number of trained models to get
Default: 100

tags

string | string[] - A comma-separated list of tags that the model must have.

exclude_generated or excludeGenerated

boolean - Omits fields that are illegal to set on model PUT

ml.getTrainedModelsStats

edit
client.ml.getTrainedModelsStats({
  model_id: string,
  allow_no_match: boolean,
  from: number,
  size: number
})

Documentation

model_id or modelId

string - The ID of the trained models stats to fetch

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no trained models. (This includes _all string or when no trained models have been specified)
Default: true

from

number - skips a number of trained models

size

number - specifies a max number of trained models to get
Default: 100

ml.info

edit
client.ml.info()

Documentation

ml.openJob

edit
client.ml.openJob({
  job_id: string,
  body: object
})

Documentation

job_id or jobId

string - The ID of the job to open

body

object - Query parameters can be specified in the body

ml.postCalendarEvents

edit
client.ml.postCalendarEvents({
  calendar_id: string,
  body: object
})

Documentation

calendar_id or calendarId

string - The ID of the calendar to modify

body

object - A list of events

ml.postData

edit
client.ml.postData({
  job_id: string,
  reset_start: string,
  reset_end: string,
  body: object
})

Documentation

job_id or jobId

string - The name of the job receiving the data

reset_start or resetStart

string - Optional parameter to specify the start of the bucket resetting range

reset_end or resetEnd

string - Optional parameter to specify the end of the bucket resetting range

body

object - The data to process

ml.previewDataFrameAnalytics

edit
client.ml.previewDataFrameAnalytics({
  id: string,
  body: object
})

Documentation

id

string - The ID of the data frame analytics to preview

body

object - The data frame analytics config to preview

ml.previewDatafeed

edit
client.ml.previewDatafeed({
  datafeed_id: string,
  body: object
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeed to preview

body

object - The datafeed config and job config with which to execute the preview

ml.putCalendar

edit
client.ml.putCalendar({
  calendar_id: string,
  body: object
})

Documentation

calendar_id or calendarId

string - The ID of the calendar to create

body

object - The calendar details

ml.putCalendarJob

edit
client.ml.putCalendarJob({
  calendar_id: string,
  job_id: string
})

Documentation

calendar_id or calendarId

string - The ID of the calendar to modify

job_id or jobId

string - The ID of the job to add to the calendar

ml.putDataFrameAnalytics

edit
client.ml.putDataFrameAnalytics({
  id: string,
  body: object
})

Documentation

id

string - The ID of the data frame analytics to create

body

object - The data frame analytics configuration

ml.putDatafeed

edit
client.ml.putDatafeed({
  datafeed_id: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  ignore_throttled: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  body: object
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeed to create

ignore_unavailable or ignoreUnavailable

boolean - Ignore unavailable indexes (default: false)

allow_no_indices or allowNoIndices

boolean - Ignore if the source indices expressions resolves to no concrete indices (default: true)

ignore_throttled or ignoreThrottled

boolean - Ignore indices that are marked as throttled (default: true)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether source index expressions should get expanded to open or closed indices (default: open)

body

object - The datafeed config

ml.putFilter

edit
client.ml.putFilter({
  filter_id: string,
  body: object
})

Documentation

filter_id or filterId

string - The ID of the filter to create

body

object - The filter details

ml.putJob

edit
client.ml.putJob({
  job_id: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  ignore_throttled: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  body: object
})

Documentation

job_id or jobId

string - The ID of the job to create

ignore_unavailable or ignoreUnavailable

boolean - Ignore unavailable indexes (default: false). Only set if datafeed_config is provided.

allow_no_indices or allowNoIndices

boolean - Ignore if the source indices expressions resolves to no concrete indices (default: true). Only set if datafeed_config is provided.

ignore_throttled or ignoreThrottled

boolean - Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided.

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided.

body

object - The job

ml.putTrainedModel

edit
client.ml.putTrainedModel({
  model_id: string,
  defer_definition_decompression: boolean,
  body: object
})

Documentation

model_id or modelId

string - The ID of the trained models to store

defer_definition_decompression or deferDefinitionDecompression

boolean - If set to true and a compressed_definition is provided, the request defers definition decompression and skips relevant validations.

body

object - The trained model configuration

ml.putTrainedModelAlias

edit
client.ml.putTrainedModelAlias({
  model_alias: string,
  model_id: string,
  reassign: boolean
})

Documentation

model_alias or modelAlias

string - The trained model alias to update

model_id or modelId

string - The trained model where the model alias should be assigned

reassign

boolean - If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false.

ml.resetJob

edit
client.ml.resetJob({
  job_id: string,
  wait_for_completion: boolean
})

Documentation

job_id or jobId

string - The ID of the job to reset

wait_for_completion or waitForCompletion

boolean - Should this request wait until the operation has completed before returning
Default: true

ml.revertModelSnapshot

edit
client.ml.revertModelSnapshot({
  job_id: string,
  snapshot_id: string,
  delete_intervening_results: boolean,
  body: object
})

Documentation

job_id or jobId

string - The ID of the job to fetch

snapshot_id or snapshotId

string - The ID of the snapshot to revert to

delete_intervening_results or deleteInterveningResults

boolean - Should we reset the results back to the time of the snapshot?

body

object - Reversion options

ml.setUpgradeMode

edit
client.ml.setUpgradeMode({
  enabled: boolean,
  timeout: string
})

Documentation

enabled

boolean - Whether to enable upgrade_mode ML setting or not. Defaults to false.

timeout

string - Controls the time to wait before action times out. Defaults to 30 seconds

ml.startDataFrameAnalytics

edit
client.ml.startDataFrameAnalytics({
  id: string,
  timeout: string,
  body: object
})

Documentation

id

string - The ID of the data frame analytics to start

timeout

string - Controls the time to wait until the task has started. Defaults to 20 seconds

body

object - The start data frame analytics parameters

ml.startDatafeed

edit
client.ml.startDatafeed({
  datafeed_id: string,
  start: string,
  end: string,
  timeout: string,
  body: object
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeed to start

start

string - The start time from where the datafeed should begin

end

string - The end time when the datafeed should stop. When not set, the datafeed continues in real time

timeout

string - Controls the time to wait until a datafeed has started. Default to 20 seconds

body

object - The start datafeed parameters

ml.stopDataFrameAnalytics

edit
client.ml.stopDataFrameAnalytics({
  id: string,
  allow_no_match: boolean,
  force: boolean,
  timeout: string,
  body: object
})

Documentation

id

string - The ID of the data frame analytics to stop

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no data frame analytics. (This includes _all string or when no data frame analytics have been specified)

force

boolean - True if the data frame analytics should be forcefully stopped

timeout

string - Controls the time to wait until the task has stopped. Defaults to 20 seconds

body

object - The stop data frame analytics parameters

ml.stopDatafeed

edit
client.ml.stopDatafeed({
  datafeed_id: string,
  allow_no_match: boolean,
  allow_no_datafeeds: boolean,
  force: boolean,
  timeout: string,
  body: object
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeed to stop

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no datafeeds. (This includes _all string or when no datafeeds have been specified)

allow_no_datafeeds or allowNoDatafeeds

boolean - Whether to ignore if a wildcard expression matches no datafeeds. (This includes _all string or when no datafeeds have been specified)

WARNING: This parameter has been deprecated.

force

boolean - True if the datafeed should be forcefully stopped.

timeout

string - Controls the time to wait until a datafeed has stopped. Default to 20 seconds

body

object - The URL params optionally sent in the body

ml.updateDataFrameAnalytics

edit
client.ml.updateDataFrameAnalytics({
  id: string,
  body: object
})

Documentation

id

string - The ID of the data frame analytics to update

body

object - The data frame analytics settings to update

ml.updateDatafeed

edit
client.ml.updateDatafeed({
  datafeed_id: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  ignore_throttled: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  body: object
})

Documentation

datafeed_id or datafeedId

string - The ID of the datafeed to update

ignore_unavailable or ignoreUnavailable

boolean - Ignore unavailable indexes (default: false)

allow_no_indices or allowNoIndices

boolean - Ignore if the source indices expressions resolves to no concrete indices (default: true)

ignore_throttled or ignoreThrottled

boolean - Ignore indices that are marked as throttled (default: true)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether source index expressions should get expanded to open or closed indices (default: open)

body

object - The datafeed update settings

ml.updateFilter

edit
client.ml.updateFilter({
  filter_id: string,
  body: object
})

Documentation

filter_id or filterId

string - The ID of the filter to update

body

object - The filter update

ml.updateJob

edit
client.ml.updateJob({
  job_id: string,
  body: object
})

Documentation

job_id or jobId

string - The ID of the job to create

body

object - The job update settings

ml.updateModelSnapshot

edit
client.ml.updateModelSnapshot({
  job_id: string,
  snapshot_id: string,
  body: object
})

Documentation

job_id or jobId

string - The ID of the job to fetch

snapshot_id or snapshotId

string - The ID of the snapshot to update

body

object - The model snapshot properties to update

ml.upgradeJobSnapshot

edit
client.ml.upgradeJobSnapshot({
  job_id: string,
  snapshot_id: string,
  timeout: string,
  wait_for_completion: boolean
})

Documentation

job_id or jobId

string - The ID of the job

snapshot_id or snapshotId

string - The ID of the snapshot

timeout

string - How long should the API wait for the job to be opened and the old snapshot to be loaded.

wait_for_completion or waitForCompletion

boolean - Should the request wait until the task is complete before responding to the caller. Default is false.

ml.validate

edit
client.ml.validate({
  body: object
})

Documentation

body

object - The job config

ml.validateDetector

edit
client.ml.validateDetector({
  body: object
})

Documentation

body

object - The detector

monitoring.bulk

edit
client.monitoring.bulk({
  type: string,
  system_id: string,
  system_api_version: string,
  interval: string,
  body: object
})

Documentation

type

string - Default document type for items which don’t provide one

WARNING: This parameter has been deprecated.

system_id or systemId

string - Identifier of the monitored system

system_api_version or systemApiVersion

string - API Version of the monitored system

interval

string - Collection interval (e.g., 10s or 10000ms) of the payload

body

object - The operation definition and data (action-data pairs), separated by newlines

msearch

edit
client.msearch({
  index: string | string[],
  type: string | string[],
  search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
  max_concurrent_searches: number,
  typed_keys: boolean,
  pre_filter_shard_size: number,
  max_concurrent_shard_requests: number,
  rest_total_hits_as_int: boolean,
  ccs_minimize_roundtrips: boolean,
  body: object
})

Documentation
Code Example

index

string | string[] - A comma-separated list of index names to use as default

type

string | string[] - A comma-separated list of document types to use as default

search_type or searchType

'query_then_fetch' | 'dfs_query_then_fetch' - Search operation type

max_concurrent_searches or maxConcurrentSearches

number - Controls the maximum number of concurrent searches the multi search api will execute

typed_keys or typedKeys

boolean - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

pre_filter_shard_size or preFilterShardSize

number - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.

max_concurrent_shard_requests or maxConcurrentShardRequests

number - The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
Default: 5

rest_total_hits_as_int or restTotalHitsAsInt

boolean - Indicates whether hits.total should be rendered as an integer or an object in the rest search response

ccs_minimize_roundtrips or ccsMinimizeRoundtrips

boolean - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
Default: true

body

object - The request definitions (metadata-search request definition pairs), separated by newlines

msearchTemplate

edit
client.msearchTemplate({
  index: string | string[],
  type: string | string[],
  search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
  typed_keys: boolean,
  max_concurrent_searches: number,
  rest_total_hits_as_int: boolean,
  ccs_minimize_roundtrips: boolean,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names to use as default

type

string | string[] - A comma-separated list of document types to use as default

search_type or searchType

'query_then_fetch' | 'dfs_query_then_fetch' - Search operation type

typed_keys or typedKeys

boolean - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

max_concurrent_searches or maxConcurrentSearches

number - Controls the maximum number of concurrent searches the multi search api will execute

rest_total_hits_as_int or restTotalHitsAsInt

boolean - Indicates whether hits.total should be rendered as an integer or an object in the rest search response

ccs_minimize_roundtrips or ccsMinimizeRoundtrips

boolean - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
Default: true

body

object - The request definitions (metadata-search request definition pairs), separated by newlines

mtermvectors

edit
client.mtermvectors({
  index: string,
  type: string,
  ids: string | string[],
  term_statistics: boolean,
  field_statistics: boolean,
  fields: string | string[],
  offsets: boolean,
  positions: boolean,
  payloads: boolean,
  preference: string,
  routing: string,
  realtime: boolean,
  version: number,
  version_type: 'internal' | 'external' | 'external_gte' | 'force',
  body: object
})

Documentation

index

string - The index in which the document resides.

type

string - The type of the document.

ids

string | string[] - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body

term_statistics or termStatistics

boolean - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".

field_statistics or fieldStatistics

boolean - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
Default: true

fields

string | string[] - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".

offsets

boolean - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
Default: true

positions

boolean - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
Default: true

payloads

boolean - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
Default: true

preference

string - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".

routing

string - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".

realtime

boolean - Specifies if requests are real-time as opposed to near-real-time (default: true).

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' | 'force' - Specific version type

body

object - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.

nodes.clearRepositoriesMeteringArchive

edit

Stability: experimental

client.nodes.clearRepositoriesMeteringArchive({
  node_id: string | string[],
  max_archive_version: number
})

Documentation

node_id or nodeId

string | string[] - Comma-separated list of node IDs or names used to limit returned information.

max_archive_version or maxArchiveVersion

number - Specifies the maximum archive_version to be cleared from the archive.

nodes.getRepositoriesMeteringInfo

edit

Stability: experimental

client.nodes.getRepositoriesMeteringInfo({
  node_id: string | string[]
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs or names to limit the returned information.

nodes.hotThreads

edit
client.nodes.hotThreads({
  node_id: string | string[],
  interval: string,
  snapshots: number,
  threads: number,
  ignore_idle_threads: boolean,
  type: 'cpu' | 'wait' | 'block' | 'mem',
  sort: 'cpu' | 'total',
  timeout: string
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

interval

string - The interval for the second sampling of threads

snapshots

number - Number of samples of thread stacktrace (default: 10)

threads

number - Specify the number of threads to provide information for (default: 3)

ignore_idle_threads or ignoreIdleThreads

boolean - Don’t show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)

type

'cpu' | 'wait' | 'block' | 'mem' - The type to sample (default: cpu)

sort

'cpu' | 'total' - The sort order for cpu type (default: total)

timeout

string - Explicit operation timeout

nodes.info

edit
client.nodes.info({
  node_id: string | string[],
  metric: string | string[],
  flat_settings: boolean,
  timeout: string
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

metric

string | string[] - A comma-separated list of metrics you wish returned. Leave empty to return all metrics.

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

timeout

string - Explicit operation timeout

nodes.reloadSecureSettings

edit
client.nodes.reloadSecureSettings({
  node_id: string | string[],
  timeout: string,
  body: object
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.

timeout

string - Explicit operation timeout

body

object - An object containing the password for the elasticsearch keystore

nodes.stats

edit
client.nodes.stats({
  node_id: string | string[],
  metric: string | string[],
  index_metric: string | string[],
  completion_fields: string | string[],
  fielddata_fields: string | string[],
  fields: string | string[],
  groups: boolean,
  level: 'indices' | 'node' | 'shards',
  types: string | string[],
  timeout: string,
  include_segment_file_sizes: boolean,
  include_unloaded_segments: boolean
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

metric

string | string[] - Limit the information returned to the specified metrics

index_metric or indexMetric

string | string[] - Limit the information returned for indices metric to the specific index metrics. Isn’t used if indices (or all) metric isn’t specified.

completion_fields or completionFields

string | string[] - A comma-separated list of fields for fielddata and suggest index metric (supports wildcards)

fielddata_fields or fielddataFields

string | string[] - A comma-separated list of fields for fielddata index metric (supports wildcards)

fields

string | string[] - A comma-separated list of fields for fielddata and completion index metric (supports wildcards)

groups

boolean - A comma-separated list of search groups for search index metric

level

'indices' | 'node' | 'shards' - Return indices stats aggregated at index, node or shard level
Default: node

types

string | string[] - A comma-separated list of document types for the indexing index metric

timeout

string - Explicit operation timeout

include_segment_file_sizes or includeSegmentFileSizes

boolean - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)

include_unloaded_segments or includeUnloadedSegments

boolean - If set to true segment stats will include stats for segments that are not currently loaded into memory

nodes.usage

edit
client.nodes.usage({
  node_id: string | string[],
  metric: string | string[],
  timeout: string
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

metric

string | string[] - Limit the information returned to the specified metrics

timeout

string - Explicit operation timeout

openPointInTime

edit
client.openPointInTime({
  index: string | string[],
  preference: string,
  routing: string,
  ignore_unavailable: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  keep_alive: string
})

Documentation

index

string | string[] - A comma-separated list of index names to open point in time; use _all or empty string to perform the operation on all indices

preference

string - Specify the node or shard the operation should be performed on (default: random)

routing

string - Specific routing value

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

keep_alive or keepAlive

string - Specific the time to live for the point in time

ping

edit
client.ping()

Documentation

putScript

edit
client.putScript({
  id: string,
  context: string,
  timeout: string,
  master_timeout: string,
  body: object
})

Documentation

id

string - Script ID

context

string - Script context

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

body

object - The document

rankEval

edit
client.rankEval({
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

search_type or searchType

'query_then_fetch' | 'dfs_query_then_fetch' - Search operation type

body

object - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.

reindex

edit
client.reindex({
  refresh: boolean,
  timeout: string,
  wait_for_active_shards: string,
  wait_for_completion: boolean,
  requests_per_second: number,
  scroll: string,
  slices: number|string,
  max_docs: number,
  body: object
})

Documentation
Code Example

refresh

boolean - Should the affected indexes be refreshed?

timeout

string - Time each individual bulk request should wait for shards that are unavailable.
Default: 1m

wait_for_active_shards or waitForActiveShards

string - Sets the number of shard copies that must be active before proceeding with the reindex 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)

wait_for_completion or waitForCompletion

boolean - Should the request should block until the reindex is complete.
Default: true

requests_per_second or requestsPerSecond

number - The throttle to set on this request in sub-requests per second. -1 means no throttle.

scroll

string - Control how long to keep the search context alive
Default: 5m

slices

number|string - The number of slices this task should be divided into. Defaults to 1, meaning the task isn’t sliced into subtasks. Can be set to auto.
Default: 1

max_docs or maxDocs

number - Maximum number of documents to process (default: all documents)

body

object - The search definition using the Query DSL and the prototype for the index request.

reindexRethrottle

edit
client.reindexRethrottle({
  task_id: string,
  requests_per_second: number
})

Documentation

task_id or taskId

string - The task id to rethrottle

requests_per_second or requestsPerSecond

number - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.

renderSearchTemplate

edit
client.renderSearchTemplate({
  id: string,
  body: object
})

Documentation

id

string - The id of the stored search template

body

object - The search definition template and its params

rollup.deleteJob

edit

Stability: experimental

client.rollup.deleteJob({
  id: string
})

Documentation

id

string - The ID of the job to delete

rollup.getJobs

edit

Stability: experimental

client.rollup.getJobs({
  id: string
})

Documentation

id

string - The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs

rollup.getRollupCaps

edit

Stability: experimental

client.rollup.getRollupCaps({
  id: string
})

Documentation

id

string - The ID of the index to check rollup capabilities on, or left blank for all jobs

rollup.getRollupIndexCaps

edit

Stability: experimental

client.rollup.getRollupIndexCaps({
  index: string
})

Documentation

index

string - The rollup index or index pattern to obtain rollup capabilities from.

rollup.putJob

edit

Stability: experimental

client.rollup.putJob({
  id: string,
  body: object
})

Documentation

id

string - The ID of the job to create

body

object - The job configuration

rollup.rollup

edit

Stability: experimental

client.rollup.rollup({
  index: string,
  rollup_index: string,
  body: object
})

Documentation

index

string - The index to roll up

rollup_index or rollupIndex

string - The name of the rollup index to create

body

object - The rollup configuration

rollup.rollupSearch

edit

Stability: experimental

client.rollup.rollupSearch({
  index: string | string[],
  type: string,
  typed_keys: boolean,
  rest_total_hits_as_int: boolean,
  body: object
})

Documentation

index

string | string[] - The indices or index-pattern(s) (containing rollup or regular data) that should be searched

type

string - The doc type inside the index

WARNING: This parameter has been deprecated.

typed_keys or typedKeys

boolean - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

rest_total_hits_as_int or restTotalHitsAsInt

boolean - Indicates whether hits.total should be rendered as an integer or an object in the rest search response

body

object - The search request body

rollup.startJob

edit

Stability: experimental

client.rollup.startJob({
  id: string
})

Documentation

id

string - The ID of the job to start

rollup.stopJob

edit

Stability: experimental

client.rollup.stopJob({
  id: string,
  wait_for_completion: boolean,
  timeout: string
})

Documentation

id

string - The ID of the job to stop

wait_for_completion or waitForCompletion

boolean - True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false.

timeout

string - Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s.

scriptsPainlessExecute

edit

Stability: experimental

client.scriptsPainlessExecute({
  body: object
})

Documentation

body

object - The script to execute

scroll

edit
client.scroll({
  scroll_id: string,
  scroll: string,
  rest_total_hits_as_int: boolean,
  body: object
})

Documentation
Code Example

scroll_id or scrollId

string - The scroll ID

WARNING: This parameter has been deprecated.

scroll

string - Specify how long a consistent view of the index should be maintained for scrolled search

rest_total_hits_as_int or restTotalHitsAsInt

boolean - Indicates whether hits.total should be rendered as an integer or an object in the rest search response

body

object - The scroll ID if not passed by URL or query parameter.

search

edit
client.search({
  index: string | string[],
  type: string | string[],
  analyzer: string,
  analyze_wildcard: boolean,
  ccs_minimize_roundtrips: boolean,
  default_operator: 'AND' | 'OR',
  df: string,
  explain: boolean,
  stored_fields: string | string[],
  docvalue_fields: string | string[],
  from: number,
  ignore_unavailable: boolean,
  ignore_throttled: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  lenient: boolean,
  preference: string,
  q: string,
  routing: string | string[],
  scroll: string,
  search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
  size: number,
  sort: string | string[],
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  terminate_after: number,
  stats: string | string[],
  suggest_field: string,
  suggest_mode: 'missing' | 'popular' | 'always',
  suggest_size: number,
  suggest_text: string,
  timeout: string,
  track_scores: boolean,
  track_total_hits: boolean,
  allow_partial_search_results: boolean,
  typed_keys: boolean,
  version: boolean,
  seq_no_primary_term: boolean,
  request_cache: boolean,
  batched_reduce_size: number,
  max_concurrent_shard_requests: number,
  pre_filter_shard_size: number,
  rest_total_hits_as_int: boolean,
  min_compatible_shard_node: string,
  body: object
})

Documentation
Code Example

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

type

string | string[] - A comma-separated list of document types to search; leave empty to perform the operation on all types

analyzer

string - The analyzer to use for the query string

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcard and prefix queries should be analyzed (default: false)

ccs_minimize_roundtrips or ccsMinimizeRoundtrips

boolean - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
Default: true

default_operator or defaultOperator

'AND' | 'OR' - The default operator for query string query (AND or OR)
Default: OR

df

string - The field to use as default where no field prefix is given in the query string

explain

boolean - Specify whether to return detailed information about score computation as part of a hit

stored_fields or storedFields

string | string[] - A comma-separated list of stored fields to return as part of a hit

docvalue_fields or docvalueFields

string | string[] - A comma-separated list of fields to return as the docvalue representation of a field for each hit

from

number - Starting offset (default: 0)

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

ignore_throttled or ignoreThrottled

boolean - Whether specified concrete, expanded or aliased indices should be ignored when throttled

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

lenient

boolean - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

preference

string - Specify the node or shard the operation should be performed on (default: random)

q

string - Query in the Lucene query string syntax

routing

string | string[] - A comma-separated list of specific routing values

scroll

string - Specify how long a consistent view of the index should be maintained for scrolled search

search_type or searchType

'query_then_fetch' | 'dfs_query_then_fetch' - Search operation type

size

number - Number of hits to return (default: 10)

sort

string | string[] - A comma-separated list of <field>:<direction> pairs

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

terminate_after or terminateAfter

number - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

stats

string | string[] - Specific tag of the request for logging and statistical purposes

suggest_field or suggestField

string - Specify which field to use for suggestions

suggest_mode or suggestMode

'missing' | 'popular' | 'always' - Specify suggest mode
Default: missing

suggest_size or suggestSize

number - How many suggestions to return in response

suggest_text or suggestText

string - The source text for which the suggestions should be returned

timeout

string - Explicit operation timeout

track_scores or trackScores

boolean - Whether to calculate and return scores even if they are not used for sorting

track_total_hits or trackTotalHits

boolean - Indicate if the number of documents that match the query should be tracked

allow_partial_search_results or allowPartialSearchResults

boolean - Indicate if an error should be returned if there is a partial search failure or timeout
Default: true

typed_keys or typedKeys

boolean - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

version

boolean - Specify whether to return document version as part of a hit

seq_no_primary_term or seqNoPrimaryTerm

boolean - Specify whether to return sequence number and primary term of the last modification of each hit

request_cache or requestCache

boolean - Specify if request cache should be used for this request or not, defaults to index level setting

batched_reduce_size or batchedReduceSize

number - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
Default: 512

max_concurrent_shard_requests or maxConcurrentShardRequests

number - The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
Default: 5

pre_filter_shard_size or preFilterShardSize

number - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.

rest_total_hits_as_int or restTotalHitsAsInt

boolean - Indicates whether hits.total should be rendered as an integer or an object in the rest search response

min_compatible_shard_node or minCompatibleShardNode

string - The minimum compatible version that all shards involved in search should have for this request to be successful

body

object - The search definition using the Query DSL

searchMvt

edit

Stability: experimental

client.searchMvt({
  index: string | string[],
  field: string,
  zoom: number,
  x: number,
  y: number,
  exact_bounds: boolean,
  extent: number,
  grid_precision: number,
  grid_type: 'grid' | 'point' | 'centroid',
  size: number,
  track_total_hits: boolean|long,
  body: object
})

Documentation

index

string | string[] - Comma-separated list of data streams, indices, or aliases to search

field

string - Field containing geospatial data to return

zoom

number - Zoom level for the vector tile to search

x

number - X coordinate for the vector tile to search

y

number - Y coordinate for the vector tile to search

exact_bounds or exactBounds

boolean - If false, the meta layer’s feature is the bounding box of the tile. If true, the meta layer’s feature is a bounding box resulting from a geo_bounds aggregation.

extent

number - Size, in pixels, of a side of the vector tile.
Default: 4096

grid_precision or gridPrecision

number - Additional zoom levels available through the aggs layer. Accepts 0-8.
Default: 8

grid_type or gridType

'grid' | 'point' | 'centroid' - Determines the geometry type for features in the aggs layer.
Default: grid

size

number - Maximum number of features to return in the hits layer. Accepts 0-10000.
Default: 10000

track_total_hits or trackTotalHits

boolean|long - Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.

body

object - Search request body.

searchShards

edit
client.searchShards({
  index: string | string[],
  preference: string,
  routing: string,
  local: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

preference

string - Specify the node or shard the operation should be performed on (default: random)

routing

string - Specific routing value

local

boolean - Return local information, do not retrieve the state from master node (default: false)

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

searchTemplate

edit
client.searchTemplate({
  index: string | string[],
  type: string | string[],
  ignore_unavailable: boolean,
  ignore_throttled: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  preference: string,
  routing: string | string[],
  scroll: string,
  search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
  explain: boolean,
  profile: boolean,
  typed_keys: boolean,
  rest_total_hits_as_int: boolean,
  ccs_minimize_roundtrips: boolean,
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

type

string | string[] - A comma-separated list of document types to search; leave empty to perform the operation on all types

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

ignore_throttled or ignoreThrottled

boolean - Whether specified concrete, expanded or aliased indices should be ignored when throttled

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

preference

string - Specify the node or shard the operation should be performed on (default: random)

routing

string | string[] - A comma-separated list of specific routing values

scroll

string - Specify how long a consistent view of the index should be maintained for scrolled search

search_type or searchType

'query_then_fetch' | 'dfs_query_then_fetch' - Search operation type

explain

boolean - Specify whether to return detailed information about score computation as part of a hit

profile

boolean - Specify whether to profile the query execution

typed_keys or typedKeys

boolean - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

rest_total_hits_as_int or restTotalHitsAsInt

boolean - Indicates whether hits.total should be rendered as an integer or an object in the rest search response

ccs_minimize_roundtrips or ccsMinimizeRoundtrips

boolean - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
Default: true

body

object - The search definition template and its params

searchableSnapshots.cacheStats

edit

Stability: experimental

client.searchableSnapshots.cacheStats({
  node_id: string | string[]
})

Documentation

node_id or nodeId

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

searchableSnapshots.clearCache

edit

Stability: experimental

client.searchableSnapshots.clearCache({
  index: string | string[],
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'none' | 'all'
})

Documentation

index

string | string[] - A comma-separated list of index names

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

searchableSnapshots.mount

edit
client.searchableSnapshots.mount({
  repository: string,
  snapshot: string,
  master_timeout: string,
  wait_for_completion: boolean,
  storage: string,
  body: object
})

Documentation

repository

string - The name of the repository containing the snapshot of the index to mount

snapshot

string - The name of the snapshot of the index to mount

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

wait_for_completion or waitForCompletion

boolean - Should this request wait until the operation has completed before returning

storage

string - Selects the kind of local storage used to accelerate searches. Experimental, and defaults to full_copy

body

object - The restore configuration for mounting the snapshot as searchable

searchableSnapshots.repositoryStats

edit

Stability: experimental

client.searchableSnapshots.repositoryStats({
  repository: string
})

Documentation

repository

string - The repository for which to get the stats for

searchableSnapshots.stats

edit
client.searchableSnapshots.stats({
  index: string | string[],
  level: 'cluster' | 'indices' | 'shards'
})

Documentation

index

string | string[] - A comma-separated list of index names

level

'cluster' | 'indices' | 'shards' - Return stats aggregated at cluster, index or shard level
Default: indices

security.authenticate

edit
client.security.authenticate()

Documentation

security.changePassword

edit
client.security.changePassword({
  username: string,
  refresh: 'true' | 'false' | 'wait_for',
  body: object
})

Documentation

username

string - The username of the user to change the password for

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

body

object - the new password for the user

security.clearApiKeyCache

edit
client.security.clearApiKeyCache({
  ids: string | string[]
})

Documentation

ids

string | string[] - A comma-separated list of IDs of API keys to clear from the cache

security.clearCachedPrivileges

edit
client.security.clearCachedPrivileges({
  application: string | string[]
})

Documentation

application

string | string[] - A comma-separated list of application names

security.clearCachedRealms

edit
client.security.clearCachedRealms({
  realms: string | string[],
  usernames: string | string[]
})

Documentation

realms

string | string[] - Comma-separated list of realms to clear

usernames

string | string[] - Comma-separated list of usernames to clear from the cache

security.clearCachedRoles

edit
client.security.clearCachedRoles({
  name: string | string[]
})

Documentation

name

string | string[] - Role name

security.clearCachedServiceTokens

edit
client.security.clearCachedServiceTokens({
  namespace: string,
  service: string,
  name: string | string[]
})

Documentation

namespace

string - An identifier for the namespace

service

string - An identifier for the service name

name

string | string[] - A comma-separated list of service token names

security.createApiKey

edit
client.security.createApiKey({
  refresh: 'true' | 'false' | 'wait_for',
  body: object
})

Documentation

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

body

object - The api key request to create an API key

security.createServiceToken

edit
client.security.createServiceToken({
  namespace: string,
  service: string,
  name: string,
  refresh: 'true' | 'false' | 'wait_for'
})

Documentation

namespace

string - An identifier for the namespace

service

string - An identifier for the service name

name

string - An identifier for the token name

refresh

'true' | 'false' | 'wait_for' - If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.

security.deletePrivileges

edit
client.security.deletePrivileges({
  application: string,
  name: string,
  refresh: 'true' | 'false' | 'wait_for'
})

Documentation

application

string - Application name

name

string - Privilege name

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

security.deleteRole

edit
client.security.deleteRole({
  name: string,
  refresh: 'true' | 'false' | 'wait_for'
})

Documentation

name

string - Role name

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

security.deleteRoleMapping

edit
client.security.deleteRoleMapping({
  name: string,
  refresh: 'true' | 'false' | 'wait_for'
})

Documentation

name

string - Role-mapping name

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

security.deleteServiceToken

edit
client.security.deleteServiceToken({
  namespace: string,
  service: string,
  name: string,
  refresh: 'true' | 'false' | 'wait_for'
})

Documentation

namespace

string - An identifier for the namespace

service

string - An identifier for the service name

name

string - An identifier for the token name

refresh

'true' | 'false' | 'wait_for' - If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.

security.deleteUser

edit
client.security.deleteUser({
  username: string,
  refresh: 'true' | 'false' | 'wait_for'
})

Documentation

username

string - username

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

security.disableUser

edit
client.security.disableUser({
  username: string,
  refresh: 'true' | 'false' | 'wait_for'
})

Documentation

username

string - The username of the user to disable

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

security.enableUser

edit
client.security.enableUser({
  username: string,
  refresh: 'true' | 'false' | 'wait_for'
})

Documentation

username

string - The username of the user to enable

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

security.getApiKey

edit
client.security.getApiKey({
  id: string,
  name: string,
  username: string,
  realm_name: string,
  owner: boolean
})

Documentation

id

string - API key id of the API key to be retrieved

name

string - API key name of the API key to be retrieved

username

string - user name of the user who created this API key to be retrieved

realm_name or realmName

string - realm name of the user who created this API key to be retrieved

owner

boolean - flag to query API keys owned by the currently authenticated user

security.getBuiltinPrivileges

edit
client.security.getBuiltinPrivileges()

Documentation

security.getPrivileges

edit
client.security.getPrivileges({
  application: string,
  name: string
})

Documentation

application

string - Application name

name

string - Privilege name

security.getRole

edit
client.security.getRole({
  name: string | string[]
})

Documentation

name

string | string[] - A comma-separated list of role names

security.getRoleMapping

edit
client.security.getRoleMapping({
  name: string | string[]
})

Documentation

name

string | string[] - A comma-separated list of role-mapping names

security.getServiceAccounts

edit
client.security.getServiceAccounts({
  namespace: string,
  service: string
})

Documentation

namespace

string - An identifier for the namespace

service

string - An identifier for the service name

security.getServiceCredentials

edit
client.security.getServiceCredentials({
  namespace: string,
  service: string
})

Documentation

namespace

string - An identifier for the namespace

service

string - An identifier for the service name

security.getToken

edit
client.security.getToken({
  body: object
})

Documentation

body

object - The token request to get

security.getUser

edit
client.security.getUser({
  username: string | string[]
})

Documentation

username

string | string[] - A comma-separated list of usernames

security.getUserPrivileges

edit
client.security.getUserPrivileges()

Documentation

security.grantApiKey

edit
client.security.grantApiKey({
  refresh: 'true' | 'false' | 'wait_for',
  body: object
})

Documentation

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

body

object - The api key request to create an API key

security.hasPrivileges

edit
client.security.hasPrivileges({
  user: string,
  body: object
})

Documentation

user

string - Username

body

object - The privileges to test

security.invalidateApiKey

edit
client.security.invalidateApiKey({
  body: object
})

Documentation

body

object - The api key request to invalidate API key(s)

security.invalidateToken

edit
client.security.invalidateToken({
  body: object
})

Documentation

body

object - The token to invalidate

security.putPrivileges

edit
client.security.putPrivileges({
  refresh: 'true' | 'false' | 'wait_for',
  body: object
})

Documentation

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

body

object - The privilege(s) to add

security.putRole

edit
client.security.putRole({
  name: string,
  refresh: 'true' | 'false' | 'wait_for',
  body: object
})

Documentation

name

string - Role name

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

body

object - The role to add

security.putRoleMapping

edit
client.security.putRoleMapping({
  name: string,
  refresh: 'true' | 'false' | 'wait_for',
  body: object
})

Documentation

name

string - Role-mapping name

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

body

object - The role mapping to add

security.putUser

edit
client.security.putUser({
  username: string,
  refresh: 'true' | 'false' | 'wait_for',
  body: object
})

Documentation

username

string - The username of the User

refresh

'true' | 'false' | 'wait_for' - If true (the default) 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 then do nothing with refreshes.

body

object - The user to add

security.queryApiKeys

edit
client.security.queryApiKeys({
  body: object
})

Documentation

body

object - From, size, query, sort and search_after

security.samlAuthenticate

edit
client.security.samlAuthenticate({
  body: object
})

Documentation

body

object - The SAML response to authenticate

security.samlCompleteLogout

edit
client.security.samlCompleteLogout({
  body: object
})

Documentation

body

object - The logout response to verify

security.samlInvalidate

edit
client.security.samlInvalidate({
  body: object
})

Documentation

body

object - The LogoutRequest message

security.samlLogout

edit
client.security.samlLogout({
  body: object
})

Documentation

body

object - The tokens to invalidate

security.samlPrepareAuthentication

edit
client.security.samlPrepareAuthentication({
  body: object
})

Documentation

body

object - The realm for which to create the authentication request, identified by either its name or the ACS URL

security.samlServiceProviderMetadata

edit
client.security.samlServiceProviderMetadata({
  realm_name: string
})

Documentation

realm_name or realmName

string - The name of the SAML realm to get the metadata for

shutdown.deleteNode

edit
client.shutdown.deleteNode({
  node_id: string
})

Documentation

node_id or nodeId

string - The node id of node to be removed from the shutdown state

shutdown.getNode

edit
client.shutdown.getNode({
  node_id: string
})

Documentation

node_id or nodeId

string - Which node for which to retrieve the shutdown status

shutdown.putNode

edit
client.shutdown.putNode({
  node_id: string,
  body: object
})

Documentation

node_id or nodeId

string - The node id of node to be shut down

body

object - The shutdown type definition to register

slm.deleteLifecycle

edit
client.slm.deleteLifecycle({
  policy_id: string
})

Documentation

policy_id or policyId

string - The id of the snapshot lifecycle policy to remove

slm.executeLifecycle

edit
client.slm.executeLifecycle({
  policy_id: string
})

Documentation

policy_id or policyId

string - The id of the snapshot lifecycle policy to be executed

slm.executeRetention

edit
client.slm.executeRetention()

Documentation

slm.getLifecycle

edit
client.slm.getLifecycle({
  policy_id: string | string[]
})

Documentation

policy_id or policyId

string | string[] - Comma-separated list of snapshot lifecycle policies to retrieve

slm.getStats

edit
client.slm.getStats()

Documentation

slm.getStatus

edit
client.slm.getStatus()

Documentation

slm.putLifecycle

edit
client.slm.putLifecycle({
  policy_id: string,
  body: object
})

Documentation

policy_id or policyId

string - The id of the snapshot lifecycle policy

body

object - The snapshot lifecycle policy definition to register

slm.start

edit
client.slm.start()

Documentation

slm.stop

edit
client.slm.stop()

Documentation

snapshot.cleanupRepository

edit
client.snapshot.cleanupRepository({
  repository: string,
  master_timeout: string,
  timeout: string
})

Documentation

repository

string - A repository name

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

snapshot.clone

edit
client.snapshot.clone({
  repository: string,
  snapshot: string,
  target_snapshot: string,
  master_timeout: string,
  body: object
})

Documentation

repository

string - A repository name

snapshot

string - The name of the snapshot to clone from

target_snapshot or targetSnapshot

string - The name of the cloned snapshot to create

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

body

object - The snapshot clone definition

snapshot.create

edit
client.snapshot.create({
  repository: string,
  snapshot: string,
  master_timeout: string,
  wait_for_completion: boolean,
  body: object
})

Documentation

repository

string - A repository name

snapshot

string - A snapshot name

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

wait_for_completion or waitForCompletion

boolean - Should this request wait until the operation has completed before returning

body

object - The snapshot definition

snapshot.createRepository

edit
client.snapshot.createRepository({
  repository: string,
  master_timeout: string,
  timeout: string,
  verify: boolean,
  body: object
})

Documentation

repository

string - A repository name

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

verify

boolean - Whether to verify the repository after creation

body

object - The repository definition

snapshot.delete

edit
client.snapshot.delete({
  repository: string,
  snapshot: string,
  master_timeout: string
})

Documentation

repository

string - A repository name

snapshot

string - A snapshot name

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

snapshot.deleteRepository

edit
client.snapshot.deleteRepository({
  repository: string | string[],
  master_timeout: string,
  timeout: string
})

Documentation

repository

string | string[] - Name of the snapshot repository to unregister. Wildcard (*) patterns are supported.

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

snapshot.get

edit
client.snapshot.get({
  repository: string,
  snapshot: string | string[],
  master_timeout: string,
  ignore_unavailable: boolean,
  index_details: boolean,
  include_repository: boolean,
  sort: 'start_time' | 'duration' | 'name' | 'repository' | 'index_count' | 'shard_count' | 'failed_shard_count',
  size: integer,
  order: 'asc' | 'desc',
  from_sort_value: string,
  after: string,
  offset: integer,
  slm_policy_filter: string,
  verbose: boolean
})

Documentation

repository

string - A repository name

snapshot

string | string[] - A comma-separated list of snapshot names

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

ignore_unavailable or ignoreUnavailable

boolean - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown

index_details or indexDetails

boolean - Whether to include details of each index in the snapshot, if those details are available. Defaults to false.

include_repository or includeRepository

boolean - Whether to include the repository name in the snapshot info. Defaults to true.

sort

'start_time' | 'duration' | 'name' | 'repository' | 'index_count' | 'shard_count' | 'failed_shard_count' - Allows setting a sort order for the result. Defaults to start_time
Default: start_time

size

integer - Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit.

order

'asc' | 'desc' - Sort order
Default: asc

from_sort_value or fromSortValue

string - Value of the current sort column at which to start retrieval.

after

string - Offset identifier to start pagination from as returned by the next field in the response body.

offset

integer - Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0

slm_policy_filter or slmPolicyFilter

string - Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern _none to match snapshots without an SLM policy

verbose

boolean - Whether to show verbose snapshot info or only show the basic info found in the repository index blob

snapshot.getRepository

edit
client.snapshot.getRepository({
  repository: string | string[],
  master_timeout: string,
  local: boolean
})

Documentation

repository

string | string[] - A comma-separated list of repository names

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

local

boolean - Return local information, do not retrieve the state from master node (default: false)

snapshot.repositoryAnalyze

edit
client.snapshot.repositoryAnalyze({
  repository: string,
  blob_count: number,
  concurrency: number,
  read_node_count: number,
  early_read_node_count: number,
  seed: number,
  rare_action_probability: number,
  max_blob_size: string,
  max_total_data_size: string,
  timeout: string,
  detailed: boolean,
  rarely_abort_writes: boolean
})

Documentation

repository

string - A repository name

blob_count or blobCount

number - Number of blobs to create during the test. Defaults to 100.

concurrency

number - Number of operations to run concurrently during the test. Defaults to 10.

read_node_count or readNodeCount

number - Number of nodes on which to read a blob after writing. Defaults to 10.

early_read_node_count or earlyReadNodeCount

number - Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the rare_action_probability parameter is also relevant. Defaults to 2.

seed

number - Seed for the random number generator used to create the test workload. Defaults to a random value.

rare_action_probability or rareActionProbability

number - Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02.

max_blob_size or maxBlobSize

string - Maximum size of a blob to create during the test, e.g 1gb or 100mb. Defaults to 10mb.

max_total_data_size or maxTotalDataSize

string - Maximum total size of all blobs to create during the test, e.g 1tb or 100gb. Defaults to 1gb.

timeout

string - Explicit operation timeout. Defaults to 30s.

detailed

boolean - Whether to return detailed results or a summary. Defaults to false so that only the summary is returned.

rarely_abort_writes or rarelyAbortWrites

boolean - Whether to rarely abort writes before they complete. Defaults to true.

snapshot.restore

edit
client.snapshot.restore({
  repository: string,
  snapshot: string,
  master_timeout: string,
  wait_for_completion: boolean,
  body: object
})

Documentation

repository

string - A repository name

snapshot

string - A snapshot name

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

wait_for_completion or waitForCompletion

boolean - Should this request wait until the operation has completed before returning

body

object - Details of what to restore

snapshot.status

edit
client.snapshot.status({
  repository: string,
  snapshot: string | string[],
  master_timeout: string,
  ignore_unavailable: boolean
})

Documentation

repository

string - A repository name

snapshot

string | string[] - A comma-separated list of snapshot names

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

ignore_unavailable or ignoreUnavailable

boolean - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown

snapshot.verifyRepository

edit
client.snapshot.verifyRepository({
  repository: string,
  master_timeout: string,
  timeout: string
})

Documentation

repository

string - A repository name

master_timeout or masterTimeout

string - Explicit operation timeout for connection to master node

timeout

string - Explicit operation timeout

sql.clearCursor

edit
client.sql.clearCursor({
  body: object
})

Documentation

body

object - Specify the cursor value in the cursor element to clean the cursor.

sql.deleteAsync

edit
client.sql.deleteAsync({
  id: string
})

Documentation

id

string - The async search ID

sql.getAsync

edit
client.sql.getAsync({
  id: string,
  delimiter: string,
  format: string,
  keep_alive: string,
  wait_for_completion_timeout: string
})

Documentation

id

string - The async search ID

delimiter

string - Separator for CSV results
Default: ,

format

string - Short version of the Accept header, e.g. json, yaml

keep_alive or keepAlive

string - Retention period for the search and its results
Default: 5d

wait_for_completion_timeout or waitForCompletionTimeout

string - Duration to wait for complete results

sql.getAsyncStatus

edit
client.sql.getAsyncStatus({
  id: string
})

Documentation

id

string - The async search ID

sql.query

edit
client.sql.query({
  format: string,
  body: object
})

Documentation
Code Example

format

string - a short version of the Accept header, e.g. json, yaml

body

object - Use the query element to start a query. Use the cursor element to continue a query.

sql.translate

edit
client.sql.translate({
  body: object
})

Documentation

body

object - Specify the query in the query element.

ssl.certificates

edit
client.ssl.certificates()

Documentation

tasks.cancel

edit

Stability: experimental

client.tasks.cancel({
  task_id: string,
  nodes: string | string[],
  actions: string | string[],
  parent_task_id: string,
  wait_for_completion: boolean
})

Documentation

task_id or taskId

string - Cancel the task with specified task id (node_id:task_number)

nodes

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

actions

string | string[] - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.

parent_task_id or parentTaskId

string - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.

wait_for_completion or waitForCompletion

boolean - Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false

tasks.get

edit

Stability: experimental

client.tasks.get({
  task_id: string,
  wait_for_completion: boolean,
  timeout: string
})

Documentation

task_id or taskId

string - Return the task with specified id (node_id:task_number)

wait_for_completion or waitForCompletion

boolean - Wait for the matching tasks to complete (default: false)

timeout

string - Explicit operation timeout

tasks.list

edit

Stability: experimental

client.tasks.list({
  nodes: string | string[],
  actions: string | string[],
  detailed: boolean,
  parent_task_id: string,
  wait_for_completion: boolean,
  group_by: 'nodes' | 'parents' | 'none',
  timeout: string
})

Documentation

nodes

string | string[] - A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

actions

string | string[] - A comma-separated list of actions that should be returned. Leave empty to return all.

detailed

boolean - Return detailed task information (default: false)

parent_task_id or parentTaskId

string - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.

wait_for_completion or waitForCompletion

boolean - Wait for the matching tasks to complete (default: false)

group_by or groupBy

'nodes' | 'parents' | 'none' - Group tasks by nodes or parent/child relationships
Default: nodes

timeout

string - Explicit operation timeout

termsEnum

edit
client.termsEnum({
  index: string | string[],
  body: object
})

Documentation

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

body

object - field name, string which is the prefix expected in matching terms, timeout and size for max number of results

termvectors

edit
client.termvectors({
  index: string,
  id: string,
  type: string,
  term_statistics: boolean,
  field_statistics: boolean,
  fields: string | string[],
  offsets: boolean,
  positions: boolean,
  payloads: boolean,
  preference: string,
  routing: string,
  realtime: boolean,
  version: number,
  version_type: 'internal' | 'external' | 'external_gte' | 'force',
  body: object
})

Documentation

index

string - The index in which the document resides.

id

string - The id of the document, when not specified a doc param should be supplied.

type

string - The type of the document.

term_statistics or termStatistics

boolean - Specifies if total term frequency and document frequency should be returned.

field_statistics or fieldStatistics

boolean - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
Default: true

fields

string | string[] - A comma-separated list of fields to return.

offsets

boolean - Specifies if term offsets should be returned.
Default: true

positions

boolean - Specifies if term positions should be returned.
Default: true

payloads

boolean - Specifies if term payloads should be returned.
Default: true

preference

string - Specify the node or shard the operation should be performed on (default: random).

routing

string - Specific routing value.

realtime

boolean - Specifies if request is real-time as opposed to near-real-time (default: true).

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' | 'force' - Specific version type

body

object - Define parameters and or supply a document to get termvectors for. See documentation.

textStructure.findStructure

edit
client.textStructure.findStructure({
  lines_to_sample: number,
  line_merge_size_limit: number,
  timeout: string,
  charset: string,
  format: 'ndjson' | 'xml' | 'delimited' | 'semi_structured_text',
  has_header_row: boolean,
  column_names: string | string[],
  delimiter: string,
  quote: string,
  should_trim_fields: boolean,
  grok_pattern: string,
  timestamp_field: string,
  timestamp_format: string,
  explain: boolean,
  body: object
})

Documentation

lines_to_sample or linesToSample

number - How many lines of the file should be included in the analysis
Default: 1000

line_merge_size_limit or lineMergeSizeLimit

number - Maximum number of characters permitted in a single message when lines are merged to create messages.
Default: 10000

timeout

string - Timeout after which the analysis will be aborted
Default: 25s

charset

string - Optional parameter to specify the character set of the file

format

'ndjson' | 'xml' | 'delimited' | 'semi_structured_text' - Optional parameter to specify the high level file format

has_header_row or hasHeaderRow

boolean - Optional parameter to specify whether a delimited file includes the column names in its first row

column_names or columnNames

string | string[] - Optional parameter containing a comma separated list of the column names for a delimited file

delimiter

string - Optional parameter to specify the delimiter character for a delimited file - must be a single character

quote

string - Optional parameter to specify the quote character for a delimited file - must be a single character

should_trim_fields or shouldTrimFields

boolean - Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them

grok_pattern or grokPattern

string - Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file

timestamp_field or timestampField

string - Optional parameter to specify the timestamp field in the file

timestamp_format or timestampFormat

string - Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format

explain

boolean - Whether to include a commentary on how the structure was derived

body

object - The contents of the file to be analyzed

transform.deleteTransform

edit
client.transform.deleteTransform({
  transform_id: string,
  force: boolean,
  timeout: string
})

Documentation

transform_id or transformId

string - The id of the transform to delete

force

boolean - When true, the transform is deleted regardless of its current state. The default value is false, meaning that the transform must be stopped before it can be deleted.

timeout

string - Controls the time to wait for the transform deletion

transform.getTransform

edit
client.transform.getTransform({
  transform_id: string,
  from: number,
  size: number,
  allow_no_match: boolean,
  exclude_generated: boolean
})

Documentation

transform_id or transformId

string - The id or comma delimited list of id expressions of the transforms to get, _all or * implies get all transforms

from

number - skips a number of transform configs, defaults to 0

size

number - specifies a max number of transforms to get, defaults to 100

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no transforms. (This includes _all string or when no transforms have been specified)

exclude_generated or excludeGenerated

boolean - Omits fields that are illegal to set on transform PUT

transform.getTransformStats

edit
client.transform.getTransformStats({
  transform_id: string,
  from: number,
  size: number,
  allow_no_match: boolean
})

Documentation

transform_id or transformId

string - The id of the transform for which to get stats. _all or * implies all transforms

from

number - skips a number of transform stats, defaults to 0

size

number - specifies a max number of transform stats to get, defaults to 100

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no transforms. (This includes _all string or when no transforms have been specified)

transform.previewTransform

edit
client.transform.previewTransform({
  transform_id: string,
  timeout: string,
  body: object
})

Documentation

transform_id or transformId

string - The id of the transform to preview.

timeout

string - Controls the time to wait for the preview

body

object - The definition for the transform to preview

transform.putTransform

edit
client.transform.putTransform({
  transform_id: string,
  defer_validation: boolean,
  timeout: string,
  body: object
})

Documentation

transform_id or transformId

string - The id of the new transform.

defer_validation or deferValidation

boolean - If validations should be deferred until transform starts, defaults to false.

timeout

string - Controls the time to wait for the transform to start

body

object - The transform definition

transform.startTransform

edit
client.transform.startTransform({
  transform_id: string,
  timeout: string
})

Documentation

transform_id or transformId

string - The id of the transform to start

timeout

string - Controls the time to wait for the transform to start

transform.stopTransform

edit
client.transform.stopTransform({
  transform_id: string,
  force: boolean,
  wait_for_completion: boolean,
  timeout: string,
  allow_no_match: boolean,
  wait_for_checkpoint: boolean
})

Documentation

transform_id or transformId

string - The id of the transform to stop

force

boolean - Whether to force stop a failed transform or not. Default to false

wait_for_completion or waitForCompletion

boolean - Whether to wait for the transform to fully stop before returning or not. Default to false

timeout

string - Controls the time to wait until the transform has stopped. Default to 30 seconds

allow_no_match or allowNoMatch

boolean - Whether to ignore if a wildcard expression matches no transforms. (This includes _all string or when no transforms have been specified)

wait_for_checkpoint or waitForCheckpoint

boolean - Whether to wait for the transform to reach a checkpoint before stopping. Default to false

transform.updateTransform

edit
client.transform.updateTransform({
  transform_id: string,
  defer_validation: boolean,
  timeout: string,
  body: object
})

Documentation

transform_id or transformId

string - The id of the transform.

defer_validation or deferValidation

boolean - If validations should be deferred until transform starts, defaults to false.

timeout

string - Controls the time to wait for the update

body

object - The update transform definition

transform.upgradeTransforms

edit
client.transform.upgradeTransforms({
  dry_run: boolean,
  timeout: string
})

Documentation

dry_run or dryRun

boolean - Whether to only check for updates but don’t execute

timeout

string - Controls the time to wait for the upgrade

update

edit
client.update({
  id: string,
  index: string,
  type: string,
  wait_for_active_shards: string,
  _source: string | string[],
  _source_excludes: string | string[],
  _source_includes: string | string[],
  lang: string,
  refresh: 'true' | 'false' | 'wait_for',
  retry_on_conflict: number,
  routing: string,
  timeout: string,
  if_seq_no: number,
  if_primary_term: number,
  require_alias: boolean,
  body: object
})

Documentation
Code Example

id

string - Document ID

index

string - The name of the index

type

string - The type of the document

WARNING: This parameter has been deprecated.

wait_for_active_shards or waitForActiveShards

string - Sets the number of shard copies that must be active before proceeding with the update 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)

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_excludes or _sourceExcludes

string | string[] - A list of fields to exclude from the returned _source field

_source_includes or _sourceIncludes

string | string[] - A list of fields to extract and return from the _source field

lang

string - The script language (default: painless)

refresh

'true' | 'false' | 'wait_for' - 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.

retry_on_conflict or retryOnConflict

number - Specify how many times should the operation be retried when a conflict occurs (default: 0)

routing

string - Specific routing value

timeout

string - Explicit operation timeout

if_seq_no or ifSeqNo

number - only perform the update operation if the last operation that has changed the document has the specified sequence number

if_primary_term or ifPrimaryTerm

number - only perform the update operation if the last operation that has changed the document has the specified primary term

require_alias or requireAlias

boolean - When true, requires destination is an alias. Default is false

body

object - The request definition requires either script or partial doc

updateByQuery

edit
client.updateByQuery({
  index: string | string[],
  type: string | string[],
  analyzer: string,
  analyze_wildcard: boolean,
  default_operator: 'AND' | 'OR',
  df: string,
  from: number,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  conflicts: 'abort' | 'proceed',
  expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
  lenient: boolean,
  pipeline: string,
  preference: string,
  q: string,
  routing: string | string[],
  scroll: string,
  search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
  search_timeout: string,
  size: number,
  max_docs: number,
  sort: string | string[],
  terminate_after: number,
  stats: string | string[],
  version: boolean,
  version_type: boolean,
  request_cache: boolean,
  refresh: boolean,
  timeout: string,
  wait_for_active_shards: string,
  scroll_size: number,
  wait_for_completion: boolean,
  requests_per_second: number,
  slices: number|string,
  body: object
})

Documentation
Code Example

index

string | string[] - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

type

string | string[] - A comma-separated list of document types to search; leave empty to perform the operation on all types

analyzer

string - The analyzer to use for the query string

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcard and prefix queries should be analyzed (default: false)

default_operator or defaultOperator

'AND' | 'OR' - The default operator for query string query (AND or OR)
Default: OR

df

string - The field to use as default where no field prefix is given in the query string

from

number - Starting offset (default: 0)

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

conflicts

'abort' | 'proceed' - What to do when the update by query hits version conflicts?
Default: abort

expand_wildcards or expandWildcards

'open' | 'closed' | 'hidden' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

lenient

boolean - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

pipeline

string - Ingest pipeline to set on index requests made by this action. (default: none)

preference

string - Specify the node or shard the operation should be performed on (default: random)

q

string - Query in the Lucene query string syntax

routing

string | string[] - A comma-separated list of specific routing values

scroll

string - Specify how long a consistent view of the index should be maintained for scrolled search

search_type or searchType

'query_then_fetch' | 'dfs_query_then_fetch' - Search operation type

search_timeout or searchTimeout

string - Explicit timeout for each search request. Defaults to no timeout.

size

number - Deprecated, please use max_docs instead

max_docs or maxDocs

number - Maximum number of documents to process (default: all documents)

sort

string | string[] - A comma-separated list of <field>:<direction> pairs

terminate_after or terminateAfter

number - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

stats

string | string[] - Specific tag of the request for logging and statistical purposes

version

boolean - Specify whether to return document version as part of a hit

version_type or versionType

boolean - Should the document increment the version number (internal) on hit or not (reindex)

request_cache or requestCache

boolean - Specify if request cache should be used for this request or not, defaults to index level setting

refresh

boolean - Should the affected indexes be refreshed?

timeout

string - Time each individual bulk request should wait for shards that are unavailable.
Default: 1m

wait_for_active_shards or waitForActiveShards

string - Sets the number of shard copies that must be active before proceeding with the update by query 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)

scroll_size or scrollSize

number - Size on the scroll request powering the update by query
Default: 100

wait_for_completion or waitForCompletion

boolean - Should the request should block until the update by query operation is complete.
Default: true

requests_per_second or requestsPerSecond

number - The throttle to set on this request in sub-requests per second. -1 means no throttle.

slices

number|string - The number of slices this task should be divided into. Defaults to 1, meaning the task isn’t sliced into subtasks. Can be set to auto.
Default: 1

body

object - The search definition using the Query DSL

updateByQueryRethrottle

edit
client.updateByQueryRethrottle({
  task_id: string,
  requests_per_second: number
})

Documentation

task_id or taskId

string - The task id to rethrottle

requests_per_second or requestsPerSecond

number - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.

watcher.ackWatch

edit
client.watcher.ackWatch({
  watch_id: string,
  action_id: string | string[]
})

Documentation

watch_id or watchId

string - Watch ID

action_id or actionId

string | string[] - A comma-separated list of the action ids to be acked

watcher.activateWatch

edit
client.watcher.activateWatch({
  watch_id: string
})

Documentation

watch_id or watchId

string - Watch ID

watcher.deactivateWatch

edit
client.watcher.deactivateWatch({
  watch_id: string
})

Documentation

watch_id or watchId

string - Watch ID

watcher.deleteWatch

edit
client.watcher.deleteWatch({
  id: string
})

Documentation

id

string - Watch ID

watcher.executeWatch

edit
client.watcher.executeWatch({
  id: string,
  debug: boolean,
  body: object
})

Documentation

id

string - Watch ID

debug

boolean - indicates whether the watch should execute in debug mode

body

object - Execution control

watcher.getWatch

edit
client.watcher.getWatch({
  id: string
})

Documentation

id

string - Watch ID

watcher.putWatch

edit
client.watcher.putWatch({
  id: string,
  active: boolean,
  version: number,
  if_seq_no: number,
  if_primary_term: number,
  body: object
})

Documentation

id

string - Watch ID

active

boolean - Specify whether the watch is in/active by default

version

number - Explicit version number for concurrency control

if_seq_no or ifSeqNo

number - only update the watch if the last operation that has changed the watch has the specified sequence number

if_primary_term or ifPrimaryTerm

number - only update the watch if the last operation that has changed the watch has the specified primary term

body

object - The watch

watcher.queryWatches

edit
client.watcher.queryWatches({
  body: object
})

Documentation

body

object - From, size, query, sort and search_after

watcher.start

edit
client.watcher.start()

Documentation

watcher.stats

edit
client.watcher.stats({
  metric: string | string[],
  emit_stacktraces: boolean
})

Documentation

metric

string | string[] - Controls what additional stat metrics should be include in the response

emit_stacktraces or emitStacktraces

boolean - Emits stack traces of currently running watches

watcher.stop

edit
client.watcher.stop()

Documentation

xpack.info

edit
client.xpack.info({
  categories: string | string[],
  accept_enterprise: boolean
})

Documentation

categories

string | string[] - Comma-separated list of info categories. Can be any of: build, license, features

accept_enterprise or acceptEnterprise

boolean - If an enterprise license is installed, return the type and mode as enterprise (default: false)

xpack.usage

edit
client.xpack.usage({
  master_timeout: string
})

Documentation

master_timeout or masterTimeout

string - Specify timeout for watch write operation