Method: Elasticsearch::API::Cat::Actions#ml_data_frame_analytics

Defined in:
lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb

#ml_data_frame_analytics(arguments = {}) ⇒ Object

Gets configuration and usage information about data frame analytics jobs.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    The ID of the data frame analytics to fetch

  • :allow_no_match (Boolean)

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

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :format (String)

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

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers

See Also:

[View source]

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb', line 40

def ml_data_frame_analytics(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || "cat.ml_data_frame_analytics" }

  defined_params = [:id].inject({}) do |set_variables, variable|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
    set_variables
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

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

  body = nil

  _id = arguments.delete(:id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _id
             "_cat/ml/data_frame/analytics/#{Utils.__listify(_id)}"
           else
             "_cat/ml/data_frame/analytics"
           end
  params = Utils.process_params(arguments)

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