Skip to content

Commit 49efd57

Browse files
committed
[API] Updates security.get_stats
Adds error_trace, filter_path, human and pretty parameters
1 parent 6fc861c commit 49efd57

File tree

1 file changed

+14
-2
lines changed
  • elasticsearch-api/lib/elasticsearch/api/actions/security

1 file changed

+14
-2
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/security/get_stats.rb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,20 @@ module Elasticsearch
2222
module API
2323
module Security
2424
module Actions
25-
# Get security statistics for all nodes
25+
# Get security stats.
26+
# Gather security usage statistics from all node(s) within the cluster.
2627
#
28+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
29+
# when they occur.
30+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
31+
# returned by Elasticsearch.
32+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
33+
# For example `"exists_time": "1h"` for humans and
34+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
35+
# readable values will be omitted. This makes sense for responses being consumed
36+
# only by machines.
37+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
38+
# this option for debugging only.
2739
# @option arguments [Hash] :headers Custom HTTP headers
2840
#
2941
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-stats
@@ -38,7 +50,7 @@ def get_stats(arguments = {})
3850

3951
method = Elasticsearch::API::HTTP_GET
4052
path = '_security/stats'
41-
params = {}
53+
params = Utils.process_params(arguments)
4254

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

0 commit comments

Comments
 (0)