Module: Elasticsearch::API::XPack::Actions

Defined in:
lib/elasticsearch/api/actions/xpack/info.rb,
lib/elasticsearch/api/actions/xpack/usage.rb

Instance Method Summary collapse

Instance Method Details

#info(arguments = {}) ⇒ Object

Get information. The information provided by the API includes:

  • Build information including the build number and timestamp.

  • License information about the currently installed license.

  • Feature information for the features that are currently enabled and available under the current license.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :categories (Array<String>)

    A comma-separated list of the information categories to include in the response. For example, ‘build,license,features`.

  • :accept_enterprise (Boolean)

    If this param is used it must be set to true

  • :human (Boolean)

    Defines whether additional human-readable information is included in the response. In particular, it adds descriptions and a tag line. Server default: true.

  • :error_trace (Boolean)

    When set to ‘true` Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to ‘true` will return statistics in a format suitable for humans. For example `“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to ‘true` the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/elasticsearch/api/actions/xpack/info.rb', line 51

def info(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'xpack.info' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_xpack'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#usage(arguments = {}) ⇒ Object

Get usage information. Get information about the features that are currently enabled and available under the current license. The API also provides some usage statistics.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :master_timeout (Time)

    The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to ‘-1`. Server default: 30s.

  • :error_trace (Boolean)

    When set to ‘true` Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to ‘true` will return statistics in a format suitable for humans. For example `“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to ‘true` the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/elasticsearch/api/actions/xpack/usage.rb', line 47

def usage(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'xpack.usage' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_xpack/usage'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end