module Elasticsearch::API::Esql::Actions

def async_query(arguments = {})

Other tags:
    See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query -

Options Hash: (**arguments)
  • :body (Hash) -- request body
  • :headers (Hash) -- Custom HTTP headers
  • :pretty (Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use
  • :human (Boolean) -- When set to `true` will return statistics in a format suitable for humans.
  • :filter_path (String, Array) -- Comma-separated list of filters in dot notation which reduce the response
  • :error_trace (Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors
  • :format (String) -- A short version of the Accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.For async requests, nothing will be returned if the async query doesn't finish within the timeout.
  • :drop_null_columns (Boolean) -- Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
  • :delimiter (String) -- The character to use between values within a CSV row.
  • :allow_partial_results (Boolean) -- If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.
def async_query(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query' }
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body = arguments.delete(:body)
  method = Elasticsearch::API::HTTP_POST
  path   = '_query/async'
  params = Utils.process_params(arguments)
  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

def async_query_delete(arguments = {})

Other tags:
    See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete -

Options Hash: (**arguments)
  • :headers (Hash) -- Custom HTTP headers
  • :pretty (Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use
  • :human (Boolean) -- When set to `true` will return statistics in a format suitable for humans.
  • :filter_path (String, Array) -- Comma-separated list of filters in dot notation which reduce the response
  • :error_trace (Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors
  • :id (String) -- The unique identifier of the query.
def async_query_delete(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_delete' }
  defined_params = [:id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body = nil
  _id = arguments.delete(:id)
  method = Elasticsearch::API::HTTP_DELETE
  path   = "_query/async/#{Utils.listify(_id)}"
  params = Utils.process_params(arguments)
  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

def async_query_get(arguments = {})

Other tags:
    See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-get -

Options Hash: (**arguments)
  • :headers (Hash) -- Custom HTTP headers
  • :pretty (Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use
  • :human (Boolean) -- When set to `true` will return statistics in a format suitable for humans.
  • :filter_path (String, Array) -- Comma-separated list of filters in dot notation which reduce the response
  • :error_trace (Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors
  • :wait_for_completion_timeout (Time) -- The period to wait for the request to finish.
  • :keep_alive (Time) -- The period for which the query and its results are stored in the cluster.
  • :format (String) -- A short version of the Accept header, for example `json` or `yaml`.
  • :drop_null_columns (Boolean) -- Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
  • :id (String) -- The unique identifier of the query.
def async_query_get(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_get' }
  defined_params = [:id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body = nil
  _id = arguments.delete(:id)
  method = Elasticsearch::API::HTTP_GET
  path   = "_query/async/#{Utils.listify(_id)}"
  params = Utils.process_params(arguments)
  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

def async_query_stop(arguments = {})

Other tags:
    See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop -

Options Hash: (**arguments)
  • :headers (Hash) -- Custom HTTP headers
  • :pretty (Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use
  • :human (Boolean) -- When set to `true` will return statistics in a format suitable for humans.
  • :filter_path (String, Array) -- Comma-separated list of filters in dot notation which reduce the response
  • :error_trace (Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors
  • :drop_null_columns (Boolean) -- Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
  • :id (String) -- The unique identifier of the query.
def async_query_stop(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_stop' }
  defined_params = [:id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body = nil
  _id = arguments.delete(:id)
  method = Elasticsearch::API::HTTP_POST
  path   = "_query/async/#{Utils.listify(_id)}/stop"
  params = Utils.process_params(arguments)
  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

def get_query(arguments = {})

Other tags:
    See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query -

Options Hash: (**arguments)
  • :headers (Hash) -- Custom HTTP headers
  • :pretty (Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use
  • :human (Boolean) -- When set to `true` will return statistics in a format suitable for humans.
  • :filter_path (String, Array) -- Comma-separated list of filters in dot notation which reduce the response
  • :error_trace (Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors
  • :id (String) -- The query ID (*Required*)
def get_query(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'esql.get_query' }
  defined_params = [:id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body = nil
  _id = arguments.delete(:id)
  method = Elasticsearch::API::HTTP_GET
  path   = "_query/queries/#{Utils.listify(_id)}"
  params = Utils.process_params(arguments)
  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

def list_queries(arguments = {})

Other tags:
    See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries -

Options Hash: (**arguments)
  • :headers (Hash) -- Custom HTTP headers
  • :pretty (Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use
  • :human (Boolean) -- When set to `true` will return statistics in a format suitable for humans.
  • :filter_path (String, Array) -- Comma-separated list of filters in dot notation which reduce the response
  • :error_trace (Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors
def list_queries(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'esql.list_queries' }
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body = nil
  method = Elasticsearch::API::HTTP_GET
  path   = '_query/queries'
  params = Utils.process_params(arguments)
  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

def query(arguments = {})

Other tags:
    See: https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest -

Options Hash: (**arguments)
  • :body (Hash) -- request body
  • :headers (Hash) -- Custom HTTP headers
  • :pretty (Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use
  • :human (Boolean) -- When set to `true` will return statistics in a format suitable for humans.
  • :filter_path (String, Array) -- Comma-separated list of filters in dot notation which reduce the response
  • :error_trace (Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors
  • :allow_partial_results (Boolean) -- If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.
  • :drop_null_columns (Boolean) -- Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results?
  • :delimiter (String) -- The character to use between values within a CSV row. Only valid for the CSV format. Server default: ,.
  • :format (String) -- A short version of the Accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.
def query(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'esql.query' }
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body = arguments.delete(:body)
  method = Elasticsearch::API::HTTP_POST
  path   = '_query'
  params = Utils.process_params(arguments)
  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end