Skip to content

Commit

Permalink
[API] Updates cat APIs
Browse files Browse the repository at this point in the history
cat.segments - Adds :master_timeout and :local Boolean parameter: return local information, do not retrieve the state from master node (default: false)
cat.tasks - Adds :timeout and :wait_for_completion parameters
  • Loading branch information
picandocodigo committed Feb 25, 2025
1 parent bed0798 commit 7722047
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ module Cat
module Actions
# Returns help for the Cat APIs.
#
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat.html
Expand All @@ -40,7 +38,7 @@ def help(arguments = {})

method = Elasticsearch::API::HTTP_GET
path = '_cat'
params = Utils.process_params(arguments)
params = {}

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module Actions
#
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
Expand Down
2 changes: 2 additions & 0 deletions elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ module Actions
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
# @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)
# @option arguments [Boolean] :v Verbose mode. Display column headers
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
# @option arguments [Boolean] :wait_for_completion If `true`, the request blocks until the task has completed.
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html
Expand Down

0 comments on commit 7722047

Please sign in to comment.