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.

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch/api/actions/xpack/info.rb', line 40

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.

  • :headers (Hash)

    Custom HTTP headers

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch/api/actions/xpack/usage.rb', line 36

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