From 4329b8a051a8aaf0603d397fc1cf481dabe3568d Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 30 Nov 2023 15:53:08 -0800 Subject: [PATCH] Avoid unnecessary hash values This about halves the memory usage of the gem --- .../client/rest_api_spec/api_spec.rb | 4 +- .../client/rest_api_spec/api_spec_v5_6.rb | 2706 ++++---- .../client/rest_api_spec/api_spec_v8_7.rb | 5522 ++++++++--------- .../client/rest_api_spec/rest_api.rb | 6 +- script/generate-rest-api-spec | 18 +- test/client/rest_api_spec/rest_api_test.rb | 21 +- 6 files changed, 4135 insertions(+), 4142 deletions(-) diff --git a/lib/elastomer_client/client/rest_api_spec/api_spec.rb b/lib/elastomer_client/client/rest_api_spec/api_spec.rb index 601d61a2..3d41f101 100644 --- a/lib/elastomer_client/client/rest_api_spec/api_spec.rb +++ b/lib/elastomer_client/client/rest_api_spec/api_spec.rb @@ -12,9 +12,7 @@ class ApiSpec attr_reader :common_params def initialize - @rest_apis ||= {} - @common_params ||= {} - @common_params_set = Set.new(@common_params.keys) + @common_params_set = Set.new(@common_params) end # Given an API descriptor name and a set of request parameters, select those diff --git a/lib/elastomer_client/client/rest_api_spec/api_spec_v5_6.rb b/lib/elastomer_client/client/rest_api_spec/api_spec_v5_6.rb index 23f962c1..770dee5e 100644 --- a/lib/elastomer_client/client/rest_api_spec/api_spec_v5_6.rb +++ b/lib/elastomer_client/client/rest_api_spec/api_spec_v5_6.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true # Generated REST API spec file - DO NOT EDIT! -# Date: 2018-01-10 +# Date: 2023-11-30 # ES version: 5.6 module ElastomerClient::Client::RestApiSpec @@ -14,22 +14,22 @@ def initialize url: { path: "/_bulk", paths: ["/_bulk", "/{index}/_bulk", "/{index}/{type}/_bulk"], - parts: { - "index" => {"type"=>"string", "description"=>"Default index for items which don't provide one"}, - "type" => {"type"=>"string", "description"=>"Default document type for items which don't provide one"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "type" => {"type"=>"string", "description"=>"Default document type for items which don't provide one"}, - "fields" => {"type"=>"list", "description"=>"Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"}, - "_source_exclude" => {"type"=>"list", "description"=>"Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"}, - "_source_include" => {"type"=>"list", "description"=>"Default list of fields to extract and return from the _source field, can be overridden on each sub-request"}, - "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, - } + parts: [ + "index", + "type", + ], + params: [ + "wait_for_active_shards", + "refresh", + "routing", + "timeout", + "type", + "fields", + "_source", + "_source_exclude", + "_source_include", + "pipeline", + ] } ), "cat.aliases" => RestApi.new( @@ -39,18 +39,18 @@ def initialize url: { path: "/_cat/aliases", paths: ["/_cat/aliases", "/_cat/aliases/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "name", + ], + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.allocation" => RestApi.new( @@ -60,19 +60,19 @@ def initialize url: { path: "/_cat/allocation", paths: ["/_cat/allocation", "/_cat/allocation/{node_id}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "node_id", + ], + params: [ + "format", + "bytes", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.count" => RestApi.new( @@ -82,18 +82,18 @@ def initialize url: { path: "/_cat/count", paths: ["/_cat/count", "/_cat/count/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.fielddata" => RestApi.new( @@ -103,20 +103,20 @@ def initialize url: { path: "/_cat/fielddata", paths: ["/_cat/fielddata", "/_cat/fielddata/{fields}"], - parts: { - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return the fielddata size"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return in the output"}, - } + parts: [ + "fields", + ], + params: [ + "format", + "bytes", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + "fields", + ] } ), "cat.health" => RestApi.new( @@ -126,16 +126,16 @@ def initialize url: { path: "/_cat/health", paths: ["/_cat/health"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "ts" => {"type"=>"boolean", "description"=>"Set to false to disable timestamping", "default"=>true}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "ts", + "v", + ] } ), "cat.help" => RestApi.new( @@ -145,10 +145,10 @@ def initialize url: { path: "/_cat", paths: ["/_cat"], - params: { - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - } + params: [ + "help", + "s", + ] } ), "cat.indices" => RestApi.new( @@ -158,21 +158,21 @@ def initialize url: { path: "/_cat/indices", paths: ["/_cat/indices", "/_cat/indices/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "m", "g"]}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "health" => {"type"=>"enum", "options"=>["green", "yellow", "red"], "default"=>nil, "description"=>"A health status (\"green\", \"yellow\", or \"red\" to filter only indices matching the specified health status"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "pri" => {"type"=>"boolean", "description"=>"Set to true to return stats only for primary shards", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "bytes", + "local", + "master_timeout", + "h", + "health", + "help", + "pri", + "s", + "v", + ] } ), "cat.master" => RestApi.new( @@ -182,15 +182,15 @@ def initialize url: { path: "/_cat/master", paths: ["/_cat/master"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.nodeattrs" => RestApi.new( @@ -200,15 +200,15 @@ def initialize url: { path: "/_cat/nodeattrs", paths: ["/_cat/nodeattrs"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.nodes" => RestApi.new( @@ -218,16 +218,16 @@ def initialize url: { path: "/_cat/nodes", paths: ["/_cat/nodes"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "full_id" => {"type"=>"boolean", "description"=>"Return the full node ID instead of the shortened version (default: false)"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "full_id", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.pending_tasks" => RestApi.new( @@ -237,15 +237,15 @@ def initialize url: { path: "/_cat/pending_tasks", paths: ["/_cat/pending_tasks"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.plugins" => RestApi.new( @@ -255,15 +255,15 @@ def initialize url: { path: "/_cat/plugins", paths: ["/_cat/plugins"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.recovery" => RestApi.new( @@ -273,18 +273,18 @@ def initialize url: { path: "/_cat/recovery", paths: ["/_cat/recovery", "/_cat/recovery/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "bytes", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.repositories" => RestApi.new( @@ -294,15 +294,15 @@ def initialize url: { path: "/_cat/repositories", paths: ["/_cat/repositories"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.segments" => RestApi.new( @@ -312,17 +312,17 @@ def initialize url: { path: "/_cat/segments", paths: ["/_cat/segments", "/_cat/segments/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "bytes", + "h", + "help", + "s", + "v", + ] } ), "cat.shards" => RestApi.new( @@ -332,19 +332,19 @@ def initialize url: { path: "/_cat/shards", paths: ["/_cat/shards", "/_cat/shards/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "bytes", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.snapshots" => RestApi.new( @@ -354,18 +354,18 @@ def initialize url: { path: "/_cat/snapshots", paths: ["/_cat/snapshots", "/_cat/snapshots/{repository}"], - parts: { - "repository" => {"type"=>"list", "required"=>true, "description"=>"Name of repository from which to fetch the snapshot information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Set to true to ignore unavailable snapshots", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "repository", + ], + params: [ + "format", + "ignore_unavailable", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.tasks" => RestApi.new( @@ -375,18 +375,18 @@ def initialize url: { path: "/_cat/tasks", paths: ["/_cat/tasks"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, - "detailed" => {"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, - "parent_node" => {"type"=>"string", "description"=>"Return tasks with specified parent node."}, - "parent_task" => {"type"=>"number", "description"=>"Return tasks with specified parent task id. Set to -1 to return all."}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "node_id", + "actions", + "detailed", + "parent_node", + "parent_task", + "h", + "help", + "s", + "v", + ] } ), "cat.templates" => RestApi.new( @@ -396,18 +396,18 @@ def initialize url: { path: "/_cat/templates", paths: ["/_cat/templates", "/_cat/templates/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"A pattern that returned template names must match"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "name", + ], + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.thread_pool" => RestApi.new( @@ -417,19 +417,19 @@ def initialize url: { path: "/_cat/thread_pool", paths: ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], - parts: { - "thread_pool_patterns" => {"type"=>"list", "description"=>"A comma-separated list of regular-expressions to filter the thread pools in the output"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "size" => {"type"=>"enum", "description"=>"The multiplier in which to display values", "options"=>["", "k", "m", "g", "t", "p"]}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "thread_pool_patterns", + ], + params: [ + "format", + "size", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "clear_scroll" => RestApi.new( @@ -439,9 +439,9 @@ def initialize url: { path: "/_search/scroll/{scroll_id}", paths: ["/_search/scroll/{scroll_id}", "/_search/scroll"], - parts: { - "scroll_id" => {"type"=>"list", "description"=>"A comma-separated list of scroll IDs to clear"}, - }, + parts: [ + "scroll_id", + ], } ), "cluster.allocation_explain" => RestApi.new( @@ -451,10 +451,10 @@ def initialize url: { path: "/_cluster/allocation/explain", paths: ["/_cluster/allocation/explain"], - params: { - "include_yes_decisions" => {"type"=>"boolean", "description"=>"Return 'YES' decisions in explanation (default: false)"}, - "include_disk_info" => {"type"=>"boolean", "description"=>"Return information about disk usage and shard sizes (default: false)"}, - } + params: [ + "include_yes_decisions", + "include_disk_info", + ] } ), "cluster.get_settings" => RestApi.new( @@ -464,12 +464,12 @@ def initialize url: { path: "/_cluster/settings", paths: ["/_cluster/settings"], - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default clusters setting.", "default"=>false}, - } + params: [ + "flat_settings", + "master_timeout", + "timeout", + "include_defaults", + ] } ), "cluster.health" => RestApi.new( @@ -479,20 +479,20 @@ def initialize url: { path: "/_cluster/health", paths: ["/_cluster/health", "/_cluster/health/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"Limit the information returned to a specific index"}, - }, - params: { - "level" => {"type"=>"enum", "options"=>["cluster", "indices", "shards"], "default"=>"cluster", "description"=>"Specify the level of detail for returned information"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Wait until the specified number of shards is active"}, - "wait_for_nodes" => {"type"=>"string", "description"=>"Wait until the specified number of nodes is available"}, - "wait_for_events" => {"type"=>"enum", "options"=>["immediate", "urgent", "high", "normal", "low", "languid"], "description"=>"Wait until all currently queued events with the given priority are processed"}, - "wait_for_no_relocating_shards" => {"type"=>"boolean", "description"=>"Whether to wait until there are no relocating shards in the cluster"}, - "wait_for_status" => {"type"=>"enum", "options"=>["green", "yellow", "red"], "default"=>nil, "description"=>"Wait until cluster is in a specific state"}, - } + parts: [ + "index", + ], + params: [ + "level", + "local", + "master_timeout", + "timeout", + "wait_for_active_shards", + "wait_for_nodes", + "wait_for_events", + "wait_for_no_relocating_shards", + "wait_for_status", + ] } ), "cluster.pending_tasks" => RestApi.new( @@ -502,10 +502,10 @@ def initialize url: { path: "/_cluster/pending_tasks", paths: ["/_cluster/pending_tasks"], - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + params: [ + "local", + "master_timeout", + ] } ), "cluster.put_settings" => RestApi.new( @@ -515,11 +515,11 @@ def initialize url: { path: "/_cluster/settings", paths: ["/_cluster/settings"], - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + params: [ + "flat_settings", + "master_timeout", + "timeout", + ] } ), "cluster.remote_info" => RestApi.new( @@ -538,14 +538,14 @@ def initialize url: { path: "/_cluster/reroute", paths: ["/_cluster/reroute"], - params: { - "dry_run" => {"type"=>"boolean", "description"=>"Simulate the operation only and return the resulting state"}, - "explain" => {"type"=>"boolean", "description"=>"Return an explanation of why the commands can or cannot be executed"}, - "retry_failed" => {"type"=>"boolean", "description"=>"Retries allocation of shards that are blocked due to too many subsequent allocation failures"}, - "metric" => {"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics. Defaults to all but metadata"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + params: [ + "dry_run", + "explain", + "retry_failed", + "metric", + "master_timeout", + "timeout", + ] } ), "cluster.state" => RestApi.new( @@ -555,18 +555,18 @@ def initialize url: { path: "/_cluster/state", paths: ["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - "metric" => {"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics"}, - }, - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + "metric", + ], + params: [ + "local", + "master_timeout", + "flat_settings", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "cluster.stats" => RestApi.new( @@ -576,13 +576,13 @@ def initialize url: { path: "/_cluster/stats", paths: ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + ], + params: [ + "flat_settings", + "timeout", + ] } ), "count" => RestApi.new( @@ -592,25 +592,25 @@ def initialize url: { path: "/_count", paths: ["/_count", "/{index}/_count", "/{index}/{type}/_count"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of indices to restrict the results"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of types to restrict the results"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "min_score" => {"type"=>"number", "description"=>"Include only documents with a specific `_score` value in the result"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum count for each shard, upon reaching which the query execution will terminate early"}, - } + parts: [ + "index", + "type", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "min_score", + "preference", + "routing", + "q", + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "lenient", + "terminate_after", + ] } ), "count_percolate" => RestApi.new( @@ -620,22 +620,22 @@ def initialize url: { path: "/{index}/{type}/_percolate/count", paths: ["/{index}/{type}/_percolate/count", "/{index}/{type}/{id}/_percolate/count"], - parts: { - "index" => {"type"=>"string", "required"=>true, "description"=>"The index of the document being count percolated."}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document being count percolated."}, - "id" => {"type"=>"string", "required"=>false, "description"=>"Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster."}, - }, - params: { - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "percolate_index" => {"type"=>"string", "description"=>"The index to count percolate the document into. Defaults to index."}, - "percolate_type" => {"type"=>"string", "description"=>"The type to count percolate document into. Defaults to type."}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "index", + "type", + "id", + ], + params: [ + "routing", + "preference", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "percolate_index", + "percolate_type", + "version", + "version_type", + ] } ), "create" => RestApi.new( @@ -645,23 +645,23 @@ def initialize url: { path: "/{index}/{type}/{id}/_create", paths: ["/{index}/{type}/{id}/_create"], - parts: { - "id" => {"type"=>"string", "required"=>true, "description"=>"Document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "parent" => {"type"=>"string", "description"=>"ID of the parent document"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "timestamp" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, - "ttl" => {"type"=>"time", "description"=>"Expiration time for the document"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "wait_for_active_shards", + "parent", + "refresh", + "routing", + "timeout", + "timestamp", + "ttl", + "version", + "version_type", + "pipeline", + ] } ), "delete" => RestApi.new( @@ -671,20 +671,20 @@ def initialize url: { path: "/{index}/{type}/{id}", paths: ["/{index}/{type}/{id}"], - parts: { - "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "parent" => {"type"=>"string", "description"=>"ID of parent document"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "wait_for_active_shards", + "parent", + "refresh", + "routing", + "timeout", + "version", + "version_type", + ] } ), "delete_by_query" => RestApi.new( @@ -694,44 +694,44 @@ def initialize url: { path: "/{index}/_delete_by_query", paths: ["/{index}/_delete_by_query", "/{index}/{type}/_delete_by_query"], - parts: { - "index" => {"required"=>true, "type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, - }, - params: { - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "conflicts" => {"note"=>"This is not copied from search", "type"=>"enum", "options"=>["abort", "proceed"], "default"=>"abort", "description"=>"What to do when the delete-by-query hits version conflicts?"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "search_timeout" => {"type"=>"time", "description"=>"Explicit timeout for each search request. Defaults to no timeout."}, - "size" => {"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, - "sort" => {"type"=>"list", "description"=>"A comma-separated list of : pairs"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, - "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, - "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, - "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, - "refresh" => {"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, - "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "scroll_size" => {"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the update_by_query"}, - "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the delete-by-query is complete."}, - "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle for this request in sub-requests per second. -1 means no throttle."}, - "slices" => {"type"=>"number", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}, - } + parts: [ + "index", + "type", + ], + params: [ + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "from", + "ignore_unavailable", + "allow_no_indices", + "conflicts", + "expand_wildcards", + "lenient", + "preference", + "q", + "routing", + "scroll", + "search_type", + "search_timeout", + "size", + "sort", + "_source", + "_source_exclude", + "_source_include", + "terminate_after", + "stats", + "version", + "request_cache", + "refresh", + "timeout", + "wait_for_active_shards", + "scroll_size", + "wait_for_completion", + "requests_per_second", + "slices", + ] } ), "delete_script" => RestApi.new( @@ -741,14 +741,14 @@ def initialize url: { path: "/_scripts/{lang}", paths: ["/_scripts/{lang}", "/_scripts/{lang}/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Script ID", "required"=>true}, - "lang" => {"type"=>"string", "description"=>"Script language", "required"=>true}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "id", + "lang", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "delete_template" => RestApi.new( @@ -758,9 +758,9 @@ def initialize url: { path: "/_search/template/{id}", paths: ["/_search/template/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Template ID", "required"=>true}, - }, + parts: [ + "id", + ], } ), "exists" => RestApi.new( @@ -770,24 +770,24 @@ def initialize url: { path: "/{index}/{type}/{id}", paths: ["/{index}/{type}/{id}"], - parts: { - "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document (use `_all` to fetch the first document matching the ID across all types)"}, - }, - params: { - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, - "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "stored_fields", + "parent", + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_exclude", + "_source_include", + "version", + "version_type", + ] } ), "exists_source" => RestApi.new( @@ -797,23 +797,23 @@ def initialize url: { path: "/{index}/{type}/{id}/_source", paths: ["/{index}/{type}/{id}/_source"], - parts: { - "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document; use `_all` to fetch the first document matching the ID across all types"}, - }, - params: { - "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "parent", + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_exclude", + "_source_include", + "version", + "version_type", + ] } ), "explain" => RestApi.new( @@ -823,26 +823,26 @@ def initialize url: { path: "/{index}/{type}/{id}/_explain", paths: ["/{index}/{type}/{id}/_explain"], - parts: { - "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, - }, - params: { - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)"}, - "analyzer" => {"type"=>"string", "description"=>"The analyzer for the query string query"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The default field for query string query (default: _all)"}, - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "analyze_wildcard", + "analyzer", + "default_operator", + "df", + "stored_fields", + "lenient", + "parent", + "preference", + "q", + "routing", + "_source", + "_source_exclude", + "_source_include", + ] } ), "field_caps" => RestApi.new( @@ -852,15 +852,15 @@ def initialize url: { path: "/_field_caps", paths: ["/_field_caps", "/{index}/_field_caps"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "fields" => {"type"=>"list", "description"=>"A comma-separated list of field names"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "fields", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "field_stats" => RestApi.new( @@ -870,16 +870,16 @@ def initialize url: { path: "/_field_stats", paths: ["/_field_stats", "/{index}/_field_stats"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for to get field statistics for (min value, max value, and more)"}, - "level" => {"type"=>"enum", "options"=>["indices", "cluster"], "default"=>"cluster", "description"=>"Defines if field stats should be returned on a per index level or on a cluster wide level"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "fields", + "level", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "get" => RestApi.new( @@ -889,24 +889,24 @@ def initialize url: { path: "/{index}/{type}/{id}", paths: ["/{index}/{type}/{id}"], - parts: { - "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document (use `_all` to fetch the first document matching the ID across all types)"}, - }, - params: { - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, - "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "stored_fields", + "parent", + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_exclude", + "_source_include", + "version", + "version_type", + ] } ), "get_script" => RestApi.new( @@ -916,10 +916,10 @@ def initialize url: { path: "/_scripts/{lang}", paths: ["/_scripts/{lang}", "/_scripts/{lang}/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Script ID", "required"=>true}, - "lang" => {"type"=>"string", "description"=>"Script language", "required"=>true}, - }, + parts: [ + "id", + "lang", + ], } ), "get_source" => RestApi.new( @@ -929,23 +929,23 @@ def initialize url: { path: "/{index}/{type}/{id}/_source", paths: ["/{index}/{type}/{id}/_source"], - parts: { - "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document; use `_all` to fetch the first document matching the ID across all types"}, - }, - params: { - "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "parent", + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_exclude", + "_source_include", + "version", + "version_type", + ] } ), "get_template" => RestApi.new( @@ -955,9 +955,9 @@ def initialize url: { path: "/_search/template/{id}", paths: ["/_search/template/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Template ID", "required"=>true}, - }, + parts: [ + "id", + ], } ), "index" => RestApi.new( @@ -967,24 +967,24 @@ def initialize url: { path: "/{index}/{type}", paths: ["/{index}/{type}", "/{index}/{type}/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "op_type" => {"type"=>"enum", "options"=>["index", "create"], "default"=>"index", "description"=>"Explicit operation type"}, - "parent" => {"type"=>"string", "description"=>"ID of the parent document"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "timestamp" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, - "ttl" => {"type"=>"time", "description"=>"Expiration time for the document"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "wait_for_active_shards", + "op_type", + "parent", + "refresh", + "routing", + "timeout", + "timestamp", + "ttl", + "version", + "version_type", + "pipeline", + ] } ), "indices.analyze" => RestApi.new( @@ -994,22 +994,22 @@ def initialize url: { path: "/_analyze", paths: ["/_analyze", "/{index}/_analyze"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index to scope the operation"}, - }, - params: { - "analyzer" => {"type"=>"string", "description"=>"The name of the analyzer to use"}, - "char_filter" => {"type"=>"list", "description"=>"A comma-separated list of character filters to use for the analysis"}, - "field" => {"type"=>"string", "description"=>"Use the analyzer configured for this field (instead of passing the analyzer name)"}, - "filter" => {"type"=>"list", "description"=>"A comma-separated list of filters to use for the analysis"}, - "index" => {"type"=>"string", "description"=>"The name of the index to scope the operation"}, - "prefer_local" => {"type"=>"boolean", "description"=>"With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)"}, - "text" => {"type"=>"list", "description"=>"The text on which the analysis should be performed (when request body is not used)"}, - "tokenizer" => {"type"=>"string", "description"=>"The name of the tokenizer to use for the analysis"}, - "explain" => {"type"=>"boolean", "description"=>"With `true`, outputs more advanced details. (default: false)"}, - "attributes" => {"type"=>"list", "description"=>"A comma-separated list of token attributes to output, this parameter works only with `explain=true`"}, - "format" => {"type"=>"enum", "options"=>["detailed", "text"], "default"=>"detailed", "description"=>"Format of the output"}, - } + parts: [ + "index", + ], + params: [ + "analyzer", + "char_filter", + "field", + "filter", + "index", + "prefer_local", + "text", + "tokenizer", + "explain", + "attributes", + "format", + ] } ), "indices.clear_cache" => RestApi.new( @@ -1019,22 +1019,22 @@ def initialize url: { path: "/_cache/clear", paths: ["/_cache/clear", "/{index}/_cache/clear"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, - }, - params: { - "field_data" => {"type"=>"boolean", "description"=>"Clear field data"}, - "fielddata" => {"type"=>"boolean", "description"=>"Clear field data"}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to clear when using the `field_data` parameter (default: all)"}, - "query" => {"type"=>"boolean", "description"=>"Clear query caches"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "index" => {"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, - "recycler" => {"type"=>"boolean", "description"=>"Clear the recycler cache"}, - "request_cache" => {"type"=>"boolean", "description"=>"Clear request cache"}, - "request" => {"type"=>"boolean", "description"=>"Clear request cache"}, - } + parts: [ + "index", + ], + params: [ + "field_data", + "fielddata", + "fields", + "query", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "index", + "recycler", + "request_cache", + "request", + ] } ), "indices.close" => RestApi.new( @@ -1044,16 +1044,16 @@ def initialize url: { path: "/{index}/_close", paths: ["/{index}/_close"], - parts: { - "index" => {"type"=>"list", "required"=>true, "description"=>"A comma separated list of indices to close"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.create" => RestApi.new( @@ -1063,15 +1063,15 @@ def initialize url: { path: "/{index}", paths: ["/{index}"], - parts: { - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for before the operation returns."}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "update_all_types" => {"type"=>"boolean", "description"=>"Whether to update the mapping for all fields with the same name across all types or not"}, - } + parts: [ + "index", + ], + params: [ + "wait_for_active_shards", + "timeout", + "master_timeout", + "update_all_types", + ] } ), "indices.delete" => RestApi.new( @@ -1081,13 +1081,13 @@ def initialize url: { path: "/{index}", paths: ["/{index}"], - parts: { - "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "indices.delete_alias" => RestApi.new( @@ -1097,14 +1097,14 @@ def initialize url: { path: "/{index}/_alias/{name}", paths: ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], - parts: { - "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names (supports wildcards); use `_all` for all indices"}, - "name" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index", + "name", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "indices.delete_template" => RestApi.new( @@ -1114,13 +1114,13 @@ def initialize url: { path: "/_template/{name}", paths: ["/_template/{name}"], - parts: { - "name" => {"type"=>"string", "required"=>true, "description"=>"The name of the template"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "indices.exists" => RestApi.new( @@ -1130,17 +1130,17 @@ def initialize url: { path: "/{index}", paths: ["/{index}"], - parts: { - "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names"}, - }, - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "local", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "flat_settings", + "include_defaults", + ] } ), "indices.exists_alias" => RestApi.new( @@ -1150,16 +1150,16 @@ def initialize url: { path: "/_alias/{name}", paths: ["/_alias/{name}", "/{index}/_alias/{name}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, - "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "index", + "name", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "local", + ] } ), "indices.exists_template" => RestApi.new( @@ -1169,14 +1169,14 @@ def initialize url: { path: "/_template/{name}", paths: ["/_template/{name}"], - parts: { - "name" => {"type"=>"list", "required"=>true, "description"=>"The comma separated names of the index templates"}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "flat_settings", + "master_timeout", + "local", + ] } ), "indices.exists_type" => RestApi.new( @@ -1186,16 +1186,16 @@ def initialize url: { path: "/{index}/_mapping/{type}", paths: ["/{index}/_mapping/{type}"], - parts: { - "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names; use `_all` to check the types across all indices"}, - "type" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of document types to check"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "index", + "type", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "local", + ] } ), "indices.flush" => RestApi.new( @@ -1205,16 +1205,16 @@ def initialize url: { path: "/_flush", paths: ["/_flush", "/{index}/_flush"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string for all indices"}, - }, - params: { - "force" => {"type"=>"boolean", "description"=>"Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)"}, - "wait_if_ongoing" => {"type"=>"boolean", "description"=>"If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running."}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "force", + "wait_if_ongoing", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.flush_synced" => RestApi.new( @@ -1224,14 +1224,14 @@ def initialize url: { path: "/_flush/synced", paths: ["/_flush/synced", "/{index}/_flush/synced"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string for all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.forcemerge" => RestApi.new( @@ -1241,19 +1241,19 @@ def initialize url: { path: "/_forcemerge", paths: ["/_forcemerge", "/{index}/_forcemerge"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "flush" => {"type"=>"boolean", "description"=>"Specify whether the index should be flushed after performing the operation (default: true)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "max_num_segments" => {"type"=>"number", "description"=>"The number of segments the index should be merged into (default: dynamic)"}, - "only_expunge_deletes" => {"type"=>"boolean", "description"=>"Specify whether the operation should only expunge deleted documents"}, - "operation_threading" => {"description"=>"TODO: ?"}, - "wait_for_merge" => {"type"=>"boolean", "description"=>"Specify whether the request should block until the merge process is finished (default: true)"}, - } + parts: [ + "index", + ], + params: [ + "flush", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "max_num_segments", + "only_expunge_deletes", + "operation_threading", + "wait_for_merge", + ] } ), "indices.get" => RestApi.new( @@ -1263,18 +1263,18 @@ def initialize url: { path: "/{index}", paths: ["/{index}", "/{index}/{feature}"], - parts: { - "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names"}, - "feature" => {"type"=>"list", "description"=>"A comma-separated list of features", "options"=>["_settings", "_mappings", "_aliases"]}, - }, - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, - } + parts: [ + "index", + "feature", + ], + params: [ + "local", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "flat_settings", + "include_defaults", + ] } ), "indices.get_alias" => RestApi.new( @@ -1284,16 +1284,16 @@ def initialize url: { path: "/_alias/", paths: ["/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, - "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "index", + "name", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "local", + ] } ), "indices.get_field_mapping" => RestApi.new( @@ -1303,18 +1303,18 @@ def initialize url: { path: "/_mapping/field/{fields}", paths: ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}", "/_mapping/{type}/field/{fields}", "/{index}/_mapping/{type}/field/{fields}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types"}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields", "required"=>true}, - }, - params: { - "include_defaults" => {"type"=>"boolean", "description"=>"Whether the default mapping values should be returned as well"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "index", + "type", + "fields", + ], + params: [ + "include_defaults", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "local", + ] } ), "indices.get_mapping" => RestApi.new( @@ -1324,16 +1324,16 @@ def initialize url: { path: "/_mapping", paths: ["/_mapping", "/{index}/_mapping", "/_mapping/{type}", "/{index}/_mapping/{type}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "index", + "type", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "local", + ] } ), "indices.get_settings" => RestApi.new( @@ -1343,18 +1343,18 @@ def initialize url: { path: "/_settings", paths: ["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - "name" => {"type"=>"list", "description"=>"The name of the settings that should be included"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>["open", "closed"], "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, - } + parts: [ + "index", + "name", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "flat_settings", + "local", + "include_defaults", + ] } ), "indices.get_template" => RestApi.new( @@ -1364,14 +1364,14 @@ def initialize url: { path: "/_template/{name}", paths: ["/_template", "/_template/{name}"], - parts: { - "name" => {"type"=>"list", "required"=>false, "description"=>"The comma separated names of the index templates"}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "flat_settings", + "master_timeout", + "local", + ] } ), "indices.get_upgrade" => RestApi.new( @@ -1381,14 +1381,14 @@ def initialize url: { path: "/_upgrade", paths: ["/_upgrade", "/{index}/_upgrade"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.open" => RestApi.new( @@ -1398,16 +1398,16 @@ def initialize url: { path: "/{index}/_open", paths: ["/{index}/_open"], - parts: { - "index" => {"type"=>"list", "required"=>true, "description"=>"A comma separated list of indices to open"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"closed", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.put_alias" => RestApi.new( @@ -1417,14 +1417,14 @@ def initialize url: { path: "/{index}/_alias/{name}", paths: ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], - parts: { - "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."}, - "name" => {"type"=>"string", "required"=>true, "description"=>"The name of the alias to be created or updated"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index", + "name", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "indices.put_mapping" => RestApi.new( @@ -1434,18 +1434,18 @@ def initialize url: { path: "/{index}/{type}/_mapping", paths: ["/{index}/{type}/_mapping", "/{index}/_mapping/{type}", "/_mapping/{type}", "/{index}/{type}/_mappings", "/{index}/_mappings/{type}", "/_mappings/{type}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The name of the document type"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "update_all_types" => {"type"=>"boolean", "description"=>"Whether to update the mapping for all fields with the same name across all types or not"}, - } + parts: [ + "index", + "type", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "update_all_types", + ] } ), "indices.put_settings" => RestApi.new( @@ -1455,17 +1455,17 @@ def initialize url: { path: "/_settings", paths: ["/_settings", "/{index}/_settings"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "preserve_existing" => {"type"=>"boolean", "description"=>"Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - } + parts: [ + "index", + ], + params: [ + "master_timeout", + "preserve_existing", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "flat_settings", + ] } ), "indices.put_template" => RestApi.new( @@ -1475,16 +1475,16 @@ def initialize url: { path: "/_template/{name}", paths: ["/_template/{name}"], - parts: { - "name" => {"type"=>"string", "required"=>true, "description"=>"The name of the template"}, - }, - params: { - "order" => {"type"=>"number", "description"=>"The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)"}, - "create" => {"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "order", + "create", + "timeout", + "master_timeout", + "flat_settings", + ] } ), "indices.recovery" => RestApi.new( @@ -1494,13 +1494,13 @@ def initialize url: { path: "/_recovery", paths: ["/_recovery", "/{index}/_recovery"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "detailed" => {"type"=>"boolean", "description"=>"Whether to display detailed information about shard recovery", "default"=>false}, - "active_only" => {"type"=>"boolean", "description"=>"Display only those recoveries that are currently on-going", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "detailed", + "active_only", + ] } ), "indices.refresh" => RestApi.new( @@ -1510,14 +1510,14 @@ def initialize url: { path: "/_refresh", paths: ["/_refresh", "/{index}/_refresh"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.rollover" => RestApi.new( @@ -1527,16 +1527,16 @@ def initialize url: { path: "/{alias}/_rollover", paths: ["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"], - parts: { - "alias" => {"type"=>"string", "required"=>true, "description"=>"The name of the alias to rollover"}, - "new_index" => {"type"=>"string", "required"=>false, "description"=>"The name of the rollover index"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "dry_run" => {"type"=>"boolean", "description"=>"If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for on the newly created rollover index before the operation returns."}, - } + parts: [ + "alias", + "new_index", + ], + params: [ + "timeout", + "dry_run", + "master_timeout", + "wait_for_active_shards", + ] } ), "indices.segments" => RestApi.new( @@ -1546,16 +1546,16 @@ def initialize url: { path: "/_segments", paths: ["/_segments", "/{index}/_segments"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "operation_threading" => {"description"=>"TODO: ?"}, - "verbose" => {"type"=>"boolean", "description"=>"Includes detailed memory usage by Lucene.", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "operation_threading", + "verbose", + ] } ), "indices.shard_stores" => RestApi.new( @@ -1565,16 +1565,16 @@ def initialize url: { path: "/_shard_stores", paths: ["/_shard_stores", "/{index}/_shard_stores"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "status" => {"type"=>"list", "options"=>["green", "yellow", "red", "all"], "description"=>"A comma-separated list of statuses used to filter on shards to get store information for"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "operation_threading" => {"description"=>"TODO: ?"}, - } + parts: [ + "index", + ], + params: [ + "status", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "operation_threading", + ] } ), "indices.shrink" => RestApi.new( @@ -1584,15 +1584,15 @@ def initialize url: { path: "/{index}/_shrink/{target}", paths: ["/{index}/_shrink/{target}"], - parts: { - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the source index to shrink"}, - "target" => {"type"=>"string", "required"=>true, "description"=>"The name of the target index to shrink into"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}, - } + parts: [ + "index", + "target", + ], + params: [ + "timeout", + "master_timeout", + "wait_for_active_shards", + ] } ), "indices.stats" => RestApi.new( @@ -1602,19 +1602,19 @@ def initialize url: { path: "/_stats", paths: ["/_stats", "/_stats/{metric}", "/{index}/_stats", "/{index}/_stats/{metric}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - "metric" => {"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "percolate", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned the specific metrics."}, - }, - params: { - "completion_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, - "fielddata_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, - "groups" => {"type"=>"list", "description"=>"A comma-separated list of search groups for `search` index metric"}, - "level" => {"type"=>"enum", "description"=>"Return stats aggregated at cluster, index or shard level", "options"=>["cluster", "indices", "shards"], "default"=>"indices"}, - "types" => {"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, - "include_segment_file_sizes" => {"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}, - } + parts: [ + "index", + "metric", + ], + params: [ + "completion_fields", + "fielddata_fields", + "fields", + "groups", + "level", + "types", + "include_segment_file_sizes", + ] } ), "indices.update_aliases" => RestApi.new( @@ -1624,10 +1624,10 @@ def initialize url: { path: "/_aliases", paths: ["/_aliases"], - params: { - "timeout" => {"type"=>"time", "description"=>"Request timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + params: [ + "timeout", + "master_timeout", + ] } ), "indices.upgrade" => RestApi.new( @@ -1637,16 +1637,16 @@ def initialize url: { path: "/_upgrade", paths: ["/_upgrade", "/{index}/_upgrade"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Specify whether the request should block until the all segments are upgraded (default: false)"}, - "only_ancient_segments" => {"type"=>"boolean", "description"=>"If true, only ancient (an older Lucene major release) segments will be upgraded"}, - } + parts: [ + "index", + ], + params: [ + "allow_no_indices", + "expand_wildcards", + "ignore_unavailable", + "wait_for_completion", + "only_ancient_segments", + ] } ), "indices.validate_query" => RestApi.new( @@ -1656,25 +1656,25 @@ def initialize url: { path: "/_validate/query", paths: ["/_validate/query", "/{index}/_validate/query", "/{index}/{type}/_validate/query"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types"}, - }, - params: { - "explain" => {"type"=>"boolean", "description"=>"Return detailed information about the error"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "operation_threading" => {"description"=>"TODO: ?"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "rewrite" => {"type"=>"boolean", "description"=>"Provide a more detailed explanation showing the actual Lucene query that will be executed."}, - "all_shards" => {"type"=>"boolean", "description"=>"Execute validation on all shards instead of one random shard per index"}, - } + parts: [ + "index", + "type", + ], + params: [ + "explain", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "operation_threading", + "q", + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "lenient", + "rewrite", + "all_shards", + ] } ), "info" => RestApi.new( @@ -1693,13 +1693,13 @@ def initialize url: { path: "/_ingest/pipeline/{id}", paths: ["/_ingest/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Pipeline ID", "required"=>true}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "id", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "ingest.get_pipeline" => RestApi.new( @@ -1709,12 +1709,12 @@ def initialize url: { path: "/_ingest/pipeline/{id}", paths: ["/_ingest/pipeline", "/_ingest/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Comma separated list of pipeline ids. Wildcards supported"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - } + parts: [ + "id", + ], + params: [ + "master_timeout", + ] } ), "ingest.processor_grok" => RestApi.new( @@ -1733,13 +1733,13 @@ def initialize url: { path: "/_ingest/pipeline/{id}", paths: ["/_ingest/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Pipeline ID", "required"=>true}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "id", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "ingest.simulate" => RestApi.new( @@ -1749,12 +1749,12 @@ def initialize url: { path: "/_ingest/pipeline/_simulate", paths: ["/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate"], - parts: { - "id" => {"type"=>"string", "description"=>"Pipeline ID", "required"=>false}, - }, - params: { - "verbose" => {"type"=>"boolean", "description"=>"Verbose mode. Display data output for each processor in executed pipeline", "default"=>false}, - } + parts: [ + "id", + ], + params: [ + "verbose", + ] } ), "mget" => RestApi.new( @@ -1764,20 +1764,20 @@ def initialize url: { path: "/_mget", paths: ["/_mget", "/{index}/_mget", "/{index}/{type}/_mget"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index"}, - "type" => {"type"=>"string", "description"=>"The type of the document"}, - }, - params: { - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - } + parts: [ + "index", + "type", + ], + params: [ + "stored_fields", + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_exclude", + "_source_include", + ] } ), "mpercolate" => RestApi.new( @@ -1787,15 +1787,15 @@ def initialize url: { path: "/_mpercolate", paths: ["/_mpercolate", "/{index}/_mpercolate", "/{index}/{type}/_mpercolate"], - parts: { - "index" => {"type"=>"string", "description"=>"The index of the document being count percolated to use as default"}, - "type" => {"type"=>"string", "description"=>"The type of the document being percolated to use as default."}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + "type", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "msearch" => RestApi.new( @@ -1805,16 +1805,16 @@ def initialize url: { path: "/_msearch", paths: ["/_msearch", "/{index}/_msearch", "/{index}/{type}/_msearch"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to use as default"}, - }, - params: { - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, - "max_concurrent_searches" => {"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "pre_filter_shard_size" => {"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.", "default"=>128}, - } + parts: [ + "index", + "type", + ], + params: [ + "search_type", + "max_concurrent_searches", + "typed_keys", + "pre_filter_shard_size", + ] } ), "msearch_template" => RestApi.new( @@ -1824,15 +1824,15 @@ def initialize url: { path: "/_msearch/template", paths: ["/_msearch/template", "/{index}/_msearch/template", "/{index}/{type}/_msearch/template"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to use as default"}, - }, - params: { - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "max_concurrent_searches" => {"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, - } + parts: [ + "index", + "type", + ], + params: [ + "search_type", + "typed_keys", + "max_concurrent_searches", + ] } ), "mtermvectors" => RestApi.new( @@ -1842,25 +1842,25 @@ def initialize url: { path: "/_mtermvectors", paths: ["/_mtermvectors", "/{index}/_mtermvectors", "/{index}/{type}/_mtermvectors"], - parts: { - "index" => {"type"=>"string", "description"=>"The index in which the document resides."}, - "type" => {"type"=>"string", "description"=>"The type of the document."}, - }, - params: { - "ids" => {"type"=>"list", "description"=>"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", "required"=>false}, - "term_statistics" => {"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>false, "required"=>false}, - "field_statistics" => {"type"=>"boolean", "description"=>"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true, "required"=>false}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, - "offsets" => {"type"=>"boolean", "description"=>"Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true, "required"=>false}, - "positions" => {"type"=>"boolean", "description"=>"Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true, "required"=>false}, - "payloads" => {"type"=>"boolean", "description"=>"Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true, "required"=>false}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, - "routing" => {"type"=>"string", "description"=>"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, - "parent" => {"type"=>"string", "description"=>"Parent id of documents. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, - "realtime" => {"type"=>"boolean", "description"=>"Specifies if requests are real-time as opposed to near-real-time (default: true).", "required"=>false}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "index", + "type", + ], + params: [ + "ids", + "term_statistics", + "field_statistics", + "fields", + "offsets", + "positions", + "payloads", + "preference", + "routing", + "parent", + "realtime", + "version", + "version_type", + ] } ), "nodes.hot_threads" => RestApi.new( @@ -1870,17 +1870,17 @@ def initialize url: { path: "/_nodes/hot_threads", paths: ["/_cluster/nodes/hotthreads", "/_cluster/nodes/hot_threads", "/_cluster/nodes/{node_id}/hotthreads", "/_cluster/nodes/{node_id}/hot_threads", "/_nodes/hotthreads", "/_nodes/hot_threads", "/_nodes/{node_id}/hotthreads", "/_nodes/{node_id}/hot_threads"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - }, - params: { - "interval" => {"type"=>"time", "description"=>"The interval for the second sampling of threads"}, - "snapshots" => {"type"=>"number", "description"=>"Number of samples of thread stacktrace (default: 10)"}, - "threads" => {"type"=>"number", "description"=>"Specify the number of threads to provide information for (default: 3)"}, - "ignore_idle_threads" => {"type"=>"boolean", "description"=>"Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)"}, - "type" => {"type"=>"enum", "options"=>["cpu", "wait", "block"], "description"=>"The type to sample (default: cpu)"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + ], + params: [ + "interval", + "snapshots", + "threads", + "ignore_idle_threads", + "type", + "timeout", + ] } ), "nodes.info" => RestApi.new( @@ -1890,14 +1890,14 @@ def initialize url: { path: "/_nodes", paths: ["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "metric" => {"type"=>"list", "options"=>["settings", "os", "process", "jvm", "thread_pool", "transport", "http", "plugins", "ingest"], "description"=>"A comma-separated list of metrics you wish returned. Leave empty to return all."}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + "metric", + ], + params: [ + "flat_settings", + "timeout", + ] } ), "nodes.stats" => RestApi.new( @@ -1907,21 +1907,21 @@ def initialize url: { path: "/_nodes/stats", paths: ["/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}"], - parts: { - "metric" => {"type"=>"list", "options"=>["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery"], "description"=>"Limit the information returned to the specified metrics"}, - "index_metric" => {"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "percolate", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."}, - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - }, - params: { - "completion_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, - "fielddata_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, - "groups" => {"type"=>"boolean", "description"=>"A comma-separated list of search groups for `search` index metric"}, - "level" => {"type"=>"enum", "description"=>"Return indices stats aggregated at index, node or shard level", "options"=>["indices", "node", "shards"], "default"=>"node"}, - "types" => {"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "include_segment_file_sizes" => {"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}, - } + parts: [ + "metric", + "index_metric", + "node_id", + ], + params: [ + "completion_fields", + "fielddata_fields", + "fields", + "groups", + "level", + "types", + "timeout", + "include_segment_file_sizes", + ] } ), "percolate" => RestApi.new( @@ -1931,25 +1931,25 @@ def initialize url: { path: "/{index}/{type}/_percolate", paths: ["/{index}/{type}/_percolate", "/{index}/{type}/{id}/_percolate"], - parts: { - "index" => {"type"=>"string", "required"=>true, "description"=>"The index of the document being percolated."}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document being percolated."}, - "id" => {"type"=>"string", "required"=>false, "description"=>"Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster."}, - }, - params: { - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "percolate_index" => {"type"=>"string", "description"=>"The index to percolate the document into. Defaults to index."}, - "percolate_type" => {"type"=>"string", "description"=>"The type to percolate document into. Defaults to type."}, - "percolate_routing" => {"type"=>"string", "description"=>"The routing value to use when percolating the existing document."}, - "percolate_preference" => {"type"=>"string", "description"=>"Which shard to prefer when executing the percolate request."}, - "percolate_format" => {"type"=>"enum", "options"=>["ids"], "description"=>"Return an array of matching query IDs instead of objects"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "index", + "type", + "id", + ], + params: [ + "routing", + "preference", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "percolate_index", + "percolate_type", + "percolate_routing", + "percolate_preference", + "percolate_format", + "version", + "version_type", + ] } ), "ping" => RestApi.new( @@ -1968,14 +1968,14 @@ def initialize url: { path: "/_scripts/{lang}", paths: ["/_scripts/{lang}", "/_scripts/{lang}/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Script ID", "required"=>true}, - "lang" => {"type"=>"string", "description"=>"Script language", "required"=>true}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "id", + "lang", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "put_template" => RestApi.new( @@ -1985,9 +1985,9 @@ def initialize url: { path: "/_search/template/{id}", paths: ["/_search/template/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Template ID", "required"=>true}, - }, + parts: [ + "id", + ], } ), "reindex" => RestApi.new( @@ -1997,14 +1997,14 @@ def initialize url: { path: "/_reindex", paths: ["/_reindex"], - params: { - "refresh" => {"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, - "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the reindex is complete."}, - "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, - "slices" => {"type"=>"number", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}, - } + params: [ + "refresh", + "timeout", + "wait_for_active_shards", + "wait_for_completion", + "requests_per_second", + "slices", + ] } ), "reindex_rethrottle" => RestApi.new( @@ -2014,12 +2014,12 @@ def initialize url: { path: "/_reindex/{task_id}/_rethrottle", paths: ["/_reindex/{task_id}/_rethrottle", "/_update_by_query/{task_id}/_rethrottle", "/_delete_by_query/{task_id}/_rethrottle"], - parts: { - "task_id" => {"type"=>"string", "description"=>"The task id to rethrottle"}, - }, - params: { - "requests_per_second" => {"type"=>"number", "required"=>true, "description"=>"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}, - } + parts: [ + "task_id", + ], + params: [ + "requests_per_second", + ] } ), "render_search_template" => RestApi.new( @@ -2029,9 +2029,9 @@ def initialize url: { path: "/_render/template", paths: ["/_render/template", "/_render/template/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The id of the stored search template"}, - }, + parts: [ + "id", + ], } ), "scroll" => RestApi.new( @@ -2041,13 +2041,13 @@ def initialize url: { path: "/_search/scroll", paths: ["/_search/scroll", "/_search/scroll/{scroll_id}"], - parts: { - "scroll_id" => {"type"=>"string", "description"=>"The scroll ID"}, - }, - params: { - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "scroll_id" => {"type"=>"string", "description"=>"The scroll ID for scrolled search"}, - } + parts: [ + "scroll_id", + ], + params: [ + "scroll", + "scroll_id", + ] } ), "search" => RestApi.new( @@ -2057,49 +2057,49 @@ def initialize url: { path: "/_search", paths: ["/_search", "/{index}/_search", "/{index}/{type}/_search"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, - }, - params: { - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "explain" => {"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return as part of a hit"}, - "docvalue_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, - "fielddata_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, - "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "size" => {"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, - "sort" => {"type"=>"list", "description"=>"A comma-separated list of : pairs"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, - "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, - "suggest_field" => {"type"=>"string", "description"=>"Specify which field to use for suggestions"}, - "suggest_mode" => {"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, - "suggest_size" => {"type"=>"number", "description"=>"How many suggestions to return in response"}, - "suggest_text" => {"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "track_scores" => {"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, - "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, - "batched_reduce_size" => {"type"=>"number", "description"=>"The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.", "default"=>512}, - "max_concurrent_shard_requests" => {"type"=>"number", "description"=>"The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>"The default grows with the number of nodes in the cluster but is at most 256."}, - "pre_filter_shard_size" => {"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.", "default"=>128}, - } + parts: [ + "index", + "type", + ], + params: [ + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "explain", + "stored_fields", + "docvalue_fields", + "fielddata_fields", + "from", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "lenient", + "preference", + "q", + "routing", + "scroll", + "search_type", + "size", + "sort", + "_source", + "_source_exclude", + "_source_include", + "terminate_after", + "stats", + "suggest_field", + "suggest_mode", + "suggest_size", + "suggest_text", + "timeout", + "track_scores", + "typed_keys", + "version", + "request_cache", + "batched_reduce_size", + "max_concurrent_shard_requests", + "pre_filter_shard_size", + ] } ), "search_shards" => RestApi.new( @@ -2109,18 +2109,18 @@ def initialize url: { path: "/{index}/{type}/_search_shards", paths: ["/_search_shards", "/{index}/_search_shards", "/{index}/{type}/_search_shards"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, - }, - params: { - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + "type", + ], + params: [ + "preference", + "routing", + "local", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "search_template" => RestApi.new( @@ -2130,22 +2130,22 @@ def initialize url: { path: "/_search/template", paths: ["/_search/template", "/{index}/_search/template", "/{index}/{type}/_search/template"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, - "explain" => {"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, - "profile" => {"type"=>"boolean", "description"=>"Specify whether to profile the query execution"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - } + parts: [ + "index", + "type", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "preference", + "routing", + "scroll", + "search_type", + "explain", + "profile", + "typed_keys", + ] } ), "snapshot.create" => RestApi.new( @@ -2155,14 +2155,14 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], - parts: { - "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, - "snapshot" => {"type"=>"string", "required"=>true, "description"=>"A snapshot name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "wait_for_completion", + ] } ), "snapshot.create_repository" => RestApi.new( @@ -2172,14 +2172,14 @@ def initialize url: { path: "/_snapshot/{repository}", paths: ["/_snapshot/{repository}"], - parts: { - "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "verify" => {"type"=>"boolean", "description"=>"Whether to verify the repository after creation"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "timeout", + "verify", + ] } ), "snapshot.delete" => RestApi.new( @@ -2189,13 +2189,13 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], - parts: { - "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, - "snapshot" => {"type"=>"string", "required"=>true, "description"=>"A snapshot name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + ] } ), "snapshot.delete_repository" => RestApi.new( @@ -2205,13 +2205,13 @@ def initialize url: { path: "/_snapshot/{repository}", paths: ["/_snapshot/{repository}"], - parts: { - "repository" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of repository names"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "snapshot.get" => RestApi.new( @@ -2221,15 +2221,15 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], - parts: { - "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, - "snapshot" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of snapshot names"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}, - "verbose" => {"type"=>"boolean", "description"=>"Whether to show verbose snapshot info or only show the basic info found in the repository index blob"}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "ignore_unavailable", + "verbose", + ] } ), "snapshot.get_repository" => RestApi.new( @@ -2239,13 +2239,13 @@ def initialize url: { path: "/_snapshot", paths: ["/_snapshot", "/_snapshot/{repository}"], - parts: { - "repository" => {"type"=>"list", "description"=>"A comma-separated list of repository names"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "local", + ] } ), "snapshot.restore" => RestApi.new( @@ -2255,14 +2255,14 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}/_restore", paths: ["/_snapshot/{repository}/{snapshot}/_restore"], - parts: { - "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, - "snapshot" => {"type"=>"string", "required"=>true, "description"=>"A snapshot name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "wait_for_completion", + ] } ), "snapshot.status" => RestApi.new( @@ -2272,14 +2272,14 @@ def initialize url: { path: "/_snapshot/_status", paths: ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - "snapshot" => {"type"=>"list", "description"=>"A comma-separated list of snapshot names"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "ignore_unavailable", + ] } ), "snapshot.verify_repository" => RestApi.new( @@ -2289,13 +2289,13 @@ def initialize url: { path: "/_snapshot/{repository}/_verify", paths: ["/_snapshot/{repository}/_verify"], - parts: { - "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "suggest" => RestApi.new( @@ -2305,16 +2305,16 @@ def initialize url: { path: "/_suggest", paths: ["/_suggest", "/{index}/_suggest"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "preference", + "routing", + ] } ), "tasks.cancel" => RestApi.new( @@ -2324,15 +2324,15 @@ def initialize url: { path: "/_tasks", paths: ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"], - parts: { - "task_id" => {"type"=>"string", "description"=>"Cancel the task with specified task id (node_id:task_number)"}, - }, - params: { - "nodes" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be cancelled. Leave empty to cancel all."}, - "parent_node" => {"type"=>"string", "description"=>"Cancel tasks with specified parent node."}, - "parent_task_id" => {"type"=>"string", "description"=>"Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."}, - } + parts: [ + "task_id", + ], + params: [ + "nodes", + "actions", + "parent_node", + "parent_task_id", + ] } ), "tasks.get" => RestApi.new( @@ -2342,13 +2342,12 @@ def initialize url: { path: "/_tasks/{task_id}", paths: ["/_tasks/{task_id}"], - parts: { - "task_id" => {"type"=>"string", "description"=>"Return the task with specified id (node_id:task_number)"}, - }, - params: { - "wait_for_completion" => {"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "task_id", + ], + params: [ + "wait_for_completion", + ] } ), "tasks.list" => RestApi.new( @@ -2358,16 +2357,15 @@ def initialize url: { path: "/_tasks", paths: ["/_tasks"], - params: { - "nodes" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, - "detailed" => {"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, - "parent_node" => {"type"=>"string", "description"=>"Return tasks with specified parent node."}, - "parent_task_id" => {"type"=>"string", "description"=>"Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, - "group_by" => {"type"=>"enum", "description"=>"Group tasks by nodes or parent/child relationships", "options"=>["nodes", "parents"], "default"=>"nodes"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + params: [ + "nodes", + "actions", + "detailed", + "parent_node", + "parent_task_id", + "wait_for_completion", + "group_by", + ] } ), "termvectors" => RestApi.new( @@ -2377,25 +2375,25 @@ def initialize url: { path: "/{index}/{type}/_termvectors", paths: ["/{index}/{type}/_termvectors", "/{index}/{type}/{id}/_termvectors"], - parts: { - "index" => {"type"=>"string", "description"=>"The index in which the document resides.", "required"=>true}, - "type" => {"type"=>"string", "description"=>"The type of the document.", "required"=>true}, - "id" => {"type"=>"string", "description"=>"The id of the document, when not specified a doc param should be supplied."}, - }, - params: { - "term_statistics" => {"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned.", "default"=>false, "required"=>false}, - "field_statistics" => {"type"=>"boolean", "description"=>"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.", "default"=>true, "required"=>false}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return.", "required"=>false}, - "offsets" => {"type"=>"boolean", "description"=>"Specifies if term offsets should be returned.", "default"=>true, "required"=>false}, - "positions" => {"type"=>"boolean", "description"=>"Specifies if term positions should be returned.", "default"=>true, "required"=>false}, - "payloads" => {"type"=>"boolean", "description"=>"Specifies if term payloads should be returned.", "default"=>true, "required"=>false}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random).", "required"=>false}, - "routing" => {"type"=>"string", "description"=>"Specific routing value.", "required"=>false}, - "parent" => {"type"=>"string", "description"=>"Parent id of documents.", "required"=>false}, - "realtime" => {"type"=>"boolean", "description"=>"Specifies if request is real-time as opposed to near-real-time (default: true).", "required"=>false}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, - } + parts: [ + "index", + "type", + "id", + ], + params: [ + "term_statistics", + "field_statistics", + "fields", + "offsets", + "positions", + "payloads", + "preference", + "routing", + "parent", + "realtime", + "version", + "version_type", + ] } ), "update" => RestApi.new( @@ -2405,28 +2403,28 @@ def initialize url: { path: "/{index}/{type}/{id}/_update", paths: ["/{index}/{type}/{id}/_update"], - parts: { - "id" => {"type"=>"string", "required"=>true, "description"=>"Document ID"}, - "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, - "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return in the response"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "lang" => {"type"=>"string", "description"=>"The script language (default: painless)"}, - "parent" => {"type"=>"string", "description"=>"ID of the parent document. Is is only used for routing and when for the upsert request"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "retry_on_conflict" => {"type"=>"number", "description"=>"Specify how many times should the operation be retried when a conflict occurs (default: 0)"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "timestamp" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, - "ttl" => {"type"=>"time", "description"=>"Expiration time for the document"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "force"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + "type", + ], + params: [ + "wait_for_active_shards", + "fields", + "_source", + "_source_exclude", + "_source_include", + "lang", + "parent", + "refresh", + "retry_on_conflict", + "routing", + "timeout", + "timestamp", + "ttl", + "version", + "version_type", + ] } ), "update_by_query" => RestApi.new( @@ -2436,56 +2434,56 @@ def initialize url: { path: "/{index}/_update_by_query", paths: ["/{index}/_update_by_query", "/{index}/{type}/_update_by_query"], - parts: { - "index" => {"required"=>true, "type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, - }, - params: { - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "conflicts" => {"note"=>"This is not copied from search", "type"=>"enum", "options"=>["abort", "proceed"], "default"=>"abort", "description"=>"What to do when the update by query hits version conflicts?"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "pipeline" => {"type"=>"string", "description"=>"Ingest pipeline to set on index requests made by this action. (default: none)"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "search_timeout" => {"type"=>"time", "description"=>"Explicit timeout for each search request. Defaults to no timeout."}, - "size" => {"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, - "sort" => {"type"=>"list", "description"=>"A comma-separated list of : pairs"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, - "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, - "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, - "version_type" => {"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, - "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, - "refresh" => {"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, - "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "scroll_size" => {"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the update_by_query"}, - "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the update by query operation is complete."}, - "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, - "slices" => {"type"=>"number", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}, - } + parts: [ + "index", + "type", + ], + params: [ + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "from", + "ignore_unavailable", + "allow_no_indices", + "conflicts", + "expand_wildcards", + "lenient", + "pipeline", + "preference", + "q", + "routing", + "scroll", + "search_type", + "search_timeout", + "size", + "sort", + "_source", + "_source_exclude", + "_source_include", + "terminate_after", + "stats", + "version", + "version_type", + "request_cache", + "refresh", + "timeout", + "wait_for_active_shards", + "scroll_size", + "wait_for_completion", + "requests_per_second", + "slices", + ] } ), } - @common_params = { - "pretty" => {"type"=>"boolean", "description"=>"Pretty format the returned JSON response.", "default"=>false}, - "human" => {"type"=>"boolean", "description"=>"Return human readable values for statistics.", "default"=>true}, - "error_trace" => {"type"=>"boolean", "description"=>"Include the stack trace of returned errors.", "default"=>false}, - "source" => {"type"=>"string", "description"=>"The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests."}, - "filter_path" => {"type"=>"list", "description"=>"A comma-separated list of filters used to reduce the respone."}, - } + @common_params = [ + "pretty", + "human", + "error_trace", + "source", + "filter_path", + ] super end end diff --git a/lib/elastomer_client/client/rest_api_spec/api_spec_v8_7.rb b/lib/elastomer_client/client/rest_api_spec/api_spec_v8_7.rb index 45c31e95..951cffa9 100644 --- a/lib/elastomer_client/client/rest_api_spec/api_spec_v8_7.rb +++ b/lib/elastomer_client/client/rest_api_spec/api_spec_v8_7.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true # Generated REST API spec file - DO NOT EDIT! -# Date: 2023-05-30 +# Date: 2023-11-30 # ES version: 8.7 module ElastomerClient::Client::RestApiSpec @@ -41,13 +41,13 @@ def initialize url: { path: "/_internal/prevalidate_node_removal", paths: ["/_internal/prevalidate_node_removal"], - params: { - "names" => {"type"=>"list", "description"=>"A comma-separated list of node names to prevalidate"}, - "ids" => {"type"=>"list", "description"=>"A comma-separated list of node IDs to prevalidate"}, - "external_ids" => {"type"=>"list", "description"=>"A comma-separated list of node external IDs to prevalidate"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + params: [ + "names", + "ids", + "external_ids", + "master_timeout", + "timeout", + ] } ), "_internal.update_desired_nodes" => RestApi.new( @@ -57,13 +57,13 @@ def initialize url: { path: "/_internal/desired_nodes/{history_id}/{version}", paths: ["/_internal/desired_nodes/{history_id}/{version}"], - parts: { - "history_id" => {"type"=>"string", "description"=>"the history id"}, - "version" => {"type"=>"integer", "description"=>"the version number"}, - }, - params: { - "dry_run" => {"type"=>"boolean", "description"=>"Simulate the update"}, - } + parts: [ + "history_id", + "version", + ], + params: [ + "dry_run", + ] } ), "async_search.delete" => RestApi.new( @@ -73,9 +73,9 @@ def initialize url: { path: "/_async_search/{id}", paths: ["/_async_search/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, + parts: [ + "id", + ], } ), "async_search.get" => RestApi.new( @@ -85,14 +85,14 @@ def initialize url: { path: "/_async_search/{id}", paths: ["/_async_search/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, - params: { - "wait_for_completion_timeout" => {"type"=>"time", "description"=>"Specify the time that the request should block waiting for the final response"}, - "keep_alive" => {"type"=>"time", "description"=>"Specify the time interval in which the results (partial or final) for this search will be available"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - } + parts: [ + "id", + ], + params: [ + "wait_for_completion_timeout", + "keep_alive", + "typed_keys", + ] } ), "async_search.status" => RestApi.new( @@ -102,9 +102,9 @@ def initialize url: { path: "/_async_search/status/{id}", paths: ["/_async_search/status/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, + parts: [ + "id", + ], } ), "async_search.submit" => RestApi.new( @@ -114,52 +114,52 @@ def initialize url: { path: "/_async_search", paths: ["/_async_search", "/{index}/_async_search"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "wait_for_completion_timeout" => {"type"=>"time", "description"=>"Specify the time that the request should block waiting for the final response", "default"=>"1s"}, - "keep_on_completion" => {"type"=>"boolean", "description"=>"Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)", "default"=>false}, - "keep_alive" => {"type"=>"time", "description"=>"Update the time interval in which the results (partial or final) for this search will be available", "default"=>"5d"}, - "batched_reduce_size" => {"type"=>"number", "description"=>"The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.", "default"=>5}, - "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to true"}, - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "explain" => {"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return as part of a hit"}, - "docvalue_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, - "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "ignore_throttled" => {"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "size" => {"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, - "sort" => {"type"=>"list", "description"=>"A comma-separated list of : pairs"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, - "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, - "suggest_field" => {"type"=>"string", "description"=>"Specify which field to use for suggestions"}, - "suggest_mode" => {"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, - "suggest_size" => {"type"=>"number", "description"=>"How many suggestions to return in response"}, - "suggest_text" => {"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "track_scores" => {"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, - "track_total_hits" => {"type"=>"boolean|long", "description"=>"Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number."}, - "allow_partial_search_results" => {"type"=>"boolean", "default"=>true, "description"=>"Indicate if an error should be returned if there is a partial search failure or timeout"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, - "seq_no_primary_term" => {"type"=>"boolean", "description"=>"Specify whether to return sequence number and primary term of the last modification of each hit"}, - "max_concurrent_shard_requests" => {"type"=>"number", "description"=>"The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>5}, - } + parts: [ + "index", + ], + params: [ + "wait_for_completion_timeout", + "keep_on_completion", + "keep_alive", + "batched_reduce_size", + "request_cache", + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "explain", + "stored_fields", + "docvalue_fields", + "from", + "ignore_unavailable", + "ignore_throttled", + "allow_no_indices", + "expand_wildcards", + "lenient", + "preference", + "q", + "routing", + "search_type", + "size", + "sort", + "_source", + "_source_excludes", + "_source_includes", + "terminate_after", + "stats", + "suggest_field", + "suggest_mode", + "suggest_size", + "suggest_text", + "timeout", + "track_scores", + "track_total_hits", + "allow_partial_search_results", + "typed_keys", + "version", + "seq_no_primary_term", + "max_concurrent_shard_requests", + ] } ), "autoscaling.delete_autoscaling_policy" => RestApi.new( @@ -169,9 +169,9 @@ def initialize url: { path: "/_autoscaling/policy/{name}", paths: ["/_autoscaling/policy/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"the name of the autoscaling policy"}, - }, + parts: [ + "name", + ], } ), "autoscaling.get_autoscaling_capacity" => RestApi.new( @@ -190,9 +190,9 @@ def initialize url: { path: "/_autoscaling/policy/{name}", paths: ["/_autoscaling/policy/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"the name of the autoscaling policy"}, - }, + parts: [ + "name", + ], } ), "autoscaling.put_autoscaling_policy" => RestApi.new( @@ -202,9 +202,9 @@ def initialize url: { path: "/_autoscaling/policy/{name}", paths: ["/_autoscaling/policy/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"the name of the autoscaling policy"}, - }, + parts: [ + "name", + ], } ), "bulk" => RestApi.new( @@ -214,21 +214,21 @@ def initialize url: { path: "/_bulk", paths: ["/_bulk", "/{index}/_bulk"], - parts: { - "index" => {"type"=>"string", "description"=>"Default index for items which don't provide one"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "type" => {"type"=>"string", "description"=>"Default document type for items which don't provide one"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"}, - "_source_excludes" => {"type"=>"list", "description"=>"Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"}, - "_source_includes" => {"type"=>"list", "description"=>"Default list of fields to extract and return from the _source field, can be overridden on each sub-request"}, - "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, - "require_alias" => {"type"=>"boolean", "description"=>"Sets require_alias for all incoming documents. Defaults to unset (false)"}, - } + parts: [ + "index", + ], + params: [ + "wait_for_active_shards", + "refresh", + "routing", + "timeout", + "type", + "_source", + "_source_excludes", + "_source_includes", + "pipeline", + "require_alias", + ] } ), "cat.aliases" => RestApi.new( @@ -238,18 +238,18 @@ def initialize url: { path: "/_cat/aliases", paths: ["/_cat/aliases", "/_cat/aliases/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "name", + ], + params: [ + "format", + "local", + "h", + "help", + "s", + "v", + "expand_wildcards", + ] } ), "cat.allocation" => RestApi.new( @@ -259,19 +259,19 @@ def initialize url: { path: "/_cat/allocation", paths: ["/_cat/allocation", "/_cat/allocation/{node_id}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "node_id", + ], + params: [ + "format", + "bytes", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.component_templates" => RestApi.new( @@ -281,18 +281,18 @@ def initialize url: { path: "/_cat/component_templates", paths: ["/_cat/component_templates", "/_cat/component_templates/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"A pattern that returned component template names must match"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "name", + ], + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.count" => RestApi.new( @@ -302,16 +302,16 @@ def initialize url: { path: "/_cat/count", paths: ["/_cat/count", "/_cat/count/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "h", + "help", + "s", + "v", + ] } ), "cat.fielddata" => RestApi.new( @@ -321,18 +321,18 @@ def initialize url: { path: "/_cat/fielddata", paths: ["/_cat/fielddata", "/_cat/fielddata/{fields}"], - parts: { - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return the fielddata size"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return in the output"}, - } + parts: [ + "fields", + ], + params: [ + "format", + "bytes", + "h", + "help", + "s", + "v", + "fields", + ] } ), "cat.health" => RestApi.new( @@ -342,15 +342,15 @@ def initialize url: { path: "/_cat/health", paths: ["/_cat/health"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "ts" => {"type"=>"boolean", "description"=>"Set to false to disable timestamping", "default"=>true}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "h", + "help", + "s", + "time", + "ts", + "v", + ] } ), "cat.help" => RestApi.new( @@ -360,10 +360,10 @@ def initialize url: { path: "/_cat", paths: ["/_cat"], - params: { - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - } + params: [ + "help", + "s", + ] } ), "cat.indices" => RestApi.new( @@ -373,23 +373,23 @@ def initialize url: { path: "/_cat/indices", paths: ["/_cat/indices", "/_cat/indices/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "health" => {"type"=>"enum", "options"=>["green", "yellow", "red"], "description"=>"A health status (\"green\", \"yellow\", or \"red\" to filter only indices matching the specified health status"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "pri" => {"type"=>"boolean", "description"=>"Set to true to return stats only for primary shards", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - "include_unloaded_segments" => {"type"=>"boolean", "description"=>"If set to true segment stats will include stats for segments that are not currently loaded into memory", "default"=>false}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "format", + "bytes", + "master_timeout", + "h", + "health", + "help", + "pri", + "s", + "time", + "v", + "include_unloaded_segments", + "expand_wildcards", + ] } ), "cat.master" => RestApi.new( @@ -399,15 +399,15 @@ def initialize url: { path: "/_cat/master", paths: ["/_cat/master"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.ml_data_frame_analytics" => RestApi.new( @@ -417,19 +417,19 @@ def initialize url: { path: "/_cat/ml/data_frame/analytics", paths: ["/_cat/ml/data_frame/analytics", "/_cat/ml/data_frame/analytics/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "id", + ], + params: [ + "allow_no_match", + "bytes", + "format", + "h", + "help", + "s", + "time", + "v", + ] } ), "cat.ml_datafeeds" => RestApi.new( @@ -439,18 +439,18 @@ def initialize url: { path: "/_cat/ml/datafeeds", paths: ["/_cat/ml/datafeeds", "/_cat/ml/datafeeds/{datafeed_id}"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeeds stats to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"}, - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "datafeed_id", + ], + params: [ + "allow_no_match", + "format", + "h", + "help", + "s", + "time", + "v", + ] } ), "cat.ml_jobs" => RestApi.new( @@ -460,19 +460,19 @@ def initialize url: { path: "/_cat/ml/anomaly_detectors", paths: ["/_cat/ml/anomaly_detectors", "/_cat/ml/anomaly_detectors/{job_id}"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the jobs stats to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "job_id", + ], + params: [ + "allow_no_match", + "bytes", + "format", + "h", + "help", + "s", + "time", + "v", + ] } ), "cat.ml_trained_models" => RestApi.new( @@ -482,21 +482,21 @@ def initialize url: { path: "/_cat/ml/trained_models", paths: ["/_cat/ml/trained_models", "/_cat/ml/trained_models/{model_id}"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The ID of the trained models stats to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)", "default"=>true}, - "from" => {"type"=>"int", "description"=>"skips a number of trained models", "default"=>0}, - "size" => {"type"=>"int", "description"=>"specifies a max number of trained models to get", "default"=>100}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "model_id", + ], + params: [ + "allow_no_match", + "from", + "size", + "bytes", + "format", + "h", + "help", + "s", + "time", + "v", + ] } ), "cat.nodeattrs" => RestApi.new( @@ -506,15 +506,15 @@ def initialize url: { path: "/_cat/nodeattrs", paths: ["/_cat/nodeattrs"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.nodes" => RestApi.new( @@ -524,18 +524,18 @@ def initialize url: { path: "/_cat/nodes", paths: ["/_cat/nodes"], - params: { - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "full_id" => {"type"=>"boolean", "description"=>"Return the full node ID instead of the shortened version (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - "include_unloaded_segments" => {"type"=>"boolean", "description"=>"If set to true segment stats will include stats for segments that are not currently loaded into memory", "default"=>false}, - } + params: [ + "bytes", + "format", + "full_id", + "master_timeout", + "h", + "help", + "s", + "time", + "v", + "include_unloaded_segments", + ] } ), "cat.pending_tasks" => RestApi.new( @@ -545,16 +545,16 @@ def initialize url: { path: "/_cat/pending_tasks", paths: ["/_cat/pending_tasks"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "time", + "v", + ] } ), "cat.plugins" => RestApi.new( @@ -564,16 +564,16 @@ def initialize url: { path: "/_cat/plugins", paths: ["/_cat/plugins"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "include_bootstrap" => {"type"=>"boolean", "description"=>"Include bootstrap plugins in the response", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "include_bootstrap", + "s", + "v", + ] } ), "cat.recovery" => RestApi.new( @@ -583,21 +583,21 @@ def initialize url: { path: "/_cat/recovery", paths: ["/_cat/recovery", "/_cat/recovery/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"Comma-separated list or wildcard expression of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "active_only" => {"type"=>"boolean", "description"=>"If `true`, the response only includes ongoing shard recoveries", "default"=>false}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "detailed" => {"type"=>"boolean", "description"=>"If `true`, the response includes detailed information about shard recoveries", "default"=>false}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "index" => {"type"=>"list", "description"=>"Comma-separated list or wildcard expression of index names to limit the returned information"}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "active_only", + "bytes", + "detailed", + "h", + "help", + "index", + "s", + "time", + "v", + ] } ), "cat.repositories" => RestApi.new( @@ -607,15 +607,15 @@ def initialize url: { path: "/_cat/repositories", paths: ["/_cat/repositories"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.segments" => RestApi.new( @@ -625,17 +625,17 @@ def initialize url: { path: "/_cat/segments", paths: ["/_cat/segments", "/_cat/segments/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "bytes", + "h", + "help", + "s", + "v", + ] } ), "cat.shards" => RestApi.new( @@ -645,19 +645,19 @@ def initialize url: { path: "/_cat/shards", paths: ["/_cat/shards", "/_cat/shards/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "format", + "bytes", + "master_timeout", + "h", + "help", + "s", + "time", + "v", + ] } ), "cat.snapshots" => RestApi.new( @@ -667,19 +667,19 @@ def initialize url: { path: "/_cat/snapshots", paths: ["/_cat/snapshots", "/_cat/snapshots/{repository}"], - parts: { - "repository" => {"type"=>"list", "description"=>"Name of repository from which to fetch the snapshot information"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Set to true to ignore unavailable snapshots", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "repository", + ], + params: [ + "format", + "ignore_unavailable", + "master_timeout", + "h", + "help", + "s", + "time", + "v", + ] } ), "cat.tasks" => RestApi.new( @@ -689,18 +689,18 @@ def initialize url: { path: "/_cat/tasks", paths: ["/_cat/tasks"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "nodes" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, - "detailed" => {"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, - "parent_task_id" => {"type"=>"string", "description"=>"Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + params: [ + "format", + "nodes", + "actions", + "detailed", + "parent_task_id", + "h", + "help", + "s", + "time", + "v", + ] } ), "cat.templates" => RestApi.new( @@ -710,18 +710,18 @@ def initialize url: { path: "/_cat/templates", paths: ["/_cat/templates", "/_cat/templates/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"A pattern that returned template names must match"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "name", + ], + params: [ + "format", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.thread_pool" => RestApi.new( @@ -731,19 +731,19 @@ def initialize url: { path: "/_cat/thread_pool", paths: ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], - parts: { - "thread_pool_patterns" => {"type"=>"list", "description"=>"A comma-separated list of regular-expressions to filter the thread pools in the output"}, - }, - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "thread_pool_patterns", + ], + params: [ + "format", + "time", + "local", + "master_timeout", + "h", + "help", + "s", + "v", + ] } ), "cat.transforms" => RestApi.new( @@ -753,20 +753,20 @@ def initialize url: { path: "/_cat/transforms", paths: ["/_cat/transforms", "/_cat/transforms/{transform_id}"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id of the transform for which to get stats. '_all' or '*' implies all transforms"}, - }, - params: { - "from" => {"type"=>"int", "required"=>false, "description"=>"skips a number of transform configs, defaults to 0"}, - "size" => {"type"=>"int", "required"=>false, "description"=>"specifies a max number of transforms to get, defaults to 100"}, - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)"}, - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, - "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, - "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, - "time" => {"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, - "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, - } + parts: [ + "transform_id", + ], + params: [ + "from", + "size", + "allow_no_match", + "format", + "h", + "help", + "s", + "time", + "v", + ] } ), "ccr.delete_auto_follow_pattern" => RestApi.new( @@ -776,9 +776,9 @@ def initialize url: { path: "/_ccr/auto_follow/{name}", paths: ["/_ccr/auto_follow/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the auto follow pattern."}, - }, + parts: [ + "name", + ], } ), "ccr.follow" => RestApi.new( @@ -788,12 +788,12 @@ def initialize url: { path: "/{index}/_ccr/follow", paths: ["/{index}/_ccr/follow"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the follower index"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)", "default"=>"0"}, - } + parts: [ + "index", + ], + params: [ + "wait_for_active_shards", + ] } ), "ccr.follow_info" => RestApi.new( @@ -803,9 +803,9 @@ def initialize url: { path: "/{index}/_ccr/info", paths: ["/{index}/_ccr/info"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index patterns; use `_all` to perform the operation on all indices"}, - }, + parts: [ + "index", + ], } ), "ccr.follow_stats" => RestApi.new( @@ -815,9 +815,9 @@ def initialize url: { path: "/{index}/_ccr/stats", paths: ["/{index}/_ccr/stats"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index patterns; use `_all` to perform the operation on all indices"}, - }, + parts: [ + "index", + ], } ), "ccr.forget_follower" => RestApi.new( @@ -827,9 +827,9 @@ def initialize url: { path: "/{index}/_ccr/forget_follower", paths: ["/{index}/_ccr/forget_follower"], - parts: { - "index" => {"type"=>"string", "description"=>"the name of the leader index for which specified follower retention leases should be removed"}, - }, + parts: [ + "index", + ], } ), "ccr.get_auto_follow_pattern" => RestApi.new( @@ -839,9 +839,9 @@ def initialize url: { path: "/_ccr/auto_follow", paths: ["/_ccr/auto_follow", "/_ccr/auto_follow/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the auto follow pattern."}, - }, + parts: [ + "name", + ], } ), "ccr.pause_auto_follow_pattern" => RestApi.new( @@ -851,9 +851,9 @@ def initialize url: { path: "/_ccr/auto_follow/{name}/pause", paths: ["/_ccr/auto_follow/{name}/pause"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the auto follow pattern that should pause discovering new indices to follow."}, - }, + parts: [ + "name", + ], } ), "ccr.pause_follow" => RestApi.new( @@ -863,9 +863,9 @@ def initialize url: { path: "/{index}/_ccr/pause_follow", paths: ["/{index}/_ccr/pause_follow"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the follower index that should pause following its leader index."}, - }, + parts: [ + "index", + ], } ), "ccr.put_auto_follow_pattern" => RestApi.new( @@ -875,9 +875,9 @@ def initialize url: { path: "/_ccr/auto_follow/{name}", paths: ["/_ccr/auto_follow/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the auto follow pattern."}, - }, + parts: [ + "name", + ], } ), "ccr.resume_auto_follow_pattern" => RestApi.new( @@ -887,9 +887,9 @@ def initialize url: { path: "/_ccr/auto_follow/{name}/resume", paths: ["/_ccr/auto_follow/{name}/resume"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the auto follow pattern to resume discovering new indices to follow."}, - }, + parts: [ + "name", + ], } ), "ccr.resume_follow" => RestApi.new( @@ -899,9 +899,9 @@ def initialize url: { path: "/{index}/_ccr/resume_follow", paths: ["/{index}/_ccr/resume_follow"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the follow index to resume following."}, - }, + parts: [ + "index", + ], } ), "ccr.stats" => RestApi.new( @@ -920,9 +920,9 @@ def initialize url: { path: "/{index}/_ccr/unfollow", paths: ["/{index}/_ccr/unfollow"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the follower index that should be turned into a regular index."}, - }, + parts: [ + "index", + ], } ), "clear_scroll" => RestApi.new( @@ -932,9 +932,9 @@ def initialize url: { path: "/_search/scroll", paths: ["/_search/scroll", "/_search/scroll/{scroll_id}"], - parts: { - "scroll_id" => {"type"=>"list", "description"=>"A comma-separated list of scroll IDs to clear", "deprecated"=>true}, - }, + parts: [ + "scroll_id", + ], } ), "close_point_in_time" => RestApi.new( @@ -953,10 +953,10 @@ def initialize url: { path: "/_cluster/allocation/explain", paths: ["/_cluster/allocation/explain"], - params: { - "include_yes_decisions" => {"type"=>"boolean", "description"=>"Return 'YES' decisions in explanation (default: false)"}, - "include_disk_info" => {"type"=>"boolean", "description"=>"Return information about disk usage and shard sizes (default: false)"}, - } + params: [ + "include_yes_decisions", + "include_disk_info", + ] } ), "cluster.delete_component_template" => RestApi.new( @@ -966,13 +966,13 @@ def initialize url: { path: "/_component_template/{name}", paths: ["/_component_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the template"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "cluster.delete_voting_config_exclusions" => RestApi.new( @@ -982,10 +982,10 @@ def initialize url: { path: "/_cluster/voting_config_exclusions", paths: ["/_cluster/voting_config_exclusions"], - params: { - "wait_for_removal" => {"type"=>"boolean", "description"=>"Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.", "default"=>true}, - "master_timeout" => {"type"=>"time", "description"=>"Timeout for submitting request to master", "default"=>"30s"}, - } + params: [ + "wait_for_removal", + "master_timeout", + ] } ), "cluster.exists_component_template" => RestApi.new( @@ -995,13 +995,13 @@ def initialize url: { path: "/_component_template/{name}", paths: ["/_component_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the template"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "master_timeout", + "local", + ] } ), "cluster.get_component_template" => RestApi.new( @@ -1011,13 +1011,13 @@ def initialize url: { path: "/_component_template", paths: ["/_component_template", "/_component_template/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"The comma separated names of the component templates"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "master_timeout", + "local", + ] } ), "cluster.get_settings" => RestApi.new( @@ -1027,12 +1027,12 @@ def initialize url: { path: "/_cluster/settings", paths: ["/_cluster/settings"], - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default clusters setting.", "default"=>false}, - } + params: [ + "flat_settings", + "master_timeout", + "timeout", + "include_defaults", + ] } ), "cluster.health" => RestApi.new( @@ -1042,22 +1042,22 @@ def initialize url: { path: "/_cluster/health", paths: ["/_cluster/health", "/_cluster/health/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"Limit the information returned to a specific index"}, - }, - params: { - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "level" => {"type"=>"enum", "options"=>["cluster", "indices", "shards"], "default"=>"cluster", "description"=>"Specify the level of detail for returned information"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Wait until the specified number of shards is active"}, - "wait_for_nodes" => {"type"=>"string", "description"=>"Wait until the specified number of nodes is available"}, - "wait_for_events" => {"type"=>"enum", "options"=>["immediate", "urgent", "high", "normal", "low", "languid"], "description"=>"Wait until all currently queued events with the given priority are processed"}, - "wait_for_no_relocating_shards" => {"type"=>"boolean", "description"=>"Whether to wait until there are no relocating shards in the cluster"}, - "wait_for_no_initializing_shards" => {"type"=>"boolean", "description"=>"Whether to wait until there are no initializing shards in the cluster"}, - "wait_for_status" => {"type"=>"enum", "options"=>["green", "yellow", "red"], "description"=>"Wait until cluster is in a specific state"}, - } + parts: [ + "index", + ], + params: [ + "expand_wildcards", + "level", + "local", + "master_timeout", + "timeout", + "wait_for_active_shards", + "wait_for_nodes", + "wait_for_events", + "wait_for_no_relocating_shards", + "wait_for_no_initializing_shards", + "wait_for_status", + ] } ), "cluster.pending_tasks" => RestApi.new( @@ -1067,10 +1067,10 @@ def initialize url: { path: "/_cluster/pending_tasks", paths: ["/_cluster/pending_tasks"], - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + params: [ + "local", + "master_timeout", + ] } ), "cluster.post_voting_config_exclusions" => RestApi.new( @@ -1080,12 +1080,12 @@ def initialize url: { path: "/_cluster/voting_config_exclusions", paths: ["/_cluster/voting_config_exclusions"], - params: { - "node_ids" => {"type"=>"string", "description"=>"A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names."}, - "node_names" => {"type"=>"string", "description"=>"A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids."}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout", "default"=>"30s"}, - "master_timeout" => {"type"=>"time", "description"=>"Timeout for submitting request to master", "default"=>"30s"}, - } + params: [ + "node_ids", + "node_names", + "timeout", + "master_timeout", + ] } ), "cluster.put_component_template" => RestApi.new( @@ -1095,14 +1095,14 @@ def initialize url: { path: "/_component_template/{name}", paths: ["/_component_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the template"}, - }, - params: { - "create" => {"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "create", + "timeout", + "master_timeout", + ] } ), "cluster.put_settings" => RestApi.new( @@ -1112,11 +1112,11 @@ def initialize url: { path: "/_cluster/settings", paths: ["/_cluster/settings"], - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + params: [ + "flat_settings", + "master_timeout", + "timeout", + ] } ), "cluster.remote_info" => RestApi.new( @@ -1135,14 +1135,14 @@ def initialize url: { path: "/_cluster/reroute", paths: ["/_cluster/reroute"], - params: { - "dry_run" => {"type"=>"boolean", "description"=>"Simulate the operation only and return the resulting state"}, - "explain" => {"type"=>"boolean", "description"=>"Return an explanation of why the commands can or cannot be executed"}, - "retry_failed" => {"type"=>"boolean", "description"=>"Retries allocation of shards that are blocked due to too many subsequent allocation failures"}, - "metric" => {"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "none", "routing_table", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics. Defaults to all but metadata"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + params: [ + "dry_run", + "explain", + "retry_failed", + "metric", + "master_timeout", + "timeout", + ] } ), "cluster.state" => RestApi.new( @@ -1152,20 +1152,20 @@ def initialize url: { path: "/_cluster/state", paths: ["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], - parts: { - "metric" => {"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics"}, - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "wait_for_metadata_version" => {"type"=>"number", "description"=>"Wait for the metadata version to be equal or greater than the specified metadata version"}, - "wait_for_timeout" => {"type"=>"time", "description"=>"The maximum time to wait for wait_for_metadata_version before timing out"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "metric", + "index", + ], + params: [ + "local", + "master_timeout", + "flat_settings", + "wait_for_metadata_version", + "wait_for_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "cluster.stats" => RestApi.new( @@ -1175,13 +1175,13 @@ def initialize url: { path: "/_cluster/stats", paths: ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + ], + params: [ + "flat_settings", + "timeout", + ] } ), "count" => RestApi.new( @@ -1191,25 +1191,25 @@ def initialize url: { path: "/_count", paths: ["/_count", "/{index}/_count"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of indices to restrict the results"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "ignore_throttled" => {"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "min_score" => {"type"=>"number", "description"=>"Include only documents with a specific `_score` value in the result"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum count for each shard, upon reaching which the query execution will terminate early"}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "ignore_throttled", + "allow_no_indices", + "expand_wildcards", + "min_score", + "preference", + "routing", + "q", + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "lenient", + "terminate_after", + ] } ), "create" => RestApi.new( @@ -1219,19 +1219,19 @@ def initialize url: { path: "/{index}/_create/{id}", paths: ["/{index}/_create/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, - } + parts: [ + "id", + "index", + ], + params: [ + "wait_for_active_shards", + "refresh", + "routing", + "timeout", + "version", + "version_type", + "pipeline", + ] } ), "dangling_indices.delete_dangling_index" => RestApi.new( @@ -1241,14 +1241,14 @@ def initialize url: { path: "/_dangling/{index_uuid}", paths: ["/_dangling/{index_uuid}"], - parts: { - "index_uuid" => {"type"=>"string", "description"=>"The UUID of the dangling index"}, - }, - params: { - "accept_data_loss" => {"type"=>"boolean", "description"=>"Must be set to true in order to delete the dangling index"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index_uuid", + ], + params: [ + "accept_data_loss", + "timeout", + "master_timeout", + ] } ), "dangling_indices.import_dangling_index" => RestApi.new( @@ -1258,14 +1258,14 @@ def initialize url: { path: "/_dangling/{index_uuid}", paths: ["/_dangling/{index_uuid}"], - parts: { - "index_uuid" => {"type"=>"string", "description"=>"The UUID of the dangling index"}, - }, - params: { - "accept_data_loss" => {"type"=>"boolean", "description"=>"Must be set to true in order to import the dangling index"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index_uuid", + ], + params: [ + "accept_data_loss", + "timeout", + "master_timeout", + ] } ), "dangling_indices.list_dangling_indices" => RestApi.new( @@ -1284,20 +1284,20 @@ def initialize url: { path: "/{index}/_doc/{id}", paths: ["/{index}/_doc/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "if_seq_no" => {"type"=>"number", "description"=>"only perform the delete operation if the last operation that has changed the document has the specified sequence number"}, - "if_primary_term" => {"type"=>"number", "description"=>"only perform the delete operation if the last operation that has changed the document has the specified primary term"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + ], + params: [ + "wait_for_active_shards", + "refresh", + "routing", + "timeout", + "if_seq_no", + "if_primary_term", + "version", + "version_type", + ] } ), "delete_by_query" => RestApi.new( @@ -1307,40 +1307,40 @@ def initialize url: { path: "/{index}/_delete_by_query", paths: ["/{index}/_delete_by_query"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "conflicts" => {"type"=>"enum", "options"=>["abort", "proceed"], "default"=>"abort", "description"=>"What to do when the delete by query hits version conflicts?"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "search_timeout" => {"type"=>"time", "description"=>"Explicit timeout for each search request. Defaults to no timeout."}, - "max_docs" => {"type"=>"number", "description"=>"Maximum number of documents to process (default: all documents)"}, - "sort" => {"type"=>"list", "description"=>"A comma-separated list of : pairs"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, - "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, - "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, - "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, - "refresh" => {"type"=>"boolean", "description"=>"Should the affected indexes be refreshed?"}, - "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "scroll_size" => {"type"=>"number", "default"=>100, "description"=>"Size on the scroll request powering the delete by query"}, - "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the delete by query is complete."}, - "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle for this request in sub-requests per second. -1 means no throttle."}, - "slices" => {"type"=>"number|string", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}, - } + parts: [ + "index", + ], + params: [ + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "from", + "ignore_unavailable", + "allow_no_indices", + "conflicts", + "expand_wildcards", + "lenient", + "preference", + "q", + "routing", + "scroll", + "search_type", + "search_timeout", + "max_docs", + "sort", + "terminate_after", + "stats", + "version", + "request_cache", + "refresh", + "timeout", + "wait_for_active_shards", + "scroll_size", + "wait_for_completion", + "requests_per_second", + "slices", + ] } ), "delete_by_query_rethrottle" => RestApi.new( @@ -1350,12 +1350,12 @@ def initialize url: { path: "/_delete_by_query/{task_id}/_rethrottle", paths: ["/_delete_by_query/{task_id}/_rethrottle"], - parts: { - "task_id" => {"type"=>"string", "description"=>"The task id to rethrottle"}, - }, - params: { - "requests_per_second" => {"type"=>"number", "required"=>true, "description"=>"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}, - } + parts: [ + "task_id", + ], + params: [ + "requests_per_second", + ] } ), "delete_script" => RestApi.new( @@ -1365,13 +1365,13 @@ def initialize url: { path: "/_scripts/{id}", paths: ["/_scripts/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Script ID"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "id", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "enrich.delete_policy" => RestApi.new( @@ -1381,9 +1381,9 @@ def initialize url: { path: "/_enrich/policy/{name}", paths: ["/_enrich/policy/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the enrich policy"}, - }, + parts: [ + "name", + ], } ), "enrich.execute_policy" => RestApi.new( @@ -1393,12 +1393,12 @@ def initialize url: { path: "/_enrich/policy/{name}/_execute", paths: ["/_enrich/policy/{name}/_execute"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the enrich policy"}, - }, - params: { - "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the execution is complete."}, - } + parts: [ + "name", + ], + params: [ + "wait_for_completion", + ] } ), "enrich.get_policy" => RestApi.new( @@ -1408,9 +1408,9 @@ def initialize url: { path: "/_enrich/policy/{name}", paths: ["/_enrich/policy/{name}", "/_enrich/policy"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of enrich policy names"}, - }, + parts: [ + "name", + ], } ), "enrich.put_policy" => RestApi.new( @@ -1420,9 +1420,9 @@ def initialize url: { path: "/_enrich/policy/{name}", paths: ["/_enrich/policy/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the enrich policy"}, - }, + parts: [ + "name", + ], } ), "enrich.stats" => RestApi.new( @@ -1441,9 +1441,9 @@ def initialize url: { path: "/_eql/search/{id}", paths: ["/_eql/search/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, + parts: [ + "id", + ], } ), "eql.get" => RestApi.new( @@ -1453,13 +1453,13 @@ def initialize url: { path: "/_eql/search/{id}", paths: ["/_eql/search/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, - params: { - "wait_for_completion_timeout" => {"type"=>"time", "description"=>"Specify the time that the request should block waiting for the final response"}, - "keep_alive" => {"type"=>"time", "description"=>"Update the time interval in which the results (partial or final) for this search will be available", "default"=>"5d"}, - } + parts: [ + "id", + ], + params: [ + "wait_for_completion_timeout", + "keep_alive", + ] } ), "eql.get_status" => RestApi.new( @@ -1469,9 +1469,9 @@ def initialize url: { path: "/_eql/search/status/{id}", paths: ["/_eql/search/status/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, + parts: [ + "id", + ], } ), "eql.search" => RestApi.new( @@ -1481,14 +1481,14 @@ def initialize url: { path: "/{index}/_eql/search", paths: ["/{index}/_eql/search"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index to scope the operation"}, - }, - params: { - "wait_for_completion_timeout" => {"type"=>"time", "description"=>"Specify the time that the request should block waiting for the final response"}, - "keep_on_completion" => {"type"=>"boolean", "description"=>"Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)", "default"=>false}, - "keep_alive" => {"type"=>"time", "description"=>"Update the time interval in which the results (partial or final) for this search will be available", "default"=>"5d"}, - } + parts: [ + "index", + ], + params: [ + "wait_for_completion_timeout", + "keep_on_completion", + "keep_alive", + ] } ), "exists" => RestApi.new( @@ -1498,22 +1498,22 @@ def initialize url: { path: "/{index}/_doc/{id}", paths: ["/{index}/_doc/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + ], + params: [ + "stored_fields", + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_excludes", + "_source_includes", + "version", + "version_type", + ] } ), "exists_source" => RestApi.new( @@ -1523,21 +1523,21 @@ def initialize url: { path: "/{index}/_source/{id}", paths: ["/{index}/_source/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + ], + params: [ + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_excludes", + "_source_includes", + "version", + "version_type", + ] } ), "explain" => RestApi.new( @@ -1547,24 +1547,24 @@ def initialize url: { path: "/{index}/_explain/{id}", paths: ["/{index}/_explain/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)"}, - "analyzer" => {"type"=>"string", "description"=>"The analyzer for the query string query"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The default field for query string query (default: _all)"}, - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - } + parts: [ + "id", + "index", + ], + params: [ + "analyze_wildcard", + "analyzer", + "default_operator", + "df", + "stored_fields", + "lenient", + "preference", + "q", + "routing", + "_source", + "_source_excludes", + "_source_includes", + ] } ), "features.get_features" => RestApi.new( @@ -1574,9 +1574,9 @@ def initialize url: { path: "/_features", paths: ["/_features"], - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - } + params: [ + "master_timeout", + ] } ), "features.reset_features" => RestApi.new( @@ -1595,18 +1595,18 @@ def initialize url: { path: "/_field_caps", paths: ["/_field_caps", "/{index}/_field_caps"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "fields" => {"type"=>"list", "description"=>"A comma-separated list of field names"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "include_unmapped" => {"type"=>"boolean", "default"=>false, "description"=>"Indicates whether unmapped fields should be included in the response."}, - "filters" => {"type"=>"list", "description"=>"An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent"}, - "types" => {"type"=>"list", "description"=>"Only return results for fields that have one of the types in the list"}, - } + parts: [ + "index", + ], + params: [ + "fields", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "include_unmapped", + "filters", + "types", + ] } ), "fleet.global_checkpoints" => RestApi.new( @@ -1616,15 +1616,15 @@ def initialize url: { path: "/{index}/_fleet/global_checkpoints", paths: ["/{index}/_fleet/global_checkpoints"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index."}, - }, - params: { - "wait_for_advance" => {"type"=>"boolean", "description"=>"Whether to wait for the global checkpoint to advance past the specified current checkpoints", "default"=>"false"}, - "wait_for_index" => {"type"=>"boolean", "description"=>"Whether to wait for the target index to exist and all primary shards be active", "default"=>"false"}, - "checkpoints" => {"type"=>"list", "description"=>"Comma separated list of checkpoints", "default"=>""}, - "timeout" => {"type"=>"time", "description"=>"Timeout to wait for global checkpoint to advance", "default"=>"30s"}, - } + parts: [ + "index", + ], + params: [ + "wait_for_advance", + "wait_for_index", + "checkpoints", + "timeout", + ] } ), "fleet.msearch" => RestApi.new( @@ -1634,9 +1634,9 @@ def initialize url: { path: "/_fleet/_fleet_msearch", paths: ["/_fleet/_fleet_msearch", "/{index}/_fleet/_fleet_msearch"], - parts: { - "index" => {"type"=>"string", "description"=>"The index name to use as the default"}, - }, + parts: [ + "index", + ], } ), "fleet.search" => RestApi.new( @@ -1646,14 +1646,14 @@ def initialize url: { path: "/{index}/_fleet/_fleet_search", paths: ["/{index}/_fleet/_fleet_search"], - parts: { - "index" => {"type"=>"string", "description"=>"The index name to search."}, - }, - params: { - "wait_for_checkpoints" => {"type"=>"list", "description"=>"Comma separated list of checkpoints, one per shard", "default"=>""}, - "wait_for_checkpoints_timeout" => {"type"=>"time", "description"=>"Explicit wait_for_checkpoints timeout"}, - "allow_partial_search_results" => {"type"=>"boolean", "default"=>true, "description"=>"Indicate if an error should be returned if there is a partial search failure or timeout"}, - } + parts: [ + "index", + ], + params: [ + "wait_for_checkpoints", + "wait_for_checkpoints_timeout", + "allow_partial_search_results", + ] } ), "get" => RestApi.new( @@ -1663,23 +1663,23 @@ def initialize url: { path: "/{index}/_doc/{id}", paths: ["/{index}/_doc/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "force_synthetic_source" => {"type"=>"boolean", "description"=>"Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.", "visibility"=>"feature_flag", "feature_flag"=>"es.index_mode_feature_flag_registered"}, - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + ], + params: [ + "force_synthetic_source", + "stored_fields", + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_excludes", + "_source_includes", + "version", + "version_type", + ] } ), "get_script" => RestApi.new( @@ -1689,12 +1689,12 @@ def initialize url: { path: "/_scripts/{id}", paths: ["/_scripts/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Script ID"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "id", + ], + params: [ + "master_timeout", + ] } ), "get_script_context" => RestApi.new( @@ -1722,21 +1722,21 @@ def initialize url: { path: "/{index}/_source/{id}", paths: ["/{index}/_source/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - } + parts: [ + "id", + "index", + ], + params: [ + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_excludes", + "_source_includes", + "version", + "version_type", + ] } ), "graph.explore" => RestApi.new( @@ -1746,13 +1746,13 @@ def initialize url: { path: "/{index}/_graph/explore", paths: ["/{index}/_graph/explore"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "index", + ], + params: [ + "routing", + "timeout", + ] } ), "health_report" => RestApi.new( @@ -1762,14 +1762,14 @@ def initialize url: { path: "/_health_report", paths: ["/_health_report", "/_health_report/{feature}"], - parts: { - "feature" => {"type"=>"string", "description"=>"A feature of the cluster, as returned by the top-level health API"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "verbose" => {"type"=>"boolean", "description"=>"Opt in for more information about the health of the system", "default"=>true}, - "size" => {"type"=>"int", "description"=>"Limit the number of affected resources the health API returns", "default"=>1000}, - } + parts: [ + "feature", + ], + params: [ + "timeout", + "verbose", + "size", + ] } ), "ilm.delete_lifecycle" => RestApi.new( @@ -1779,9 +1779,9 @@ def initialize url: { path: "/_ilm/policy/{policy}", paths: ["/_ilm/policy/{policy}"], - parts: { - "policy" => {"type"=>"string", "description"=>"The name of the index lifecycle policy"}, - }, + parts: [ + "policy", + ], } ), "ilm.explain_lifecycle" => RestApi.new( @@ -1791,13 +1791,13 @@ def initialize url: { path: "/{index}/_ilm/explain", paths: ["/{index}/_ilm/explain"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index to explain"}, - }, - params: { - "only_managed" => {"type"=>"boolean", "description"=>"filters the indices included in the response to ones managed by ILM"}, - "only_errors" => {"type"=>"boolean", "description"=>"filters the indices included in the response to ones in an ILM error state, implies only_managed"}, - } + parts: [ + "index", + ], + params: [ + "only_managed", + "only_errors", + ] } ), "ilm.get_lifecycle" => RestApi.new( @@ -1807,9 +1807,9 @@ def initialize url: { path: "/_ilm/policy/{policy}", paths: ["/_ilm/policy/{policy}", "/_ilm/policy"], - parts: { - "policy" => {"type"=>"string", "description"=>"The name of the index lifecycle policy"}, - }, + parts: [ + "policy", + ], } ), "ilm.get_status" => RestApi.new( @@ -1828,9 +1828,9 @@ def initialize url: { path: "/_ilm/migrate_to_data_tiers", paths: ["/_ilm/migrate_to_data_tiers"], - params: { - "dry_run" => {"type"=>"boolean", "description"=>"If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false"}, - } + params: [ + "dry_run", + ] } ), "ilm.move_to_step" => RestApi.new( @@ -1840,9 +1840,9 @@ def initialize url: { path: "/_ilm/move/{index}", paths: ["/_ilm/move/{index}"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index whose lifecycle step is to change"}, - }, + parts: [ + "index", + ], } ), "ilm.put_lifecycle" => RestApi.new( @@ -1852,9 +1852,9 @@ def initialize url: { path: "/_ilm/policy/{policy}", paths: ["/_ilm/policy/{policy}"], - parts: { - "policy" => {"type"=>"string", "description"=>"The name of the index lifecycle policy"}, - }, + parts: [ + "policy", + ], } ), "ilm.remove_policy" => RestApi.new( @@ -1864,9 +1864,9 @@ def initialize url: { path: "/{index}/_ilm/remove", paths: ["/{index}/_ilm/remove"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index to remove policy on"}, - }, + parts: [ + "index", + ], } ), "ilm.retry" => RestApi.new( @@ -1876,9 +1876,9 @@ def initialize url: { path: "/{index}/_ilm/retry", paths: ["/{index}/_ilm/retry"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the indices (comma-separated) whose failed lifecycle step is to be retry"}, - }, + parts: [ + "index", + ], } ), "ilm.start" => RestApi.new( @@ -1906,23 +1906,23 @@ def initialize url: { path: "/{index}/_doc/{id}", paths: ["/{index}/_doc/{id}", "/{index}/_doc"], - parts: { - "id" => {"type"=>"string", "description"=>"Document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "op_type" => {"type"=>"enum", "options"=>["index", "create"], "description"=>"Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - "if_seq_no" => {"type"=>"number", "description"=>"only perform the index operation if the last operation that has changed the document has the specified sequence number"}, - "if_primary_term" => {"type"=>"number", "description"=>"only perform the index operation if the last operation that has changed the document has the specified primary term"}, - "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, - "require_alias" => {"type"=>"boolean", "description"=>"When true, requires destination to be an alias. Default is false"}, - } + parts: [ + "id", + "index", + ], + params: [ + "wait_for_active_shards", + "op_type", + "refresh", + "routing", + "timeout", + "version", + "version_type", + "if_seq_no", + "if_primary_term", + "pipeline", + "require_alias", + ] } ), "indices.add_block" => RestApi.new( @@ -1932,17 +1932,17 @@ def initialize url: { path: "/{index}/_block/{block}", paths: ["/{index}/_block/{block}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma separated list of indices to add a block to"}, - "block" => {"type"=>"string", "description"=>"The block to add (one of read, write, read_only or metadata)"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + "block", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.analyze" => RestApi.new( @@ -1952,12 +1952,12 @@ def initialize url: { path: "/_analyze", paths: ["/_analyze", "/{index}/_analyze"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index to scope the operation"}, - }, - params: { - "index" => {"type"=>"string", "description"=>"The name of the index to scope the operation"}, - } + parts: [ + "index", + ], + params: [ + "index", + ] } ), "indices.clear_cache" => RestApi.new( @@ -1967,19 +1967,19 @@ def initialize url: { path: "/_cache/clear", paths: ["/_cache/clear", "/{index}/_cache/clear"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, - }, - params: { - "fielddata" => {"type"=>"boolean", "description"=>"Clear field data"}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)"}, - "query" => {"type"=>"boolean", "description"=>"Clear query caches"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "index" => {"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, - "request" => {"type"=>"boolean", "description"=>"Clear request cache"}, - } + parts: [ + "index", + ], + params: [ + "fielddata", + "fields", + "query", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "index", + "request", + ] } ), "indices.clone" => RestApi.new( @@ -1989,15 +1989,15 @@ def initialize url: { path: "/{index}/_clone/{target}", paths: ["/{index}/_clone/{target}"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the source index to clone"}, - "target" => {"type"=>"string", "description"=>"The name of the target index to clone into"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for on the cloned index before the operation returns."}, - } + parts: [ + "index", + "target", + ], + params: [ + "timeout", + "master_timeout", + "wait_for_active_shards", + ] } ), "indices.close" => RestApi.new( @@ -2007,17 +2007,17 @@ def initialize url: { path: "/{index}/_close", paths: ["/{index}/_close"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma separated list of indices to close"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of active shards to wait for before the operation returns."}, - } + parts: [ + "index", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "wait_for_active_shards", + ] } ), "indices.create" => RestApi.new( @@ -2027,14 +2027,14 @@ def initialize url: { path: "/{index}", paths: ["/{index}"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for before the operation returns."}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index", + ], + params: [ + "wait_for_active_shards", + "timeout", + "master_timeout", + ] } ), "indices.create_data_stream" => RestApi.new( @@ -2044,9 +2044,9 @@ def initialize url: { path: "/_data_stream/{name}", paths: ["/_data_stream/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the data stream"}, - }, + parts: [ + "name", + ], } ), "indices.data_streams_stats" => RestApi.new( @@ -2056,9 +2056,9 @@ def initialize url: { path: "/_data_stream/_stats", paths: ["/_data_stream/_stats", "/_data_stream/{name}/_stats"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams"}, - }, + parts: [ + "name", + ], } ), "indices.delete" => RestApi.new( @@ -2068,16 +2068,16 @@ def initialize url: { path: "/{index}", paths: ["/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open,closed", "description"=>"Whether wildcard expressions should get expanded to open, closed, or hidden indices"}, - } + parts: [ + "index", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.delete_alias" => RestApi.new( @@ -2087,14 +2087,14 @@ def initialize url: { path: "/{index}/_alias/{name}", paths: ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names (supports wildcards); use `_all` for all indices"}, - "name" => {"type"=>"list", "description"=>"A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index", + "name", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "indices.delete_data_stream" => RestApi.new( @@ -2104,12 +2104,12 @@ def initialize url: { path: "/_data_stream/{name}", paths: ["/_data_stream/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of data streams to delete; use `*` to delete all data streams"}, - }, - params: { - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, - } + parts: [ + "name", + ], + params: [ + "expand_wildcards", + ] } ), "indices.delete_index_template" => RestApi.new( @@ -2119,13 +2119,13 @@ def initialize url: { path: "/_index_template/{name}", paths: ["/_index_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the template"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "indices.delete_template" => RestApi.new( @@ -2135,13 +2135,13 @@ def initialize url: { path: "/_template/{name}", paths: ["/_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the template"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "indices.disk_usage" => RestApi.new( @@ -2151,16 +2151,16 @@ def initialize url: { path: "/{index}/_disk_usage", paths: ["/{index}/_disk_usage"], - parts: { - "index" => {"type"=>"string", "description"=>"Comma-separated list of indices or data streams to analyze the disk usage"}, - }, - params: { - "run_expensive_tasks" => {"type"=>"boolean", "description"=>"Must be set to [true] in order for the task to be performed. Defaults to false."}, - "flush" => {"type"=>"boolean", "description"=>"Whether flush or not before analyzing the index disk usage. Defaults to true"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "run_expensive_tasks", + "flush", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.downsample" => RestApi.new( @@ -2170,10 +2170,10 @@ def initialize url: { path: "/{index}/_downsample/{target_index}", paths: ["/{index}/_downsample/{target_index}"], - parts: { - "index" => {"type"=>"string", "description"=>"The index to downsample", "required"=>true}, - "target_index" => {"type"=>"string", "description"=>"The name of the target index to store downsampled data", "required"=>true}, - }, + parts: [ + "index", + "target_index", + ], } ), "indices.exists" => RestApi.new( @@ -2183,17 +2183,17 @@ def initialize url: { path: "/{index}", paths: ["/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, - }, - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "local", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "flat_settings", + "include_defaults", + ] } ), "indices.exists_alias" => RestApi.new( @@ -2203,16 +2203,16 @@ def initialize url: { path: "/_alias/{name}", paths: ["/_alias/{name}", "/{index}/_alias/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "local", + ] } ), "indices.exists_index_template" => RestApi.new( @@ -2222,14 +2222,14 @@ def initialize url: { path: "/_index_template/{name}", paths: ["/_index_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the template"}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "flat_settings", + "master_timeout", + "local", + ] } ), "indices.exists_template" => RestApi.new( @@ -2239,14 +2239,14 @@ def initialize url: { path: "/_template/{name}", paths: ["/_template/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"The comma separated names of the index templates"}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "flat_settings", + "master_timeout", + "local", + ] } ), "indices.field_usage_stats" => RestApi.new( @@ -2256,15 +2256,15 @@ def initialize url: { path: "/{index}/_field_usage_stats", paths: ["/{index}/_field_usage_stats"], - parts: { - "index" => {"type"=>"string", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "fields", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.flush" => RestApi.new( @@ -2274,16 +2274,16 @@ def initialize url: { path: "/_flush", paths: ["/_flush", "/{index}/_flush"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string for all indices"}, - }, - params: { - "force" => {"type"=>"boolean", "description"=>"Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)"}, - "wait_if_ongoing" => {"type"=>"boolean", "description"=>"If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running."}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "force", + "wait_if_ongoing", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.forcemerge" => RestApi.new( @@ -2293,18 +2293,18 @@ def initialize url: { path: "/_forcemerge", paths: ["/_forcemerge", "/{index}/_forcemerge"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "flush" => {"type"=>"boolean", "description"=>"Specify whether the index should be flushed after performing the operation (default: true)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "max_num_segments" => {"type"=>"number", "description"=>"The number of segments the index should be merged into (default: dynamic)"}, - "only_expunge_deletes" => {"type"=>"boolean", "description"=>"Specify whether the operation should only expunge deleted documents"}, - "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request wait until the force merge is completed."}, - } + parts: [ + "index", + ], + params: [ + "flush", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "max_num_segments", + "only_expunge_deletes", + "wait_for_completion", + ] } ), "indices.get" => RestApi.new( @@ -2314,19 +2314,19 @@ def initialize url: { path: "/{index}", paths: ["/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, - }, - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, - "features" => {"type"=>"enum", "options"=>["aliases", "mappings", "settings"], "default"=>"aliases,mappings,settings", "description"=>"Return only information on specified index features"}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index", + ], + params: [ + "local", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "features", + "flat_settings", + "include_defaults", + "master_timeout", + ] } ), "indices.get_alias" => RestApi.new( @@ -2336,16 +2336,16 @@ def initialize url: { path: "/_alias", paths: ["/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "local", + ] } ), "indices.get_data_stream" => RestApi.new( @@ -2355,12 +2355,12 @@ def initialize url: { path: "/_data_stream", paths: ["/_data_stream", "/_data_stream/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of data streams to get; use `*` to get all data streams"}, - }, - params: { - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, - } + parts: [ + "name", + ], + params: [ + "expand_wildcards", + ] } ), "indices.get_field_mapping" => RestApi.new( @@ -2370,17 +2370,17 @@ def initialize url: { path: "/_mapping/field/{fields}", paths: ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}"], - parts: { - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields"}, - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, - }, - params: { - "include_defaults" => {"type"=>"boolean", "description"=>"Whether the default mapping values should be returned as well"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "fields", + "index", + ], + params: [ + "include_defaults", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "local", + ] } ), "indices.get_index_template" => RestApi.new( @@ -2390,14 +2390,14 @@ def initialize url: { path: "/_index_template", paths: ["/_index_template", "/_index_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"A pattern that returned template names must match"}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "flat_settings", + "master_timeout", + "local", + ] } ), "indices.get_mapping" => RestApi.new( @@ -2407,16 +2407,16 @@ def initialize url: { path: "/_mapping", paths: ["/_mapping", "/{index}/_mapping"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)", "deprecated"=>{"version"=>"7.8.0", "description"=>"This parameter is a no-op and field mappings are always retrieved locally."}}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "master_timeout", + "local", + ] } ), "indices.get_settings" => RestApi.new( @@ -2426,19 +2426,19 @@ def initialize url: { path: "/_settings", paths: ["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - "name" => {"type"=>"list", "description"=>"The name of the settings that should be included"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, - } + parts: [ + "index", + "name", + ], + params: [ + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "flat_settings", + "local", + "include_defaults", + ] } ), "indices.get_template" => RestApi.new( @@ -2448,14 +2448,14 @@ def initialize url: { path: "/_template", paths: ["/_template", "/_template/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"The comma separated names of the index templates"}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "name", + ], + params: [ + "flat_settings", + "master_timeout", + "local", + ] } ), "indices.migrate_to_data_stream" => RestApi.new( @@ -2465,9 +2465,9 @@ def initialize url: { path: "/_data_stream/_migrate/{name}", paths: ["/_data_stream/_migrate/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the alias to migrate"}, - }, + parts: [ + "name", + ], } ), "indices.modify_data_stream" => RestApi.new( @@ -2486,17 +2486,17 @@ def initialize url: { path: "/{index}/_open", paths: ["/{index}/_open"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma separated list of indices to open"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"closed", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of active shards to wait for before the operation returns."}, - } + parts: [ + "index", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "wait_for_active_shards", + ] } ), "indices.promote_data_stream" => RestApi.new( @@ -2506,9 +2506,9 @@ def initialize url: { path: "/_data_stream/_promote/{name}", paths: ["/_data_stream/_promote/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the data stream"}, - }, + parts: [ + "name", + ], } ), "indices.put_alias" => RestApi.new( @@ -2518,14 +2518,14 @@ def initialize url: { path: "/{index}/_alias/{name}", paths: ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."}, - "name" => {"type"=>"string", "description"=>"The name of the alias to be created or updated"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "index", + "name", + ], + params: [ + "timeout", + "master_timeout", + ] } ), "indices.put_index_template" => RestApi.new( @@ -2535,14 +2535,14 @@ def initialize url: { path: "/_index_template/{name}", paths: ["/_index_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the template"}, - }, - params: { - "create" => {"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, - "cause" => {"type"=>"string", "description"=>"User defined reason for creating/updating the index template", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "create", + "cause", + "master_timeout", + ] } ), "indices.put_mapping" => RestApi.new( @@ -2552,17 +2552,17 @@ def initialize url: { path: "/{index}/_mapping", paths: ["/{index}/_mapping"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "write_index_only" => {"type"=>"boolean", "default"=>false, "description"=>"When true, applies mappings only to the write index of an alias or data stream"}, - } + parts: [ + "index", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "write_index_only", + ] } ), "indices.put_settings" => RestApi.new( @@ -2572,18 +2572,18 @@ def initialize url: { path: "/_settings", paths: ["/_settings", "/{index}/_settings"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "preserve_existing" => {"type"=>"boolean", "description"=>"Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - } + parts: [ + "index", + ], + params: [ + "master_timeout", + "timeout", + "preserve_existing", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "flat_settings", + ] } ), "indices.put_template" => RestApi.new( @@ -2593,14 +2593,14 @@ def initialize url: { path: "/_template/{name}", paths: ["/_template/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the template"}, - }, - params: { - "order" => {"type"=>"number", "description"=>"The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)"}, - "create" => {"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "order", + "create", + "master_timeout", + ] } ), "indices.recovery" => RestApi.new( @@ -2610,13 +2610,13 @@ def initialize url: { path: "/_recovery", paths: ["/_recovery", "/{index}/_recovery"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "detailed" => {"type"=>"boolean", "description"=>"Whether to display detailed information about shard recovery", "default"=>false}, - "active_only" => {"type"=>"boolean", "description"=>"Display only those recoveries that are currently on-going", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "detailed", + "active_only", + ] } ), "indices.refresh" => RestApi.new( @@ -2626,14 +2626,14 @@ def initialize url: { path: "/_refresh", paths: ["/_refresh", "/{index}/_refresh"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.reload_search_analyzers" => RestApi.new( @@ -2643,14 +2643,14 @@ def initialize url: { path: "/{index}/_reload_search_analyzers", paths: ["/{index}/_reload_search_analyzers"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to reload analyzers for"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.resolve_index" => RestApi.new( @@ -2660,12 +2660,12 @@ def initialize url: { path: "/_resolve/index/{name}", paths: ["/_resolve/index/{name}"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of names or wildcard expressions"}, - }, - params: { - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, - } + parts: [ + "name", + ], + params: [ + "expand_wildcards", + ] } ), "indices.rollover" => RestApi.new( @@ -2675,16 +2675,16 @@ def initialize url: { path: "/{alias}/_rollover", paths: ["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"], - parts: { - "alias" => {"type"=>"string", "description"=>"The name of the alias to rollover"}, - "new_index" => {"type"=>"string", "description"=>"The name of the rollover index"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "dry_run" => {"type"=>"boolean", "description"=>"If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for on the newly created rollover index before the operation returns."}, - } + parts: [ + "alias", + "new_index", + ], + params: [ + "timeout", + "dry_run", + "master_timeout", + "wait_for_active_shards", + ] } ), "indices.segments" => RestApi.new( @@ -2694,15 +2694,15 @@ def initialize url: { path: "/_segments", paths: ["/_segments", "/{index}/_segments"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "verbose" => {"type"=>"boolean", "description"=>"Includes detailed memory usage by Lucene.", "default"=>false, "deprecated"=>{"version"=>"8.0.0", "description"=>"lucene no longer keeps track of segment memory overhead as it is largely off-heap"}}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "verbose", + ] } ), "indices.shard_stores" => RestApi.new( @@ -2712,15 +2712,15 @@ def initialize url: { path: "/_shard_stores", paths: ["/_shard_stores", "/{index}/_shard_stores"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "status" => {"type"=>"list", "options"=>["green", "yellow", "red", "all"], "description"=>"A comma-separated list of statuses used to filter on shards to get store information for"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "status", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "indices.shrink" => RestApi.new( @@ -2730,15 +2730,15 @@ def initialize url: { path: "/{index}/_shrink/{target}", paths: ["/{index}/_shrink/{target}"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the source index to shrink"}, - "target" => {"type"=>"string", "description"=>"The name of the target index to shrink into"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}, - } + parts: [ + "index", + "target", + ], + params: [ + "timeout", + "master_timeout", + "wait_for_active_shards", + ] } ), "indices.simulate_index_template" => RestApi.new( @@ -2748,14 +2748,14 @@ def initialize url: { path: "/_index_template/_simulate_index/{name}", paths: ["/_index_template/_simulate_index/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the index (it must be a concrete index name)"}, - }, - params: { - "create" => {"type"=>"boolean", "description"=>"Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one", "default"=>false}, - "cause" => {"type"=>"string", "description"=>"User defined reason for dry-run creating the new template for simulation purposes", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "create", + "cause", + "master_timeout", + ] } ), "indices.simulate_template" => RestApi.new( @@ -2765,14 +2765,14 @@ def initialize url: { path: "/_index_template/_simulate", paths: ["/_index_template/_simulate", "/_index_template/_simulate/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"The name of the index template"}, - }, - params: { - "create" => {"type"=>"boolean", "description"=>"Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one", "default"=>false}, - "cause" => {"type"=>"string", "description"=>"User defined reason for dry-run creating the new template for simulation purposes", "default"=>false}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + parts: [ + "name", + ], + params: [ + "create", + "cause", + "master_timeout", + ] } ), "indices.split" => RestApi.new( @@ -2782,15 +2782,15 @@ def initialize url: { path: "/{index}/_split/{target}", paths: ["/{index}/_split/{target}"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the source index to split"}, - "target" => {"type"=>"string", "description"=>"The name of the target index to split into"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}, - } + parts: [ + "index", + "target", + ], + params: [ + "timeout", + "master_timeout", + "wait_for_active_shards", + ] } ), "indices.stats" => RestApi.new( @@ -2800,21 +2800,21 @@ def initialize url: { path: "/_stats", paths: ["/_stats", "/_stats/{metric}", "/{index}/_stats", "/{index}/_stats/{metric}"], - parts: { - "metric" => {"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "bulk"], "description"=>"Limit the information returned the specific metrics."}, - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "completion_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for the `completion` index metric (supports wildcards)"}, - "fielddata_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for the `fielddata` index metric (supports wildcards)"}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, - "groups" => {"type"=>"list", "description"=>"A comma-separated list of search groups for `search` index metric"}, - "level" => {"type"=>"enum", "description"=>"Return stats aggregated at cluster, index or shard level", "options"=>["cluster", "indices", "shards"], "default"=>"indices"}, - "include_segment_file_sizes" => {"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}, - "include_unloaded_segments" => {"type"=>"boolean", "description"=>"If set to true segment stats will include stats for segments that are not currently loaded into memory", "default"=>false}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "forbid_closed_indices" => {"type"=>"boolean", "description"=>"If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices", "default"=>true}, - } + parts: [ + "metric", + "index", + ], + params: [ + "completion_fields", + "fielddata_fields", + "fields", + "groups", + "level", + "include_segment_file_sizes", + "include_unloaded_segments", + "expand_wildcards", + "forbid_closed_indices", + ] } ), "indices.unfreeze" => RestApi.new( @@ -2824,17 +2824,17 @@ def initialize url: { path: "/{index}/_unfreeze", paths: ["/{index}/_unfreeze"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index to unfreeze"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"closed", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of active shards to wait for before the operation returns."}, - } + parts: [ + "index", + ], + params: [ + "timeout", + "master_timeout", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "wait_for_active_shards", + ] } ), "indices.update_aliases" => RestApi.new( @@ -2844,10 +2844,10 @@ def initialize url: { path: "/_aliases", paths: ["/_aliases"], - params: { - "timeout" => {"type"=>"time", "description"=>"Request timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - } + params: [ + "timeout", + "master_timeout", + ] } ), "indices.validate_query" => RestApi.new( @@ -2857,23 +2857,23 @@ def initialize url: { path: "/_validate/query", paths: ["/_validate/query", "/{index}/_validate/query"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "explain" => {"type"=>"boolean", "description"=>"Return detailed information about the error"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "rewrite" => {"type"=>"boolean", "description"=>"Provide a more detailed explanation showing the actual Lucene query that will be executed."}, - "all_shards" => {"type"=>"boolean", "description"=>"Execute validation on all shards instead of one random shard per index"}, - } + parts: [ + "index", + ], + params: [ + "explain", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "q", + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "lenient", + "rewrite", + "all_shards", + ] } ), "info" => RestApi.new( @@ -2892,13 +2892,13 @@ def initialize url: { path: "/_ingest/pipeline/{id}", paths: ["/_ingest/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Pipeline ID"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "id", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "ingest.geo_ip_stats" => RestApi.new( @@ -2917,13 +2917,13 @@ def initialize url: { path: "/_ingest/pipeline", paths: ["/_ingest/pipeline", "/_ingest/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Comma separated list of pipeline ids. Wildcards supported"}, - }, - params: { - "summary" => {"type"=>"boolean", "description"=>"Return pipelines without their definitions (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - } + parts: [ + "id", + ], + params: [ + "summary", + "master_timeout", + ] } ), "ingest.processor_grok" => RestApi.new( @@ -2942,14 +2942,14 @@ def initialize url: { path: "/_ingest/pipeline/{id}", paths: ["/_ingest/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Pipeline ID"}, - }, - params: { - "if_version" => {"type"=>"int", "description"=>"Required version for optimistic concurrency control for pipeline updates"}, - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "id", + ], + params: [ + "if_version", + "master_timeout", + "timeout", + ] } ), "ingest.simulate" => RestApi.new( @@ -2959,12 +2959,12 @@ def initialize url: { path: "/_ingest/pipeline/_simulate", paths: ["/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate"], - parts: { - "id" => {"type"=>"string", "description"=>"Pipeline ID"}, - }, - params: { - "verbose" => {"type"=>"boolean", "description"=>"Verbose mode. Display data output for each processor in executed pipeline", "default"=>false}, - } + parts: [ + "id", + ], + params: [ + "verbose", + ] } ), "knn_search" => RestApi.new( @@ -2974,12 +2974,12 @@ def initialize url: { path: "/{index}/_knn_search", paths: ["/{index}/_knn_search"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` to perform the operation on all indices"}, - }, - params: { - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - } + parts: [ + "index", + ], + params: [ + "routing", + ] } ), "license.delete" => RestApi.new( @@ -2998,10 +2998,10 @@ def initialize url: { path: "/_license", paths: ["/_license"], - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "accept_enterprise" => {"type"=>"boolean", "description"=>"Supported for backwards compatibility with 7.x. If this param is used it must be set to true", "deprecated"=>true}, - } + params: [ + "local", + "accept_enterprise", + ] } ), "license.get_basic_status" => RestApi.new( @@ -3029,9 +3029,9 @@ def initialize url: { path: "/_license", paths: ["/_license"], - params: { - "acknowledge" => {"type"=>"boolean", "description"=>"whether the user has acknowledged acknowledge messages (default: false)"}, - } + params: [ + "acknowledge", + ] } ), "license.post_start_basic" => RestApi.new( @@ -3041,9 +3041,9 @@ def initialize url: { path: "/_license/start_basic", paths: ["/_license/start_basic"], - params: { - "acknowledge" => {"type"=>"boolean", "description"=>"whether the user has acknowledged acknowledge messages (default: false)"}, - } + params: [ + "acknowledge", + ] } ), "license.post_start_trial" => RestApi.new( @@ -3053,10 +3053,10 @@ def initialize url: { path: "/_license/start_trial", paths: ["/_license/start_trial"], - params: { - "type" => {"type"=>"string", "description"=>"The type of trial license to generate (default: \"trial\")"}, - "acknowledge" => {"type"=>"boolean", "description"=>"whether the user has acknowledged acknowledge messages (default: false)"}, - } + params: [ + "type", + "acknowledge", + ] } ), "logstash.delete_pipeline" => RestApi.new( @@ -3066,9 +3066,9 @@ def initialize url: { path: "/_logstash/pipeline/{id}", paths: ["/_logstash/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the Pipeline"}, - }, + parts: [ + "id", + ], } ), "logstash.get_pipeline" => RestApi.new( @@ -3078,9 +3078,9 @@ def initialize url: { path: "/_logstash/pipeline", paths: ["/_logstash/pipeline", "/_logstash/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"A comma-separated list of Pipeline IDs"}, - }, + parts: [ + "id", + ], } ), "logstash.put_pipeline" => RestApi.new( @@ -3090,9 +3090,9 @@ def initialize url: { path: "/_logstash/pipeline/{id}", paths: ["/_logstash/pipeline/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the Pipeline"}, - }, + parts: [ + "id", + ], } ), "mget" => RestApi.new( @@ -3102,20 +3102,20 @@ def initialize url: { path: "/_mget", paths: ["/_mget", "/{index}/_mget"], - parts: { - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "force_synthetic_source" => {"type"=>"boolean", "description"=>"Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.", "visibility"=>"feature_flag", "feature_flag"=>"es.index_mode_feature_flag_registered"}, - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, - "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - } + parts: [ + "index", + ], + params: [ + "force_synthetic_source", + "stored_fields", + "preference", + "realtime", + "refresh", + "routing", + "_source", + "_source_excludes", + "_source_includes", + ] } ), "migration.deprecations" => RestApi.new( @@ -3125,9 +3125,9 @@ def initialize url: { path: "/_migration/deprecations", paths: ["/_migration/deprecations", "/{index}/_migration/deprecations"], - parts: { - "index" => {"type"=>"string", "description"=>"Index pattern"}, - }, + parts: [ + "index", + ], } ), "migration.get_feature_upgrade_status" => RestApi.new( @@ -3155,9 +3155,9 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/deployment/cache/_clear", paths: ["/_ml/trained_models/{model_id}/deployment/cache/_clear"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The unique identifier of the trained model.", "required"=>true}, - }, + parts: [ + "model_id", + ], } ), "ml.close_job" => RestApi.new( @@ -3167,14 +3167,14 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/_close", paths: ["/_ml/anomaly_detectors/{job_id}/_close"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The name of the job to close"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"}, - "force" => {"type"=>"boolean", "required"=>false, "description"=>"True if the job should be forcefully closed"}, - "timeout" => {"type"=>"time", "description"=>"Controls the time to wait until a job has closed. Default to 30 minutes"}, - } + parts: [ + "job_id", + ], + params: [ + "allow_no_match", + "force", + "timeout", + ] } ), "ml.delete_calendar" => RestApi.new( @@ -3184,9 +3184,9 @@ def initialize url: { path: "/_ml/calendars/{calendar_id}", paths: ["/_ml/calendars/{calendar_id}"], - parts: { - "calendar_id" => {"type"=>"string", "description"=>"The ID of the calendar to delete"}, - }, + parts: [ + "calendar_id", + ], } ), "ml.delete_calendar_event" => RestApi.new( @@ -3196,10 +3196,10 @@ def initialize url: { path: "/_ml/calendars/{calendar_id}/events/{event_id}", paths: ["/_ml/calendars/{calendar_id}/events/{event_id}"], - parts: { - "calendar_id" => {"type"=>"string", "description"=>"The ID of the calendar to modify"}, - "event_id" => {"type"=>"string", "description"=>"The ID of the event to remove from the calendar"}, - }, + parts: [ + "calendar_id", + "event_id", + ], } ), "ml.delete_calendar_job" => RestApi.new( @@ -3209,10 +3209,10 @@ def initialize url: { path: "/_ml/calendars/{calendar_id}/jobs/{job_id}", paths: ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], - parts: { - "calendar_id" => {"type"=>"string", "description"=>"The ID of the calendar to modify"}, - "job_id" => {"type"=>"string", "description"=>"The ID of the job to remove from the calendar"}, - }, + parts: [ + "calendar_id", + "job_id", + ], } ), "ml.delete_data_frame_analytics" => RestApi.new( @@ -3222,13 +3222,13 @@ def initialize url: { path: "/_ml/data_frame/analytics/{id}", paths: ["/_ml/data_frame/analytics/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to delete"}, - }, - params: { - "force" => {"type"=>"boolean", "description"=>"True if the job should be forcefully deleted", "default"=>false}, - "timeout" => {"type"=>"time", "description"=>"Controls the time to wait until a job is deleted. Defaults to 1 minute"}, - } + parts: [ + "id", + ], + params: [ + "force", + "timeout", + ] } ), "ml.delete_datafeed" => RestApi.new( @@ -3238,12 +3238,12 @@ def initialize url: { path: "/_ml/datafeeds/{datafeed_id}", paths: ["/_ml/datafeeds/{datafeed_id}"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeed to delete"}, - }, - params: { - "force" => {"type"=>"boolean", "required"=>false, "description"=>"True if the datafeed should be forcefully deleted"}, - } + parts: [ + "datafeed_id", + ], + params: [ + "force", + ] } ), "ml.delete_expired_data" => RestApi.new( @@ -3253,13 +3253,13 @@ def initialize url: { path: "/_ml/_delete_expired_data/{job_id}", paths: ["/_ml/_delete_expired_data/{job_id}", "/_ml/_delete_expired_data"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job(s) to perform expired data hygiene for"}, - }, - params: { - "requests_per_second" => {"type"=>"number", "required"=>false, "description"=>"The desired requests per second for the deletion processes."}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"How long can the underlying delete processes run until they are canceled"}, - } + parts: [ + "job_id", + ], + params: [ + "requests_per_second", + "timeout", + ] } ), "ml.delete_filter" => RestApi.new( @@ -3269,9 +3269,9 @@ def initialize url: { path: "/_ml/filters/{filter_id}", paths: ["/_ml/filters/{filter_id}"], - parts: { - "filter_id" => {"type"=>"string", "description"=>"The ID of the filter to delete"}, - }, + parts: [ + "filter_id", + ], } ), "ml.delete_forecast" => RestApi.new( @@ -3281,14 +3281,14 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/_forecast", paths: ["/_ml/anomaly_detectors/{job_id}/_forecast", "/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job from which to delete forecasts"}, - "forecast_id" => {"type"=>"string", "description"=>"The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all`"}, - }, - params: { - "allow_no_forecasts" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if `_all` matches no forecasts"}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds"}, - } + parts: [ + "job_id", + "forecast_id", + ], + params: [ + "allow_no_forecasts", + "timeout", + ] } ), "ml.delete_job" => RestApi.new( @@ -3298,14 +3298,14 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}", paths: ["/_ml/anomaly_detectors/{job_id}"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to delete"}, - }, - params: { - "force" => {"type"=>"boolean", "description"=>"True if the job should be forcefully deleted", "default"=>false}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>true}, - "delete_user_annotations" => {"type"=>"boolean", "description"=>"Should annotations added by the user be deleted", "default"=>false}, - } + parts: [ + "job_id", + ], + params: [ + "force", + "wait_for_completion", + "delete_user_annotations", + ] } ), "ml.delete_model_snapshot" => RestApi.new( @@ -3315,10 +3315,10 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", paths: ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to fetch"}, - "snapshot_id" => {"type"=>"string", "description"=>"The ID of the snapshot to delete"}, - }, + parts: [ + "job_id", + "snapshot_id", + ], } ), "ml.delete_trained_model" => RestApi.new( @@ -3328,13 +3328,13 @@ def initialize url: { path: "/_ml/trained_models/{model_id}", paths: ["/_ml/trained_models/{model_id}"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The ID of the trained model to delete"}, - }, - params: { - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the amount of time to wait for the model to be deleted.", "default"=>"30s"}, - "force" => {"type"=>"boolean", "required"=>false, "description"=>"True if the model should be forcefully deleted"}, - } + parts: [ + "model_id", + ], + params: [ + "timeout", + "force", + ] } ), "ml.delete_trained_model_alias" => RestApi.new( @@ -3344,10 +3344,10 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/model_aliases/{model_alias}", paths: ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], - parts: { - "model_alias" => {"type"=>"string", "description"=>"The trained model alias to delete"}, - "model_id" => {"type"=>"string", "description"=>"The trained model where the model alias is assigned"}, - }, + parts: [ + "model_alias", + "model_id", + ], } ), "ml.estimate_model_memory" => RestApi.new( @@ -3375,9 +3375,9 @@ def initialize url: { path: "/_ml/data_frame/analytics/_explain", paths: ["/_ml/data_frame/analytics/_explain", "/_ml/data_frame/analytics/{id}/_explain"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to explain"}, - }, + parts: [ + "id", + ], } ), "ml.flush_job" => RestApi.new( @@ -3387,16 +3387,16 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/_flush", paths: ["/_ml/anomaly_detectors/{job_id}/_flush"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The name of the job to flush"}, - }, - params: { - "calc_interim" => {"type"=>"boolean", "description"=>"Calculates interim results for the most recent bucket or all buckets within the latency period"}, - "start" => {"type"=>"string", "description"=>"When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results"}, - "end" => {"type"=>"string", "description"=>"When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results"}, - "advance_time" => {"type"=>"string", "description"=>"Advances time to the given value generating results and updating the model for the advanced interval"}, - "skip_time" => {"type"=>"string", "description"=>"Skips time to the given value without generating results or updating the model for the skipped interval"}, - } + parts: [ + "job_id", + ], + params: [ + "calc_interim", + "start", + "end", + "advance_time", + "skip_time", + ] } ), "ml.forecast" => RestApi.new( @@ -3406,14 +3406,14 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/_forecast", paths: ["/_ml/anomaly_detectors/{job_id}/_forecast"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to forecast for"}, - }, - params: { - "duration" => {"type"=>"time", "required"=>false, "description"=>"The duration of the forecast"}, - "expires_in" => {"type"=>"time", "required"=>false, "description"=>"The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity."}, - "max_model_memory" => {"type"=>"string", "required"=>false, "description"=>"The max memory able to be used by the forecast. Default is 20mb."}, - } + parts: [ + "job_id", + ], + params: [ + "duration", + "expires_in", + "max_model_memory", + ] } ), "ml.get_buckets" => RestApi.new( @@ -3423,21 +3423,21 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", paths: ["/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", "/_ml/anomaly_detectors/{job_id}/results/buckets"], - parts: { - "job_id" => {"type"=>"string", "description"=>"ID of the job to get bucket results from"}, - "timestamp" => {"type"=>"string", "description"=>"The timestamp of the desired single bucket result"}, - }, - params: { - "expand" => {"type"=>"boolean", "description"=>"Include anomaly records"}, - "exclude_interim" => {"type"=>"boolean", "description"=>"Exclude interim results"}, - "from" => {"type"=>"int", "description"=>"skips a number of buckets"}, - "size" => {"type"=>"int", "description"=>"specifies a max number of buckets to get"}, - "start" => {"type"=>"string", "description"=>"Start time filter for buckets"}, - "end" => {"type"=>"string", "description"=>"End time filter for buckets"}, - "anomaly_score" => {"type"=>"double", "description"=>"Filter for the most anomalous buckets"}, - "sort" => {"type"=>"string", "description"=>"Sort buckets by a particular field"}, - "desc" => {"type"=>"boolean", "description"=>"Set the sort direction"}, - } + parts: [ + "job_id", + "timestamp", + ], + params: [ + "expand", + "exclude_interim", + "from", + "size", + "start", + "end", + "anomaly_score", + "sort", + "desc", + ] } ), "ml.get_calendar_events" => RestApi.new( @@ -3447,16 +3447,16 @@ def initialize url: { path: "/_ml/calendars/{calendar_id}/events", paths: ["/_ml/calendars/{calendar_id}/events"], - parts: { - "calendar_id" => {"type"=>"string", "description"=>"The ID of the calendar containing the events"}, - }, - params: { - "job_id" => {"type"=>"string", "description"=>"Get events for the job. When this option is used calendar_id must be '_all'"}, - "start" => {"type"=>"string", "description"=>"Get events after this time"}, - "end" => {"type"=>"date", "description"=>"Get events before this time"}, - "from" => {"type"=>"int", "description"=>"Skips a number of events"}, - "size" => {"type"=>"int", "description"=>"Specifies a max number of events to get"}, - } + parts: [ + "calendar_id", + ], + params: [ + "job_id", + "start", + "end", + "from", + "size", + ] } ), "ml.get_calendars" => RestApi.new( @@ -3466,13 +3466,13 @@ def initialize url: { path: "/_ml/calendars", paths: ["/_ml/calendars", "/_ml/calendars/{calendar_id}"], - parts: { - "calendar_id" => {"type"=>"string", "description"=>"The ID of the calendar to fetch"}, - }, - params: { - "from" => {"type"=>"int", "description"=>"skips a number of calendars"}, - "size" => {"type"=>"int", "description"=>"specifies a max number of calendars to get"}, - } + parts: [ + "calendar_id", + ], + params: [ + "from", + "size", + ] } ), "ml.get_categories" => RestApi.new( @@ -3482,15 +3482,15 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}", paths: ["/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}", "/_ml/anomaly_detectors/{job_id}/results/categories/"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The name of the job"}, - "category_id" => {"type"=>"long", "description"=>"The identifier of the category definition of interest"}, - }, - params: { - "from" => {"type"=>"int", "description"=>"skips a number of categories"}, - "size" => {"type"=>"int", "description"=>"specifies a max number of categories to get"}, - "partition_field_value" => {"type"=>"string", "description"=>"Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled."}, - } + parts: [ + "job_id", + "category_id", + ], + params: [ + "from", + "size", + "partition_field_value", + ] } ), "ml.get_data_frame_analytics" => RestApi.new( @@ -3500,15 +3500,15 @@ def initialize url: { path: "/_ml/data_frame/analytics/{id}", paths: ["/_ml/data_frame/analytics/{id}", "/_ml/data_frame/analytics"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)", "default"=>true}, - "from" => {"type"=>"int", "description"=>"skips a number of analytics", "default"=>0}, - "size" => {"type"=>"int", "description"=>"specifies a max number of analytics to get", "default"=>100}, - "exclude_generated" => {"required"=>false, "type"=>"boolean", "default"=>false, "description"=>"Omits fields that are illegal to set on data frame analytics PUT"}, - } + parts: [ + "id", + ], + params: [ + "allow_no_match", + "from", + "size", + "exclude_generated", + ] } ), "ml.get_data_frame_analytics_stats" => RestApi.new( @@ -3518,15 +3518,15 @@ def initialize url: { path: "/_ml/data_frame/analytics/_stats", paths: ["/_ml/data_frame/analytics/_stats", "/_ml/data_frame/analytics/{id}/_stats"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics stats to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)", "default"=>true}, - "from" => {"type"=>"int", "description"=>"skips a number of analytics", "default"=>0}, - "size" => {"type"=>"int", "description"=>"specifies a max number of analytics to get", "default"=>100}, - "verbose" => {"type"=>"boolean", "required"=>false, "description"=>"whether the stats response should be verbose", "default"=>false}, - } + parts: [ + "id", + ], + params: [ + "allow_no_match", + "from", + "size", + "verbose", + ] } ), "ml.get_datafeed_stats" => RestApi.new( @@ -3536,12 +3536,12 @@ def initialize url: { path: "/_ml/datafeeds/{datafeed_id}/_stats", paths: ["/_ml/datafeeds/{datafeed_id}/_stats", "/_ml/datafeeds/_stats"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeeds stats to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"}, - } + parts: [ + "datafeed_id", + ], + params: [ + "allow_no_match", + ] } ), "ml.get_datafeeds" => RestApi.new( @@ -3551,13 +3551,13 @@ def initialize url: { path: "/_ml/datafeeds/{datafeed_id}", paths: ["/_ml/datafeeds/{datafeed_id}", "/_ml/datafeeds"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeeds to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"}, - "exclude_generated" => {"required"=>false, "type"=>"boolean", "default"=>false, "description"=>"Omits fields that are illegal to set on datafeed PUT"}, - } + parts: [ + "datafeed_id", + ], + params: [ + "allow_no_match", + "exclude_generated", + ] } ), "ml.get_filters" => RestApi.new( @@ -3567,13 +3567,13 @@ def initialize url: { path: "/_ml/filters", paths: ["/_ml/filters", "/_ml/filters/{filter_id}"], - parts: { - "filter_id" => {"type"=>"string", "description"=>"The ID of the filter to fetch"}, - }, - params: { - "from" => {"type"=>"int", "description"=>"skips a number of filters"}, - "size" => {"type"=>"int", "description"=>"specifies a max number of filters to get"}, - } + parts: [ + "filter_id", + ], + params: [ + "from", + "size", + ] } ), "ml.get_influencers" => RestApi.new( @@ -3583,19 +3583,19 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/results/influencers", paths: ["/_ml/anomaly_detectors/{job_id}/results/influencers"], - parts: { - "job_id" => {"type"=>"string", "description"=>"Identifier for the anomaly detection job"}, - }, - params: { - "exclude_interim" => {"type"=>"boolean", "description"=>"Exclude interim results"}, - "from" => {"type"=>"int", "description"=>"skips a number of influencers"}, - "size" => {"type"=>"int", "description"=>"specifies a max number of influencers to get"}, - "start" => {"type"=>"string", "description"=>"start timestamp for the requested influencers"}, - "end" => {"type"=>"string", "description"=>"end timestamp for the requested influencers"}, - "influencer_score" => {"type"=>"double", "description"=>"influencer score threshold for the requested influencers"}, - "sort" => {"type"=>"string", "description"=>"sort field for the requested influencers"}, - "desc" => {"type"=>"boolean", "description"=>"whether the results should be sorted in decending order"}, - } + parts: [ + "job_id", + ], + params: [ + "exclude_interim", + "from", + "size", + "start", + "end", + "influencer_score", + "sort", + "desc", + ] } ), "ml.get_job_stats" => RestApi.new( @@ -3605,12 +3605,12 @@ def initialize url: { path: "/_ml/anomaly_detectors/_stats", paths: ["/_ml/anomaly_detectors/_stats", "/_ml/anomaly_detectors/{job_id}/_stats"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the jobs stats to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"}, - } + parts: [ + "job_id", + ], + params: [ + "allow_no_match", + ] } ), "ml.get_jobs" => RestApi.new( @@ -3620,13 +3620,13 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}", paths: ["/_ml/anomaly_detectors/{job_id}", "/_ml/anomaly_detectors"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the jobs to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"}, - "exclude_generated" => {"required"=>false, "type"=>"boolean", "default"=>false, "description"=>"Omits fields that are illegal to set on job PUT"}, - } + parts: [ + "job_id", + ], + params: [ + "allow_no_match", + "exclude_generated", + ] } ), "ml.get_memory_stats" => RestApi.new( @@ -3636,13 +3636,13 @@ def initialize url: { path: "/_ml/memory/_stats", paths: ["/_ml/memory/_stats", "/_ml/memory/{node_id}/_stats"], - parts: { - "node_id" => {"type"=>"string", "description"=>"Specifies the node or nodes to retrieve stats for."}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "ml.get_model_snapshot_upgrade_stats" => RestApi.new( @@ -3652,13 +3652,13 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats", paths: ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job. May be a wildcard, comma separated list or `_all`."}, - "snapshot_id" => {"type"=>"string", "description"=>"The ID of the snapshot. May be a wildcard, comma separated list or `_all`."}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no jobs or no snapshots. (This includes the `_all` string.)"}, - } + parts: [ + "job_id", + "snapshot_id", + ], + params: [ + "allow_no_match", + ] } ), "ml.get_model_snapshots" => RestApi.new( @@ -3668,18 +3668,18 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", paths: ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", "/_ml/anomaly_detectors/{job_id}/model_snapshots"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to fetch"}, - "snapshot_id" => {"type"=>"string", "description"=>"The ID of the snapshot to fetch"}, - }, - params: { - "from" => {"type"=>"int", "description"=>"Skips a number of documents"}, - "size" => {"type"=>"int", "description"=>"The default number of documents returned in queries as a string."}, - "start" => {"type"=>"date", "description"=>"The filter 'start' query parameter"}, - "end" => {"type"=>"date", "description"=>"The filter 'end' query parameter"}, - "sort" => {"type"=>"string", "description"=>"Name of the field to sort on"}, - "desc" => {"type"=>"boolean", "description"=>"True if the results should be sorted in descending order"}, - } + parts: [ + "job_id", + "snapshot_id", + ], + params: [ + "from", + "size", + "start", + "end", + "sort", + "desc", + ] } ), "ml.get_overall_buckets" => RestApi.new( @@ -3689,18 +3689,18 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/results/overall_buckets", paths: ["/_ml/anomaly_detectors/{job_id}/results/overall_buckets"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The job IDs for which to calculate overall bucket results"}, - }, - params: { - "top_n" => {"type"=>"int", "description"=>"The number of top job bucket scores to be used in the overall_score calculation"}, - "bucket_span" => {"type"=>"string", "description"=>"The span of the overall buckets. Defaults to the longest job bucket_span"}, - "overall_score" => {"type"=>"double", "description"=>"Returns overall buckets with overall scores higher than this value"}, - "exclude_interim" => {"type"=>"boolean", "description"=>"If true overall buckets that include interim buckets will be excluded"}, - "start" => {"type"=>"string", "description"=>"Returns overall buckets with timestamps after this time"}, - "end" => {"type"=>"string", "description"=>"Returns overall buckets with timestamps earlier than this time"}, - "allow_no_match" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"}, - } + parts: [ + "job_id", + ], + params: [ + "top_n", + "bucket_span", + "overall_score", + "exclude_interim", + "start", + "end", + "allow_no_match", + ] } ), "ml.get_records" => RestApi.new( @@ -3710,19 +3710,19 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/results/records", paths: ["/_ml/anomaly_detectors/{job_id}/results/records"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job"}, - }, - params: { - "exclude_interim" => {"type"=>"boolean", "description"=>"Exclude interim results"}, - "from" => {"type"=>"int", "description"=>"skips a number of records"}, - "size" => {"type"=>"int", "description"=>"specifies a max number of records to get"}, - "start" => {"type"=>"string", "description"=>"Start time filter for records"}, - "end" => {"type"=>"string", "description"=>"End time filter for records"}, - "record_score" => {"type"=>"double", "description"=>"Returns records with anomaly scores greater or equal than this value"}, - "sort" => {"type"=>"string", "description"=>"Sort records by a particular field"}, - "desc" => {"type"=>"boolean", "description"=>"Set the sort direction"}, - } + parts: [ + "job_id", + ], + params: [ + "exclude_interim", + "from", + "size", + "start", + "end", + "record_score", + "sort", + "desc", + ] } ), "ml.get_trained_models" => RestApi.new( @@ -3732,19 +3732,19 @@ def initialize url: { path: "/_ml/trained_models/{model_id}", paths: ["/_ml/trained_models/{model_id}", "/_ml/trained_models"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The ID of the trained models to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)", "default"=>true}, - "include" => {"type"=>"string", "required"=>false, "description"=>"A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none."}, - "include_model_definition" => {"type"=>"boolean", "required"=>false, "description"=>"Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false.", "default"=>false, "deprecated"=>true}, - "decompress_definition" => {"type"=>"boolean", "required"=>false, "default"=>true, "description"=>"Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true."}, - "from" => {"required"=>false, "type"=>"int", "description"=>"skips a number of trained models", "default"=>0}, - "size" => {"required"=>false, "type"=>"int", "description"=>"specifies a max number of trained models to get", "default"=>100}, - "tags" => {"required"=>false, "type"=>"list", "description"=>"A comma-separated list of tags that the model must have."}, - "exclude_generated" => {"required"=>false, "type"=>"boolean", "default"=>false, "description"=>"Omits fields that are illegal to set on model PUT"}, - } + parts: [ + "model_id", + ], + params: [ + "allow_no_match", + "include", + "include_model_definition", + "decompress_definition", + "from", + "size", + "tags", + "exclude_generated", + ] } ), "ml.get_trained_models_stats" => RestApi.new( @@ -3754,14 +3754,14 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/_stats", paths: ["/_ml/trained_models/{model_id}/_stats", "/_ml/trained_models/_stats"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The ID of the trained models stats to fetch"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)", "default"=>true}, - "from" => {"type"=>"int", "description"=>"skips a number of trained models", "default"=>0}, - "size" => {"type"=>"int", "description"=>"specifies a max number of trained models to get", "default"=>100}, - } + parts: [ + "model_id", + ], + params: [ + "allow_no_match", + "from", + "size", + ] } ), "ml.infer_trained_model" => RestApi.new( @@ -3771,12 +3771,12 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/_infer", paths: ["/_ml/trained_models/{model_id}/_infer", "/_ml/trained_models/{model_id}/deployment/_infer"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The unique identifier of the trained model.", "required"=>true}, - }, - params: { - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the amount of time to wait for inference results.", "default"=>"10s"}, - } + parts: [ + "model_id", + ], + params: [ + "timeout", + ] } ), "ml.info" => RestApi.new( @@ -3795,9 +3795,9 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/_open", paths: ["/_ml/anomaly_detectors/{job_id}/_open"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to open"}, - }, + parts: [ + "job_id", + ], } ), "ml.post_calendar_events" => RestApi.new( @@ -3807,9 +3807,9 @@ def initialize url: { path: "/_ml/calendars/{calendar_id}/events", paths: ["/_ml/calendars/{calendar_id}/events"], - parts: { - "calendar_id" => {"type"=>"string", "description"=>"The ID of the calendar to modify"}, - }, + parts: [ + "calendar_id", + ], } ), "ml.post_data" => RestApi.new( @@ -3819,13 +3819,13 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/_data", paths: ["/_ml/anomaly_detectors/{job_id}/_data"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The name of the job receiving the data"}, - }, - params: { - "reset_start" => {"type"=>"string", "description"=>"Optional parameter to specify the start of the bucket resetting range"}, - "reset_end" => {"type"=>"string", "description"=>"Optional parameter to specify the end of the bucket resetting range"}, - } + parts: [ + "job_id", + ], + params: [ + "reset_start", + "reset_end", + ] } ), "ml.preview_data_frame_analytics" => RestApi.new( @@ -3835,9 +3835,9 @@ def initialize url: { path: "/_ml/data_frame/analytics/_preview", paths: ["/_ml/data_frame/analytics/_preview", "/_ml/data_frame/analytics/{id}/_preview"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to preview"}, - }, + parts: [ + "id", + ], } ), "ml.preview_datafeed" => RestApi.new( @@ -3847,13 +3847,13 @@ def initialize url: { path: "/_ml/datafeeds/{datafeed_id}/_preview", paths: ["/_ml/datafeeds/{datafeed_id}/_preview", "/_ml/datafeeds/_preview"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeed to preview"}, - }, - params: { - "start" => {"type"=>"string", "required"=>false, "description"=>"The start time from where the datafeed preview should begin"}, - "end" => {"type"=>"string", "required"=>false, "description"=>"The end time when the datafeed preview should stop"}, - } + parts: [ + "datafeed_id", + ], + params: [ + "start", + "end", + ] } ), "ml.put_calendar" => RestApi.new( @@ -3863,9 +3863,9 @@ def initialize url: { path: "/_ml/calendars/{calendar_id}", paths: ["/_ml/calendars/{calendar_id}"], - parts: { - "calendar_id" => {"type"=>"string", "description"=>"The ID of the calendar to create"}, - }, + parts: [ + "calendar_id", + ], } ), "ml.put_calendar_job" => RestApi.new( @@ -3875,10 +3875,10 @@ def initialize url: { path: "/_ml/calendars/{calendar_id}/jobs/{job_id}", paths: ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], - parts: { - "calendar_id" => {"type"=>"string", "description"=>"The ID of the calendar to modify"}, - "job_id" => {"type"=>"string", "description"=>"The ID of the job to add to the calendar"}, - }, + parts: [ + "calendar_id", + "job_id", + ], } ), "ml.put_data_frame_analytics" => RestApi.new( @@ -3888,9 +3888,9 @@ def initialize url: { path: "/_ml/data_frame/analytics/{id}", paths: ["/_ml/data_frame/analytics/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to create"}, - }, + parts: [ + "id", + ], } ), "ml.put_datafeed" => RestApi.new( @@ -3900,15 +3900,15 @@ def initialize url: { path: "/_ml/datafeeds/{datafeed_id}", paths: ["/_ml/datafeeds/{datafeed_id}"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeed to create"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if the source indices expressions resolves to no concrete indices (default: true)"}, - "ignore_throttled" => {"type"=>"boolean", "description"=>"Ignore indices that are marked as throttled (default: true)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "description"=>"Whether source index expressions should get expanded to open or closed indices (default: open)"}, - } + parts: [ + "datafeed_id", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "ignore_throttled", + "expand_wildcards", + ] } ), "ml.put_filter" => RestApi.new( @@ -3918,9 +3918,9 @@ def initialize url: { path: "/_ml/filters/{filter_id}", paths: ["/_ml/filters/{filter_id}"], - parts: { - "filter_id" => {"type"=>"string", "description"=>"The ID of the filter to create"}, - }, + parts: [ + "filter_id", + ], } ), "ml.put_job" => RestApi.new( @@ -3930,15 +3930,15 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}", paths: ["/_ml/anomaly_detectors/{job_id}"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to create"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false). Only set if datafeed_config is provided."}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if the source indices expressions resolves to no concrete indices (default: true). Only set if datafeed_config is provided."}, - "ignore_throttled" => {"type"=>"boolean", "description"=>"Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided."}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "description"=>"Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided."}, - } + parts: [ + "job_id", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "ignore_throttled", + "expand_wildcards", + ] } ), "ml.put_trained_model" => RestApi.new( @@ -3948,12 +3948,12 @@ def initialize url: { path: "/_ml/trained_models/{model_id}", paths: ["/_ml/trained_models/{model_id}"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The ID of the trained models to store"}, - }, - params: { - "defer_definition_decompression" => {"required"=>false, "type"=>"boolean", "description"=>"If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations.", "default"=>false}, - } + parts: [ + "model_id", + ], + params: [ + "defer_definition_decompression", + ] } ), "ml.put_trained_model_alias" => RestApi.new( @@ -3963,13 +3963,13 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/model_aliases/{model_alias}", paths: ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], - parts: { - "model_alias" => {"type"=>"string", "description"=>"The trained model alias to update"}, - "model_id" => {"type"=>"string", "description"=>"The trained model where the model alias should be assigned"}, - }, - params: { - "reassign" => {"type"=>"boolean", "description"=>"If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false."}, - } + parts: [ + "model_alias", + "model_id", + ], + params: [ + "reassign", + ] } ), "ml.put_trained_model_definition_part" => RestApi.new( @@ -3979,10 +3979,10 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/definition/{part}", paths: ["/_ml/trained_models/{model_id}/definition/{part}"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The ID of the trained model for this definition part"}, - "part" => {"type"=>"int", "description"=>"The part number"}, - }, + parts: [ + "model_id", + "part", + ], } ), "ml.put_trained_model_vocabulary" => RestApi.new( @@ -3992,9 +3992,9 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/vocabulary", paths: ["/_ml/trained_models/{model_id}/vocabulary"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The ID of the trained model for this vocabulary"}, - }, + parts: [ + "model_id", + ], } ), "ml.reset_job" => RestApi.new( @@ -4004,13 +4004,13 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/_reset", paths: ["/_ml/anomaly_detectors/{job_id}/_reset"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to reset"}, - }, - params: { - "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>true}, - "delete_user_annotations" => {"type"=>"boolean", "description"=>"Should annotations added by the user be deleted", "default"=>false}, - } + parts: [ + "job_id", + ], + params: [ + "wait_for_completion", + "delete_user_annotations", + ] } ), "ml.revert_model_snapshot" => RestApi.new( @@ -4020,13 +4020,13 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert", paths: ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to fetch"}, - "snapshot_id" => {"type"=>"string", "description"=>"The ID of the snapshot to revert to"}, - }, - params: { - "delete_intervening_results" => {"type"=>"boolean", "description"=>"Should we reset the results back to the time of the snapshot?"}, - } + parts: [ + "job_id", + "snapshot_id", + ], + params: [ + "delete_intervening_results", + ] } ), "ml.set_upgrade_mode" => RestApi.new( @@ -4036,10 +4036,10 @@ def initialize url: { path: "/_ml/set_upgrade_mode", paths: ["/_ml/set_upgrade_mode"], - params: { - "enabled" => {"type"=>"boolean", "description"=>"Whether to enable upgrade_mode ML setting or not. Defaults to false."}, - "timeout" => {"type"=>"time", "description"=>"Controls the time to wait before action times out. Defaults to 30 seconds"}, - } + params: [ + "enabled", + "timeout", + ] } ), "ml.start_data_frame_analytics" => RestApi.new( @@ -4049,12 +4049,12 @@ def initialize url: { path: "/_ml/data_frame/analytics/{id}/_start", paths: ["/_ml/data_frame/analytics/{id}/_start"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to start"}, - }, - params: { - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait until the task has started. Defaults to 20 seconds"}, - } + parts: [ + "id", + ], + params: [ + "timeout", + ] } ), "ml.start_datafeed" => RestApi.new( @@ -4064,14 +4064,14 @@ def initialize url: { path: "/_ml/datafeeds/{datafeed_id}/_start", paths: ["/_ml/datafeeds/{datafeed_id}/_start"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeed to start"}, - }, - params: { - "start" => {"type"=>"string", "required"=>false, "description"=>"The start time from where the datafeed should begin"}, - "end" => {"type"=>"string", "required"=>false, "description"=>"The end time when the datafeed should stop. When not set, the datafeed continues in real time"}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait until a datafeed has started. Default to 20 seconds"}, - } + parts: [ + "datafeed_id", + ], + params: [ + "start", + "end", + "timeout", + ] } ), "ml.start_trained_model_deployment" => RestApi.new( @@ -4081,18 +4081,18 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/deployment/_start", paths: ["/_ml/trained_models/{model_id}/deployment/_start"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The unique identifier of the trained model.", "required"=>true}, - }, - params: { - "cache_size" => {"type"=>"string", "description"=>"A byte-size value for configuring the inference cache size. For example, 20mb.", "required"=>false}, - "number_of_allocations" => {"type"=>"int", "description"=>"The total number of allocations this model is assigned across machine learning nodes.", "required"=>false, "default"=>1}, - "threads_per_allocation" => {"type"=>"int", "description"=>"The number of threads used by each model allocation during inference.", "required"=>false, "default"=>1}, - "priority" => {"type"=>"string", "description"=>"The deployment priority.", "required"=>false, "default"=>"normal"}, - "queue_capacity" => {"type"=>"int", "description"=>"Controls how many inference requests are allowed in the queue at a time.", "required"=>false, "default"=>1024}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the amount of time to wait for the model to deploy.", "default"=>"20s"}, - "wait_for" => {"type"=>"string", "required"=>false, "description"=>"The allocation status for which to wait", "options"=>["starting", "started", "fully_allocated"], "default"=>"started"}, - } + parts: [ + "model_id", + ], + params: [ + "cache_size", + "number_of_allocations", + "threads_per_allocation", + "priority", + "queue_capacity", + "timeout", + "wait_for", + ] } ), "ml.stop_data_frame_analytics" => RestApi.new( @@ -4102,14 +4102,14 @@ def initialize url: { path: "/_ml/data_frame/analytics/{id}/_stop", paths: ["/_ml/data_frame/analytics/{id}/_stop"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to stop"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)"}, - "force" => {"type"=>"boolean", "required"=>false, "description"=>"True if the data frame analytics should be forcefully stopped"}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait until the task has stopped. Defaults to 20 seconds"}, - } + parts: [ + "id", + ], + params: [ + "allow_no_match", + "force", + "timeout", + ] } ), "ml.stop_datafeed" => RestApi.new( @@ -4119,15 +4119,15 @@ def initialize url: { path: "/_ml/datafeeds/{datafeed_id}/_stop", paths: ["/_ml/datafeeds/{datafeed_id}/_stop"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeed to stop"}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"}, - "allow_no_datafeeds" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)", "deprecated"=>true}, - "force" => {"type"=>"boolean", "required"=>false, "description"=>"True if the datafeed should be forcefully stopped."}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait until a datafeed has stopped. Default to 20 seconds"}, - } + parts: [ + "datafeed_id", + ], + params: [ + "allow_no_match", + "allow_no_datafeeds", + "force", + "timeout", + ] } ), "ml.stop_trained_model_deployment" => RestApi.new( @@ -4137,13 +4137,13 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/deployment/_stop", paths: ["/_ml/trained_models/{model_id}/deployment/_stop"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The unique identifier of the trained model.", "required"=>true}, - }, - params: { - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no deployments. (This includes `_all` string or when no deployments have been specified)"}, - "force" => {"type"=>"boolean", "required"=>false, "description"=>"True if the deployment should be forcefully stopped"}, - } + parts: [ + "model_id", + ], + params: [ + "allow_no_match", + "force", + ] } ), "ml.update_data_frame_analytics" => RestApi.new( @@ -4153,9 +4153,9 @@ def initialize url: { path: "/_ml/data_frame/analytics/{id}/_update", paths: ["/_ml/data_frame/analytics/{id}/_update"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the data frame analytics to update"}, - }, + parts: [ + "id", + ], } ), "ml.update_datafeed" => RestApi.new( @@ -4165,15 +4165,15 @@ def initialize url: { path: "/_ml/datafeeds/{datafeed_id}/_update", paths: ["/_ml/datafeeds/{datafeed_id}/_update"], - parts: { - "datafeed_id" => {"type"=>"string", "description"=>"The ID of the datafeed to update"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if the source indices expressions resolves to no concrete indices (default: true)"}, - "ignore_throttled" => {"type"=>"boolean", "description"=>"Ignore indices that are marked as throttled (default: true)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "description"=>"Whether source index expressions should get expanded to open or closed indices (default: open)"}, - } + parts: [ + "datafeed_id", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "ignore_throttled", + "expand_wildcards", + ] } ), "ml.update_filter" => RestApi.new( @@ -4183,9 +4183,9 @@ def initialize url: { path: "/_ml/filters/{filter_id}/_update", paths: ["/_ml/filters/{filter_id}/_update"], - parts: { - "filter_id" => {"type"=>"string", "description"=>"The ID of the filter to update"}, - }, + parts: [ + "filter_id", + ], } ), "ml.update_job" => RestApi.new( @@ -4195,9 +4195,9 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/_update", paths: ["/_ml/anomaly_detectors/{job_id}/_update"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to create"}, - }, + parts: [ + "job_id", + ], } ), "ml.update_model_snapshot" => RestApi.new( @@ -4207,10 +4207,10 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update", paths: ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job to fetch"}, - "snapshot_id" => {"type"=>"string", "description"=>"The ID of the snapshot to update"}, - }, + parts: [ + "job_id", + "snapshot_id", + ], } ), "ml.update_trained_model_deployment" => RestApi.new( @@ -4220,9 +4220,9 @@ def initialize url: { path: "/_ml/trained_models/{model_id}/deployment/_update", paths: ["/_ml/trained_models/{model_id}/deployment/_update"], - parts: { - "model_id" => {"type"=>"string", "description"=>"The unique identifier of the trained model."}, - }, + parts: [ + "model_id", + ], } ), "ml.upgrade_job_snapshot" => RestApi.new( @@ -4232,14 +4232,14 @@ def initialize url: { path: "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade", paths: ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade"], - parts: { - "job_id" => {"type"=>"string", "description"=>"The ID of the job"}, - "snapshot_id" => {"type"=>"string", "description"=>"The ID of the snapshot"}, - }, - params: { - "timeout" => {"type"=>"time", "required"=>false, "description"=>"How long should the API wait for the job to be opened and the old snapshot to be loaded."}, - "wait_for_completion" => {"type"=>"boolean", "required"=>false, "description"=>"Should the request wait until the task is complete before responding to the caller. Default is false."}, - } + parts: [ + "job_id", + "snapshot_id", + ], + params: [ + "timeout", + "wait_for_completion", + ] } ), "ml.validate" => RestApi.new( @@ -4267,14 +4267,14 @@ def initialize url: { path: "/_monitoring/bulk", paths: ["/_monitoring/bulk", "/_monitoring/{type}/bulk"], - parts: { - "type" => {"type"=>"string", "description"=>"Default document type for items which don't provide one", "deprecated"=>true}, - }, - params: { - "system_id" => {"type"=>"string", "description"=>"Identifier of the monitored system"}, - "system_api_version" => {"type"=>"string", "description"=>"API Version of the monitored system"}, - "interval" => {"type"=>"string", "description"=>"Collection interval (e.g., '10s' or '10000ms') of the payload"}, - } + parts: [ + "type", + ], + params: [ + "system_id", + "system_api_version", + "interval", + ] } ), "msearch" => RestApi.new( @@ -4284,18 +4284,18 @@ def initialize url: { path: "/_msearch", paths: ["/_msearch", "/{index}/_msearch"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}, - }, - params: { - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "max_concurrent_searches" => {"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "pre_filter_shard_size" => {"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint."}, - "max_concurrent_shard_requests" => {"type"=>"number", "description"=>"The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>5}, - "rest_total_hits_as_int" => {"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, - "ccs_minimize_roundtrips" => {"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}, - } + parts: [ + "index", + ], + params: [ + "search_type", + "max_concurrent_searches", + "typed_keys", + "pre_filter_shard_size", + "max_concurrent_shard_requests", + "rest_total_hits_as_int", + "ccs_minimize_roundtrips", + ] } ), "msearch_template" => RestApi.new( @@ -4305,16 +4305,16 @@ def initialize url: { path: "/_msearch/template", paths: ["/_msearch/template", "/{index}/_msearch/template"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}, - }, - params: { - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "max_concurrent_searches" => {"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, - "rest_total_hits_as_int" => {"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, - "ccs_minimize_roundtrips" => {"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}, - } + parts: [ + "index", + ], + params: [ + "search_type", + "typed_keys", + "max_concurrent_searches", + "rest_total_hits_as_int", + "ccs_minimize_roundtrips", + ] } ), "mtermvectors" => RestApi.new( @@ -4324,23 +4324,23 @@ def initialize url: { path: "/_mtermvectors", paths: ["/_mtermvectors", "/{index}/_mtermvectors"], - parts: { - "index" => {"type"=>"string", "description"=>"The index in which the document resides."}, - }, - params: { - "ids" => {"type"=>"list", "description"=>"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body"}, - "term_statistics" => {"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>false}, - "field_statistics" => {"type"=>"boolean", "description"=>"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, - "offsets" => {"type"=>"boolean", "description"=>"Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true}, - "positions" => {"type"=>"boolean", "description"=>"Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true}, - "payloads" => {"type"=>"boolean", "description"=>"Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, - "realtime" => {"type"=>"boolean", "description"=>"Specifies if requests are real-time as opposed to near-real-time (default: true)."}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - } + parts: [ + "index", + ], + params: [ + "ids", + "term_statistics", + "field_statistics", + "fields", + "offsets", + "positions", + "payloads", + "preference", + "routing", + "realtime", + "version", + "version_type", + ] } ), "nodes.clear_repositories_metering_archive" => RestApi.new( @@ -4350,10 +4350,10 @@ def initialize url: { path: "/_nodes/{node_id}/_repositories_metering/{max_archive_version}", paths: ["/_nodes/{node_id}/_repositories_metering/{max_archive_version}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"Comma-separated list of node IDs or names used to limit returned information."}, - "max_archive_version" => {"type"=>"long", "description"=>"Specifies the maximum archive_version to be cleared from the archive."}, - }, + parts: [ + "node_id", + "max_archive_version", + ], } ), "nodes.get_repositories_metering_info" => RestApi.new( @@ -4363,9 +4363,9 @@ def initialize url: { path: "/_nodes/{node_id}/_repositories_metering", paths: ["/_nodes/{node_id}/_repositories_metering"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information."}, - }, + parts: [ + "node_id", + ], } ), "nodes.hot_threads" => RestApi.new( @@ -4375,18 +4375,18 @@ def initialize url: { path: "/_nodes/hot_threads", paths: ["/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - }, - params: { - "interval" => {"type"=>"time", "description"=>"The interval for the second sampling of threads"}, - "snapshots" => {"type"=>"number", "description"=>"Number of samples of thread stacktrace (default: 10)"}, - "threads" => {"type"=>"number", "description"=>"Specify the number of threads to provide information for (default: 3)"}, - "ignore_idle_threads" => {"type"=>"boolean", "description"=>"Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)"}, - "type" => {"type"=>"enum", "options"=>["cpu", "wait", "block", "mem"], "description"=>"The type to sample (default: cpu)"}, - "sort" => {"type"=>"enum", "options"=>["cpu", "total"], "description"=>"The sort order for 'cpu' type (default: total)"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + ], + params: [ + "interval", + "snapshots", + "threads", + "ignore_idle_threads", + "type", + "sort", + "timeout", + ] } ), "nodes.info" => RestApi.new( @@ -4396,14 +4396,14 @@ def initialize url: { path: "/_nodes", paths: ["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "metric" => {"type"=>"list", "options"=>["settings", "os", "process", "jvm", "thread_pool", "transport", "http", "plugins", "ingest", "indices", "aggregations", "_all", "_none"], "description"=>"A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics."}, - }, - params: { - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + "metric", + ], + params: [ + "flat_settings", + "timeout", + ] } ), "nodes.reload_secure_settings" => RestApi.new( @@ -4413,12 +4413,12 @@ def initialize url: { path: "/_nodes/reload_secure_settings", paths: ["/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes."}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + ], + params: [ + "timeout", + ] } ), "nodes.stats" => RestApi.new( @@ -4428,22 +4428,22 @@ def initialize url: { path: "/_nodes/stats", paths: ["/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "metric" => {"type"=>"list", "options"=>["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description"=>"Limit the information returned to the specified metrics"}, - "index_metric" => {"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "bulk", "shard_stats"], "description"=>"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."}, - }, - params: { - "completion_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for the `completion` index metric (supports wildcards)"}, - "fielddata_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for the `fielddata` index metric (supports wildcards)"}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, - "groups" => {"type"=>"boolean", "description"=>"A comma-separated list of search groups for `search` index metric"}, - "level" => {"type"=>"enum", "description"=>"Return indices stats aggregated at index, node or shard level", "options"=>["indices", "node", "shards"], "default"=>"node"}, - "types" => {"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "include_segment_file_sizes" => {"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}, - "include_unloaded_segments" => {"type"=>"boolean", "description"=>"If set to true segment stats will include stats for segments that are not currently loaded into memory", "default"=>false}, - } + parts: [ + "node_id", + "metric", + "index_metric", + ], + params: [ + "completion_fields", + "fielddata_fields", + "fields", + "groups", + "level", + "types", + "timeout", + "include_segment_file_sizes", + "include_unloaded_segments", + ] } ), "nodes.usage" => RestApi.new( @@ -4453,13 +4453,13 @@ def initialize url: { path: "/_nodes/usage", paths: ["/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "metric" => {"type"=>"list", "options"=>["_all", "rest_actions"], "description"=>"Limit the information returned to the specified metrics"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "node_id", + "metric", + ], + params: [ + "timeout", + ] } ), "open_point_in_time" => RestApi.new( @@ -4469,16 +4469,16 @@ def initialize url: { path: "/{index}/_pit", paths: ["/{index}/_pit"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "keep_alive" => {"type"=>"string", "description"=>"Specific the time to live for the point in time", "required"=>true}, - } + parts: [ + "index", + ], + params: [ + "preference", + "routing", + "ignore_unavailable", + "expand_wildcards", + "keep_alive", + ] } ), "ping" => RestApi.new( @@ -4497,15 +4497,15 @@ def initialize url: { path: "/_scripts/{id}", paths: ["/_scripts/{id}", "/_scripts/{id}/{context}"], - parts: { - "id" => {"type"=>"string", "description"=>"Script ID"}, - "context" => {"type"=>"string", "description"=>"Script context"}, - }, - params: { - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "context" => {"type"=>"string", "description"=>"Context name to compile script against"}, - } + parts: [ + "id", + "context", + ], + params: [ + "timeout", + "master_timeout", + "context", + ] } ), "rank_eval" => RestApi.new( @@ -4515,15 +4515,15 @@ def initialize url: { path: "/_rank_eval", paths: ["/_rank_eval", "/{index}/_rank_eval"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "search_type", + ] } ), "reindex" => RestApi.new( @@ -4533,16 +4533,16 @@ def initialize url: { path: "/_reindex", paths: ["/_reindex"], - params: { - "refresh" => {"type"=>"boolean", "description"=>"Should the affected indexes be refreshed?"}, - "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the reindex is complete."}, - "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, - "scroll" => {"type"=>"time", "description"=>"Control how long to keep the search context alive", "default"=>"5m"}, - "slices" => {"type"=>"number|string", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}, - "max_docs" => {"type"=>"number", "description"=>"Maximum number of documents to process (default: all documents)"}, - } + params: [ + "refresh", + "timeout", + "wait_for_active_shards", + "wait_for_completion", + "requests_per_second", + "scroll", + "slices", + "max_docs", + ] } ), "reindex_rethrottle" => RestApi.new( @@ -4552,12 +4552,12 @@ def initialize url: { path: "/_reindex/{task_id}/_rethrottle", paths: ["/_reindex/{task_id}/_rethrottle"], - parts: { - "task_id" => {"type"=>"string", "description"=>"The task id to rethrottle"}, - }, - params: { - "requests_per_second" => {"type"=>"number", "required"=>true, "description"=>"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}, - } + parts: [ + "task_id", + ], + params: [ + "requests_per_second", + ] } ), "render_search_template" => RestApi.new( @@ -4567,9 +4567,9 @@ def initialize url: { path: "/_render/template", paths: ["/_render/template", "/_render/template/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The id of the stored search template"}, - }, + parts: [ + "id", + ], } ), "rollup.delete_job" => RestApi.new( @@ -4579,9 +4579,9 @@ def initialize url: { path: "/_rollup/job/{id}", paths: ["/_rollup/job/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the job to delete"}, - }, + parts: [ + "id", + ], } ), "rollup.get_jobs" => RestApi.new( @@ -4591,9 +4591,9 @@ def initialize url: { path: "/_rollup/job/{id}", paths: ["/_rollup/job/{id}", "/_rollup/job/"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs"}, - }, + parts: [ + "id", + ], } ), "rollup.get_rollup_caps" => RestApi.new( @@ -4603,9 +4603,9 @@ def initialize url: { path: "/_rollup/data/{id}", paths: ["/_rollup/data/{id}", "/_rollup/data/"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the index to check rollup capabilities on, or left blank for all jobs"}, - }, + parts: [ + "id", + ], } ), "rollup.get_rollup_index_caps" => RestApi.new( @@ -4615,9 +4615,9 @@ def initialize url: { path: "/{index}/_rollup/data", paths: ["/{index}/_rollup/data"], - parts: { - "index" => {"type"=>"string", "description"=>"The rollup index or index pattern to obtain rollup capabilities from."}, - }, + parts: [ + "index", + ], } ), "rollup.put_job" => RestApi.new( @@ -4627,9 +4627,9 @@ def initialize url: { path: "/_rollup/job/{id}", paths: ["/_rollup/job/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the job to create"}, - }, + parts: [ + "id", + ], } ), "rollup.rollup_search" => RestApi.new( @@ -4639,13 +4639,13 @@ def initialize url: { path: "/{index}/_rollup_search", paths: ["/{index}/_rollup_search"], - parts: { - "index" => {"type"=>"list", "description"=>"The indices or index-pattern(s) (containing rollup or regular data) that should be searched"}, - }, - params: { - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "rest_total_hits_as_int" => {"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, - } + parts: [ + "index", + ], + params: [ + "typed_keys", + "rest_total_hits_as_int", + ] } ), "rollup.start_job" => RestApi.new( @@ -4655,9 +4655,9 @@ def initialize url: { path: "/_rollup/job/{id}/_start", paths: ["/_rollup/job/{id}/_start"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the job to start"}, - }, + parts: [ + "id", + ], } ), "rollup.stop_job" => RestApi.new( @@ -4667,13 +4667,13 @@ def initialize url: { path: "/_rollup/job/{id}/_stop", paths: ["/_rollup/job/{id}/_stop"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the job to stop"}, - }, - params: { - "wait_for_completion" => {"type"=>"boolean", "required"=>false, "description"=>"True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false."}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s."}, - } + parts: [ + "id", + ], + params: [ + "wait_for_completion", + "timeout", + ] } ), "scripts_painless_execute" => RestApi.new( @@ -4692,14 +4692,14 @@ def initialize url: { path: "/_search/scroll", paths: ["/_search/scroll", "/_search/scroll/{scroll_id}"], - parts: { - "scroll_id" => {"type"=>"string", "description"=>"The scroll ID", "deprecated"=>true}, - }, - params: { - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "scroll_id" => {"type"=>"string", "description"=>"The scroll ID for scrolled search"}, - "rest_total_hits_as_int" => {"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, - } + parts: [ + "scroll_id", + ], + params: [ + "scroll", + "scroll_id", + "rest_total_hits_as_int", + ] } ), "search" => RestApi.new( @@ -4709,55 +4709,55 @@ def initialize url: { path: "/_search", paths: ["/_search", "/{index}/_search"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "ccs_minimize_roundtrips" => {"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "explain" => {"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, - "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return as part of a hit"}, - "docvalue_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, - "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, - "force_synthetic_source" => {"type"=>"boolean", "description"=>"Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.", "visibility"=>"feature_flag", "feature_flag"=>"es.index_mode_feature_flag_registered"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "ignore_throttled" => {"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "size" => {"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, - "sort" => {"type"=>"list", "description"=>"A comma-separated list of : pairs"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, - "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, - "suggest_field" => {"type"=>"string", "description"=>"Specify which field to use for suggestions"}, - "suggest_mode" => {"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, - "suggest_size" => {"type"=>"number", "description"=>"How many suggestions to return in response"}, - "suggest_text" => {"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "track_scores" => {"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, - "track_total_hits" => {"type"=>"boolean|long", "description"=>"Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number."}, - "allow_partial_search_results" => {"type"=>"boolean", "default"=>true, "description"=>"Indicate if an error should be returned if there is a partial search failure or timeout"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, - "seq_no_primary_term" => {"type"=>"boolean", "description"=>"Specify whether to return sequence number and primary term of the last modification of each hit"}, - "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, - "batched_reduce_size" => {"type"=>"number", "description"=>"The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.", "default"=>512}, - "max_concurrent_shard_requests" => {"type"=>"number", "description"=>"The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>5}, - "pre_filter_shard_size" => {"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint."}, - "rest_total_hits_as_int" => {"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, - "min_compatible_shard_node" => {"type"=>"string", "description"=>"The minimum compatible version that all shards involved in search should have for this request to be successful"}, - } + parts: [ + "index", + ], + params: [ + "analyzer", + "analyze_wildcard", + "ccs_minimize_roundtrips", + "default_operator", + "df", + "explain", + "stored_fields", + "docvalue_fields", + "from", + "force_synthetic_source", + "ignore_unavailable", + "ignore_throttled", + "allow_no_indices", + "expand_wildcards", + "lenient", + "preference", + "q", + "routing", + "scroll", + "search_type", + "size", + "sort", + "_source", + "_source_excludes", + "_source_includes", + "terminate_after", + "stats", + "suggest_field", + "suggest_mode", + "suggest_size", + "suggest_text", + "timeout", + "track_scores", + "track_total_hits", + "allow_partial_search_results", + "typed_keys", + "version", + "seq_no_primary_term", + "request_cache", + "batched_reduce_size", + "max_concurrent_shard_requests", + "pre_filter_shard_size", + "rest_total_hits_as_int", + "min_compatible_shard_node", + ] } ), "search_mvt" => RestApi.new( @@ -4767,22 +4767,22 @@ def initialize url: { path: "/{index}/_mvt/{field}/{zoom}/{x}/{y}", paths: ["/{index}/_mvt/{field}/{zoom}/{x}/{y}"], - parts: { - "index" => {"type"=>"list", "description"=>"Comma-separated list of data streams, indices, or aliases to search"}, - "field" => {"type"=>"string", "description"=>"Field containing geospatial data to return"}, - "zoom" => {"type"=>"int", "description"=>"Zoom level for the vector tile to search"}, - "x" => {"type"=>"int", "description"=>"X coordinate for the vector tile to search"}, - "y" => {"type"=>"int", "description"=>"Y coordinate for the vector tile to search"}, - }, - params: { - "exact_bounds" => {"type"=>"boolean", "description"=>"If false, the meta layer's feature is the bounding box of the tile. If true, the meta layer's feature is a bounding box resulting from a `geo_bounds` aggregation.", "default"=>false}, - "extent" => {"type"=>"int", "description"=>"Size, in pixels, of a side of the vector tile.", "default"=>4096}, - "grid_precision" => {"type"=>"int", "description"=>"Additional zoom levels available through the aggs layer. Accepts 0-8.", "default"=>8}, - "grid_type" => {"type"=>"enum", "options"=>["grid", "point", "centroid"], "description"=>"Determines the geometry type for features in the aggs layer.", "default"=>"grid"}, - "size" => {"type"=>"int", "description"=>"Maximum number of features to return in the hits layer. Accepts 0-10000.", "default"=>10000}, - "track_total_hits" => {"type"=>"boolean|long", "description"=>"Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number."}, - "with_labels" => {"type"=>"boolean", "description"=>"If true, the hits and aggs layers will contain additional point features with suggested label positions for the original features.", "default"=>false}, - } + parts: [ + "index", + "field", + "zoom", + "x", + "y", + ], + params: [ + "exact_bounds", + "extent", + "grid_precision", + "grid_type", + "size", + "track_total_hits", + "with_labels", + ] } ), "search_shards" => RestApi.new( @@ -4792,17 +4792,17 @@ def initialize url: { path: "/_search_shards", paths: ["/_search_shards", "/{index}/_search_shards"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: [ + "index", + ], + params: [ + "preference", + "routing", + "local", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + ] } ), "search_template" => RestApi.new( @@ -4812,24 +4812,24 @@ def initialize url: { path: "/_search/template", paths: ["/_search/template", "/{index}/_search/template"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "ignore_throttled" => {"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "explain" => {"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, - "profile" => {"type"=>"boolean", "description"=>"Specify whether to profile the query execution"}, - "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, - "rest_total_hits_as_int" => {"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, - "ccs_minimize_roundtrips" => {"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "ignore_throttled", + "allow_no_indices", + "expand_wildcards", + "preference", + "routing", + "scroll", + "search_type", + "explain", + "profile", + "typed_keys", + "rest_total_hits_as_int", + "ccs_minimize_roundtrips", + ] } ), "searchable_snapshots.cache_stats" => RestApi.new( @@ -4839,9 +4839,9 @@ def initialize url: { path: "/_searchable_snapshots/cache/stats", paths: ["/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats"], - parts: { - "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - }, + parts: [ + "node_id", + ], } ), "searchable_snapshots.clear_cache" => RestApi.new( @@ -4851,15 +4851,15 @@ def initialize url: { path: "/_searchable_snapshots/cache/clear", paths: ["/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, - }, - params: { - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "index" => {"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, - } + parts: [ + "index", + ], + params: [ + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards", + "index", + ] } ), "searchable_snapshots.mount" => RestApi.new( @@ -4869,15 +4869,15 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}/_mount", paths: ["/_snapshot/{repository}/{snapshot}/_mount"], - parts: { - "repository" => {"type"=>"string", "description"=>"The name of the repository containing the snapshot of the index to mount"}, - "snapshot" => {"type"=>"string", "description"=>"The name of the snapshot of the index to mount"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}, - "storage" => {"type"=>"string", "description"=>"Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy`", "default"=>false}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "wait_for_completion", + "storage", + ] } ), "searchable_snapshots.stats" => RestApi.new( @@ -4887,12 +4887,12 @@ def initialize url: { path: "/_searchable_snapshots/stats", paths: ["/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, - }, - params: { - "level" => {"type"=>"enum", "description"=>"Return stats aggregated at cluster, index or shard level", "options"=>["cluster", "indices", "shards"], "default"=>"indices"}, - } + parts: [ + "index", + ], + params: [ + "level", + ] } ), "security.activate_user_profile" => RestApi.new( @@ -4929,12 +4929,12 @@ def initialize url: { path: "/_security/user/{username}/_password", paths: ["/_security/user/{username}/_password", "/_security/user/_password"], - parts: { - "username" => {"type"=>"string", "description"=>"The username of the user to change the password for"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "username", + ], + params: [ + "refresh", + ] } ), "security.clear_api_key_cache" => RestApi.new( @@ -4944,9 +4944,9 @@ def initialize url: { path: "/_security/api_key/{ids}/_clear_cache", paths: ["/_security/api_key/{ids}/_clear_cache"], - parts: { - "ids" => {"type"=>"list", "description"=>"A comma-separated list of IDs of API keys to clear from the cache"}, - }, + parts: [ + "ids", + ], } ), "security.clear_cached_privileges" => RestApi.new( @@ -4956,9 +4956,9 @@ def initialize url: { path: "/_security/privilege/{application}/_clear_cache", paths: ["/_security/privilege/{application}/_clear_cache"], - parts: { - "application" => {"type"=>"list", "description"=>"A comma-separated list of application names"}, - }, + parts: [ + "application", + ], } ), "security.clear_cached_realms" => RestApi.new( @@ -4968,12 +4968,12 @@ def initialize url: { path: "/_security/realm/{realms}/_clear_cache", paths: ["/_security/realm/{realms}/_clear_cache"], - parts: { - "realms" => {"type"=>"list", "description"=>"Comma-separated list of realms to clear"}, - }, - params: { - "usernames" => {"type"=>"list", "description"=>"Comma-separated list of usernames to clear from the cache", "required"=>false}, - } + parts: [ + "realms", + ], + params: [ + "usernames", + ] } ), "security.clear_cached_roles" => RestApi.new( @@ -4983,9 +4983,9 @@ def initialize url: { path: "/_security/role/{name}/_clear_cache", paths: ["/_security/role/{name}/_clear_cache"], - parts: { - "name" => {"type"=>"list", "description"=>"Role name"}, - }, + parts: [ + "name", + ], } ), "security.clear_cached_service_tokens" => RestApi.new( @@ -4995,11 +4995,11 @@ def initialize url: { path: "/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache", paths: ["/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache"], - parts: { - "namespace" => {"type"=>"string", "description"=>"An identifier for the namespace"}, - "service" => {"type"=>"string", "description"=>"An identifier for the service name"}, - "name" => {"type"=>"list", "description"=>"A comma-separated list of service token names"}, - }, + parts: [ + "namespace", + "service", + "name", + ], } ), "security.create_api_key" => RestApi.new( @@ -5009,9 +5009,9 @@ def initialize url: { path: "/_security/api_key", paths: ["/_security/api_key"], - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + params: [ + "refresh", + ] } ), "security.create_service_token" => RestApi.new( @@ -5021,14 +5021,14 @@ def initialize url: { path: "/_security/service/{namespace}/{service}/credential/token/{name}", paths: ["/_security/service/{namespace}/{service}/credential/token/{name}", "/_security/service/{namespace}/{service}/credential/token"], - parts: { - "namespace" => {"type"=>"string", "description"=>"An identifier for the namespace"}, - "service" => {"type"=>"string", "description"=>"An identifier for the service name"}, - "name" => {"type"=>"string", "description"=>"An identifier for the token name"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "namespace", + "service", + "name", + ], + params: [ + "refresh", + ] } ), "security.delete_privileges" => RestApi.new( @@ -5038,13 +5038,13 @@ def initialize url: { path: "/_security/privilege/{application}/{name}", paths: ["/_security/privilege/{application}/{name}"], - parts: { - "application" => {"type"=>"string", "description"=>"Application name"}, - "name" => {"type"=>"string", "description"=>"Privilege name"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "application", + "name", + ], + params: [ + "refresh", + ] } ), "security.delete_role" => RestApi.new( @@ -5054,12 +5054,12 @@ def initialize url: { path: "/_security/role/{name}", paths: ["/_security/role/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"Role name"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "name", + ], + params: [ + "refresh", + ] } ), "security.delete_role_mapping" => RestApi.new( @@ -5069,12 +5069,12 @@ def initialize url: { path: "/_security/role_mapping/{name}", paths: ["/_security/role_mapping/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"Role-mapping name"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "name", + ], + params: [ + "refresh", + ] } ), "security.delete_service_token" => RestApi.new( @@ -5084,14 +5084,14 @@ def initialize url: { path: "/_security/service/{namespace}/{service}/credential/token/{name}", paths: ["/_security/service/{namespace}/{service}/credential/token/{name}"], - parts: { - "namespace" => {"type"=>"string", "description"=>"An identifier for the namespace"}, - "service" => {"type"=>"string", "description"=>"An identifier for the service name"}, - "name" => {"type"=>"string", "description"=>"An identifier for the token name"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "namespace", + "service", + "name", + ], + params: [ + "refresh", + ] } ), "security.delete_user" => RestApi.new( @@ -5101,12 +5101,12 @@ def initialize url: { path: "/_security/user/{username}", paths: ["/_security/user/{username}"], - parts: { - "username" => {"type"=>"string", "description"=>"username"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "username", + ], + params: [ + "refresh", + ] } ), "security.disable_user" => RestApi.new( @@ -5116,12 +5116,12 @@ def initialize url: { path: "/_security/user/{username}/_disable", paths: ["/_security/user/{username}/_disable"], - parts: { - "username" => {"type"=>"string", "description"=>"The username of the user to disable"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "username", + ], + params: [ + "refresh", + ] } ), "security.disable_user_profile" => RestApi.new( @@ -5131,12 +5131,12 @@ def initialize url: { path: "/_security/profile/{uid}/_disable", paths: ["/_security/profile/{uid}/_disable"], - parts: { - "uid" => {"type"=>"string", "description"=>"Unique identifier for the user profile"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "uid", + ], + params: [ + "refresh", + ] } ), "security.enable_user" => RestApi.new( @@ -5146,12 +5146,12 @@ def initialize url: { path: "/_security/user/{username}/_enable", paths: ["/_security/user/{username}/_enable"], - parts: { - "username" => {"type"=>"string", "description"=>"The username of the user to enable"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "username", + ], + params: [ + "refresh", + ] } ), "security.enable_user_profile" => RestApi.new( @@ -5161,12 +5161,12 @@ def initialize url: { path: "/_security/profile/{uid}/_enable", paths: ["/_security/profile/{uid}/_enable"], - parts: { - "uid" => {"type"=>"string", "description"=>"An unique identifier of the user profile"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "uid", + ], + params: [ + "refresh", + ] } ), "security.enroll_kibana" => RestApi.new( @@ -5194,14 +5194,14 @@ def initialize url: { path: "/_security/api_key", paths: ["/_security/api_key"], - params: { - "id" => {"type"=>"string", "description"=>"API key id of the API key to be retrieved"}, - "name" => {"type"=>"string", "description"=>"API key name of the API key to be retrieved"}, - "username" => {"type"=>"string", "description"=>"user name of the user who created this API key to be retrieved"}, - "realm_name" => {"type"=>"string", "description"=>"realm name of the user who created this API key to be retrieved"}, - "owner" => {"type"=>"boolean", "default"=>false, "description"=>"flag to query API keys owned by the currently authenticated user"}, - "with_limited_by" => {"type"=>"boolean", "default"=>false, "description"=>"flag to show the limited-by role descriptors of API Keys"}, - } + params: [ + "id", + "name", + "username", + "realm_name", + "owner", + "with_limited_by", + ] } ), "security.get_builtin_privileges" => RestApi.new( @@ -5220,10 +5220,10 @@ def initialize url: { path: "/_security/privilege", paths: ["/_security/privilege", "/_security/privilege/{application}", "/_security/privilege/{application}/{name}"], - parts: { - "application" => {"type"=>"string", "description"=>"Application name"}, - "name" => {"type"=>"string", "description"=>"Privilege name"}, - }, + parts: [ + "application", + "name", + ], } ), "security.get_role" => RestApi.new( @@ -5233,9 +5233,9 @@ def initialize url: { path: "/_security/role/{name}", paths: ["/_security/role/{name}", "/_security/role"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of role names"}, - }, + parts: [ + "name", + ], } ), "security.get_role_mapping" => RestApi.new( @@ -5245,9 +5245,9 @@ def initialize url: { path: "/_security/role_mapping/{name}", paths: ["/_security/role_mapping/{name}", "/_security/role_mapping"], - parts: { - "name" => {"type"=>"list", "description"=>"A comma-separated list of role-mapping names"}, - }, + parts: [ + "name", + ], } ), "security.get_service_accounts" => RestApi.new( @@ -5257,10 +5257,10 @@ def initialize url: { path: "/_security/service/{namespace}/{service}", paths: ["/_security/service/{namespace}/{service}", "/_security/service/{namespace}", "/_security/service"], - parts: { - "namespace" => {"type"=>"string", "description"=>"An identifier for the namespace"}, - "service" => {"type"=>"string", "description"=>"An identifier for the service name"}, - }, + parts: [ + "namespace", + "service", + ], } ), "security.get_service_credentials" => RestApi.new( @@ -5270,10 +5270,10 @@ def initialize url: { path: "/_security/service/{namespace}/{service}/credential", paths: ["/_security/service/{namespace}/{service}/credential"], - parts: { - "namespace" => {"type"=>"string", "description"=>"An identifier for the namespace"}, - "service" => {"type"=>"string", "description"=>"An identifier for the service name"}, - }, + parts: [ + "namespace", + "service", + ], } ), "security.get_token" => RestApi.new( @@ -5292,12 +5292,12 @@ def initialize url: { path: "/_security/user/{username}", paths: ["/_security/user/{username}", "/_security/user"], - parts: { - "username" => {"type"=>"list", "description"=>"A comma-separated list of usernames"}, - }, - params: { - "with_profile_uid" => {"type"=>"boolean", "default"=>false, "description"=>"flag to retrieve profile uid (if exists) associated to the user"}, - } + parts: [ + "username", + ], + params: [ + "with_profile_uid", + ] } ), "security.get_user_privileges" => RestApi.new( @@ -5316,12 +5316,12 @@ def initialize url: { path: "/_security/profile/{uid}", paths: ["/_security/profile/{uid}"], - parts: { - "uid" => {"type"=>"list", "description"=>"A comma-separated list of unique identifier for user profiles"}, - }, - params: { - "data" => {"type"=>"list", "description"=>"A comma-separated list of keys for which the corresponding application data are retrieved."}, - } + parts: [ + "uid", + ], + params: [ + "data", + ] } ), "security.grant_api_key" => RestApi.new( @@ -5331,9 +5331,9 @@ def initialize url: { path: "/_security/api_key/grant", paths: ["/_security/api_key/grant"], - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + params: [ + "refresh", + ] } ), "security.has_privileges" => RestApi.new( @@ -5343,9 +5343,9 @@ def initialize url: { path: "/_security/user/_has_privileges", paths: ["/_security/user/_has_privileges", "/_security/user/{user}/_has_privileges"], - parts: { - "user" => {"type"=>"string", "description"=>"Username"}, - }, + parts: [ + "user", + ], } ), "security.has_privileges_user_profile" => RestApi.new( @@ -5409,9 +5409,9 @@ def initialize url: { path: "/_security/privilege/", paths: ["/_security/privilege/"], - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + params: [ + "refresh", + ] } ), "security.put_role" => RestApi.new( @@ -5421,12 +5421,12 @@ def initialize url: { path: "/_security/role/{name}", paths: ["/_security/role/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"Role name"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "name", + ], + params: [ + "refresh", + ] } ), "security.put_role_mapping" => RestApi.new( @@ -5436,12 +5436,12 @@ def initialize url: { path: "/_security/role_mapping/{name}", paths: ["/_security/role_mapping/{name}"], - parts: { - "name" => {"type"=>"string", "description"=>"Role-mapping name"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "name", + ], + params: [ + "refresh", + ] } ), "security.put_user" => RestApi.new( @@ -5451,12 +5451,12 @@ def initialize url: { path: "/_security/user/{username}", paths: ["/_security/user/{username}"], - parts: { - "username" => {"type"=>"string", "description"=>"The username of the User"}, - }, - params: { - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "username", + ], + params: [ + "refresh", + ] } ), "security.query_api_keys" => RestApi.new( @@ -5466,9 +5466,9 @@ def initialize url: { path: "/_security/_query/api_key", paths: ["/_security/_query/api_key"], - params: { - "with_limited_by" => {"type"=>"boolean", "default"=>false, "description"=>"flag to show the limited-by role descriptors of API Keys"}, - } + params: [ + "with_limited_by", + ] } ), "security.saml_authenticate" => RestApi.new( @@ -5523,9 +5523,9 @@ def initialize url: { path: "/_security/saml/metadata/{realm_name}", paths: ["/_security/saml/metadata/{realm_name}"], - parts: { - "realm_name" => {"type"=>"string", "description"=>"The name of the SAML realm to get the metadata for"}, - }, + parts: [ + "realm_name", + ], } ), "security.suggest_user_profiles" => RestApi.new( @@ -5535,9 +5535,9 @@ def initialize url: { path: "/_security/profile/_suggest", paths: ["/_security/profile/_suggest"], - params: { - "data" => {"type"=>"list", "description"=>"A comma-separated list of keys for which the corresponding application data are retrieved."}, - } + params: [ + "data", + ] } ), "security.update_api_key" => RestApi.new( @@ -5547,9 +5547,9 @@ def initialize url: { path: "/_security/api_key/{id}", paths: ["/_security/api_key/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The ID of the API key to update"}, - }, + parts: [ + "id", + ], } ), "security.update_user_profile_data" => RestApi.new( @@ -5559,14 +5559,14 @@ def initialize url: { path: "/_security/profile/{uid}/_data", paths: ["/_security/profile/{uid}/_data"], - parts: { - "uid" => {"type"=>"string", "description"=>"An unique identifier of the user profile"}, - }, - params: { - "if_seq_no" => {"type"=>"number", "description"=>"only perform the update operation if the last operation that has changed the document has the specified sequence number"}, - "if_primary_term" => {"type"=>"number", "description"=>"only perform the update operation if the last operation that has changed the document has the specified primary term"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."}, - } + parts: [ + "uid", + ], + params: [ + "if_seq_no", + "if_primary_term", + "refresh", + ] } ), "shutdown.delete_node" => RestApi.new( @@ -5576,9 +5576,9 @@ def initialize url: { path: "/_nodes/{node_id}/shutdown", paths: ["/_nodes/{node_id}/shutdown"], - parts: { - "node_id" => {"type"=>"string", "description"=>"The node id of node to be removed from the shutdown state"}, - }, + parts: [ + "node_id", + ], } ), "shutdown.get_node" => RestApi.new( @@ -5588,9 +5588,9 @@ def initialize url: { path: "/_nodes/shutdown", paths: ["/_nodes/shutdown", "/_nodes/{node_id}/shutdown"], - parts: { - "node_id" => {"type"=>"string", "description"=>"Which node for which to retrieve the shutdown status"}, - }, + parts: [ + "node_id", + ], } ), "shutdown.put_node" => RestApi.new( @@ -5600,9 +5600,9 @@ def initialize url: { path: "/_nodes/{node_id}/shutdown", paths: ["/_nodes/{node_id}/shutdown"], - parts: { - "node_id" => {"type"=>"string", "description"=>"The node id of node to be shut down"}, - }, + parts: [ + "node_id", + ], } ), "slm.delete_lifecycle" => RestApi.new( @@ -5612,9 +5612,9 @@ def initialize url: { path: "/_slm/policy/{policy_id}", paths: ["/_slm/policy/{policy_id}"], - parts: { - "policy_id" => {"type"=>"string", "description"=>"The id of the snapshot lifecycle policy to remove"}, - }, + parts: [ + "policy_id", + ], } ), "slm.execute_lifecycle" => RestApi.new( @@ -5624,9 +5624,9 @@ def initialize url: { path: "/_slm/policy/{policy_id}/_execute", paths: ["/_slm/policy/{policy_id}/_execute"], - parts: { - "policy_id" => {"type"=>"string", "description"=>"The id of the snapshot lifecycle policy to be executed"}, - }, + parts: [ + "policy_id", + ], } ), "slm.execute_retention" => RestApi.new( @@ -5645,9 +5645,9 @@ def initialize url: { path: "/_slm/policy/{policy_id}", paths: ["/_slm/policy/{policy_id}", "/_slm/policy"], - parts: { - "policy_id" => {"type"=>"list", "description"=>"Comma-separated list of snapshot lifecycle policies to retrieve"}, - }, + parts: [ + "policy_id", + ], } ), "slm.get_stats" => RestApi.new( @@ -5675,9 +5675,9 @@ def initialize url: { path: "/_slm/policy/{policy_id}", paths: ["/_slm/policy/{policy_id}"], - parts: { - "policy_id" => {"type"=>"string", "description"=>"The id of the snapshot lifecycle policy"}, - }, + parts: [ + "policy_id", + ], } ), "slm.start" => RestApi.new( @@ -5705,13 +5705,13 @@ def initialize url: { path: "/_snapshot/{repository}/_cleanup", paths: ["/_snapshot/{repository}/_cleanup"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "snapshot.clone" => RestApi.new( @@ -5721,14 +5721,14 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}", paths: ["/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - "snapshot" => {"type"=>"string", "description"=>"The name of the snapshot to clone from"}, - "target_snapshot" => {"type"=>"string", "description"=>"The name of the cloned snapshot to create"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - } + parts: [ + "repository", + "snapshot", + "target_snapshot", + ], + params: [ + "master_timeout", + ] } ), "snapshot.create" => RestApi.new( @@ -5738,14 +5738,14 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - "snapshot" => {"type"=>"string", "description"=>"A snapshot name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "wait_for_completion", + ] } ), "snapshot.create_repository" => RestApi.new( @@ -5755,14 +5755,14 @@ def initialize url: { path: "/_snapshot/{repository}", paths: ["/_snapshot/{repository}"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "verify" => {"type"=>"boolean", "description"=>"Whether to verify the repository after creation"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "timeout", + "verify", + ] } ), "snapshot.delete" => RestApi.new( @@ -5772,13 +5772,13 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - "snapshot" => {"type"=>"list", "description"=>"A comma-separated list of snapshot names"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + ] } ), "snapshot.delete_repository" => RestApi.new( @@ -5788,13 +5788,13 @@ def initialize url: { path: "/_snapshot/{repository}", paths: ["/_snapshot/{repository}"], - parts: { - "repository" => {"type"=>"list", "description"=>"Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported."}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "snapshot.get" => RestApi.new( @@ -5804,25 +5804,25 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - "snapshot" => {"type"=>"list", "description"=>"A comma-separated list of snapshot names"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}, - "index_names" => {"type"=>"boolean", "description"=>"Whether to include the name of each index in the snapshot. Defaults to true."}, - "index_details" => {"type"=>"boolean", "description"=>"Whether to include details of each index in the snapshot, if those details are available. Defaults to false."}, - "include_repository" => {"type"=>"boolean", "description"=>"Whether to include the repository name in the snapshot info. Defaults to true."}, - "sort" => {"type"=>"enum", "default"=>"start_time", "options"=>["start_time", "duration", "name", "repository", "index_count", "shard_count", "failed_shard_count"], "description"=>"Allows setting a sort order for the result. Defaults to start_time"}, - "size" => {"type"=>"integer", "description"=>"Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit."}, - "order" => {"type"=>"enum", "default"=>"asc", "options"=>["asc", "desc"], "description"=>"Sort order"}, - "from_sort_value" => {"type"=>"string", "description"=>"Value of the current sort column at which to start retrieval."}, - "after" => {"type"=>"string", "description"=>"Offset identifier to start pagination from as returned by the 'next' field in the response body."}, - "offset" => {"type"=>"integer", "description"=>"Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0"}, - "slm_policy_filter" => {"type"=>"string", "description"=>"Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern '_none' to match snapshots without an SLM policy"}, - "verbose" => {"type"=>"boolean", "description"=>"Whether to show verbose snapshot info or only show the basic info found in the repository index blob"}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "ignore_unavailable", + "index_names", + "index_details", + "include_repository", + "sort", + "size", + "order", + "from_sort_value", + "after", + "offset", + "slm_policy_filter", + "verbose", + ] } ), "snapshot.get_repository" => RestApi.new( @@ -5832,13 +5832,13 @@ def initialize url: { path: "/_snapshot", paths: ["/_snapshot", "/_snapshot/{repository}"], - parts: { - "repository" => {"type"=>"list", "description"=>"A comma-separated list of repository names"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "local", + ] } ), "snapshot.repository_analyze" => RestApi.new( @@ -5848,22 +5848,22 @@ def initialize url: { path: "/_snapshot/{repository}/_analyze", paths: ["/_snapshot/{repository}/_analyze"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - }, - params: { - "blob_count" => {"type"=>"number", "description"=>"Number of blobs to create during the test. Defaults to 100."}, - "concurrency" => {"type"=>"number", "description"=>"Number of operations to run concurrently during the test. Defaults to 10."}, - "read_node_count" => {"type"=>"number", "description"=>"Number of nodes on which to read a blob after writing. Defaults to 10."}, - "early_read_node_count" => {"type"=>"number", "description"=>"Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2."}, - "seed" => {"type"=>"number", "description"=>"Seed for the random number generator used to create the test workload. Defaults to a random value."}, - "rare_action_probability" => {"type"=>"number", "description"=>"Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02."}, - "max_blob_size" => {"type"=>"string", "description"=>"Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'."}, - "max_total_data_size" => {"type"=>"string", "description"=>"Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'."}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout. Defaults to '30s'."}, - "detailed" => {"type"=>"boolean", "description"=>"Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned."}, - "rarely_abort_writes" => {"type"=>"boolean", "description"=>"Whether to rarely abort writes before they complete. Defaults to 'true'."}, - } + parts: [ + "repository", + ], + params: [ + "blob_count", + "concurrency", + "read_node_count", + "early_read_node_count", + "seed", + "rare_action_probability", + "max_blob_size", + "max_total_data_size", + "timeout", + "detailed", + "rarely_abort_writes", + ] } ), "snapshot.restore" => RestApi.new( @@ -5873,14 +5873,14 @@ def initialize url: { path: "/_snapshot/{repository}/{snapshot}/_restore", paths: ["/_snapshot/{repository}/{snapshot}/_restore"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - "snapshot" => {"type"=>"string", "description"=>"A snapshot name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "wait_for_completion", + ] } ), "snapshot.status" => RestApi.new( @@ -5890,14 +5890,14 @@ def initialize url: { path: "/_snapshot/_status", paths: ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - "snapshot" => {"type"=>"list", "description"=>"A comma-separated list of snapshot names"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}, - } + parts: [ + "repository", + "snapshot", + ], + params: [ + "master_timeout", + "ignore_unavailable", + ] } ), "snapshot.verify_repository" => RestApi.new( @@ -5907,13 +5907,13 @@ def initialize url: { path: "/_snapshot/{repository}/_verify", paths: ["/_snapshot/{repository}/_verify"], - parts: { - "repository" => {"type"=>"string", "description"=>"A repository name"}, - }, - params: { - "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "repository", + ], + params: [ + "master_timeout", + "timeout", + ] } ), "sql.clear_cursor" => RestApi.new( @@ -5932,9 +5932,9 @@ def initialize url: { path: "/_sql/async/delete/{id}", paths: ["/_sql/async/delete/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, + parts: [ + "id", + ], } ), "sql.get_async" => RestApi.new( @@ -5944,15 +5944,15 @@ def initialize url: { path: "/_sql/async/{id}", paths: ["/_sql/async/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, - params: { - "delimiter" => {"type"=>"string", "description"=>"Separator for CSV results", "default"=>","}, - "format" => {"type"=>"string", "description"=>"Short version of the Accept header, e.g. json, yaml"}, - "keep_alive" => {"type"=>"time", "description"=>"Retention period for the search and its results", "default"=>"5d"}, - "wait_for_completion_timeout" => {"type"=>"time", "description"=>"Duration to wait for complete results"}, - } + parts: [ + "id", + ], + params: [ + "delimiter", + "format", + "keep_alive", + "wait_for_completion_timeout", + ] } ), "sql.get_async_status" => RestApi.new( @@ -5962,9 +5962,9 @@ def initialize url: { path: "/_sql/async/status/{id}", paths: ["/_sql/async/status/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"The async search ID"}, - }, + parts: [ + "id", + ], } ), "sql.query" => RestApi.new( @@ -5974,9 +5974,9 @@ def initialize url: { path: "/_sql", paths: ["/_sql"], - params: { - "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, - } + params: [ + "format", + ] } ), "sql.translate" => RestApi.new( @@ -6004,15 +6004,15 @@ def initialize url: { path: "/_tasks/_cancel", paths: ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"], - parts: { - "task_id" => {"type"=>"string", "description"=>"Cancel the task with specified task id (node_id:task_number)"}, - }, - params: { - "nodes" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be cancelled. Leave empty to cancel all."}, - "parent_task_id" => {"type"=>"string", "description"=>"Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false"}, - } + parts: [ + "task_id", + ], + params: [ + "nodes", + "actions", + "parent_task_id", + "wait_for_completion", + ] } ), "tasks.get" => RestApi.new( @@ -6022,13 +6022,13 @@ def initialize url: { path: "/_tasks/{task_id}", paths: ["/_tasks/{task_id}"], - parts: { - "task_id" => {"type"=>"string", "description"=>"Return the task with specified id (node_id:task_number)"}, - }, - params: { - "wait_for_completion" => {"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + parts: [ + "task_id", + ], + params: [ + "wait_for_completion", + "timeout", + ] } ), "tasks.list" => RestApi.new( @@ -6038,15 +6038,15 @@ def initialize url: { path: "/_tasks", paths: ["/_tasks"], - params: { - "nodes" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, - "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, - "detailed" => {"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, - "parent_task_id" => {"type"=>"string", "description"=>"Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, - "wait_for_completion" => {"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, - "group_by" => {"type"=>"enum", "description"=>"Group tasks by nodes or parent/child relationships", "options"=>["nodes", "parents", "none"], "default"=>"nodes"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - } + params: [ + "nodes", + "actions", + "detailed", + "parent_task_id", + "wait_for_completion", + "group_by", + "timeout", + ] } ), "terms_enum" => RestApi.new( @@ -6056,9 +6056,9 @@ def initialize url: { path: "/{index}/_terms_enum", paths: ["/{index}/_terms_enum"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, + parts: [ + "index", + ], } ), "termvectors" => RestApi.new( @@ -6068,23 +6068,23 @@ def initialize url: { path: "/{index}/_termvectors/{id}", paths: ["/{index}/_termvectors/{id}", "/{index}/_termvectors"], - parts: { - "index" => {"type"=>"string", "description"=>"The index in which the document resides."}, - "id" => {"type"=>"string", "description"=>"The id of the document, when not specified a doc param should be supplied."}, - }, - params: { - "term_statistics" => {"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned.", "default"=>false}, - "field_statistics" => {"type"=>"boolean", "description"=>"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.", "default"=>true}, - "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return."}, - "offsets" => {"type"=>"boolean", "description"=>"Specifies if term offsets should be returned.", "default"=>true}, - "positions" => {"type"=>"boolean", "description"=>"Specifies if term positions should be returned.", "default"=>true}, - "payloads" => {"type"=>"boolean", "description"=>"Specifies if term payloads should be returned.", "default"=>true}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)."}, - "routing" => {"type"=>"string", "description"=>"Specific routing value."}, - "realtime" => {"type"=>"boolean", "description"=>"Specifies if request is real-time as opposed to near-real-time (default: true)."}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, - } + parts: [ + "index", + "id", + ], + params: [ + "term_statistics", + "field_statistics", + "fields", + "offsets", + "positions", + "payloads", + "preference", + "routing", + "realtime", + "version", + "version_type", + ] } ), "text_structure.find_structure" => RestApi.new( @@ -6094,23 +6094,23 @@ def initialize url: { path: "/_text_structure/find_structure", paths: ["/_text_structure/find_structure"], - params: { - "lines_to_sample" => {"type"=>"int", "description"=>"How many lines of the file should be included in the analysis", "default"=>1000}, - "line_merge_size_limit" => {"type"=>"int", "description"=>"Maximum number of characters permitted in a single message when lines are merged to create messages.", "default"=>10000}, - "timeout" => {"type"=>"time", "description"=>"Timeout after which the analysis will be aborted", "default"=>"25s"}, - "charset" => {"type"=>"string", "description"=>"Optional parameter to specify the character set of the file"}, - "format" => {"type"=>"enum", "options"=>["ndjson", "xml", "delimited", "semi_structured_text"], "description"=>"Optional parameter to specify the high level file format"}, - "has_header_row" => {"type"=>"boolean", "description"=>"Optional parameter to specify whether a delimited file includes the column names in its first row"}, - "column_names" => {"type"=>"list", "description"=>"Optional parameter containing a comma separated list of the column names for a delimited file"}, - "delimiter" => {"type"=>"string", "description"=>"Optional parameter to specify the delimiter character for a delimited file - must be a single character"}, - "quote" => {"type"=>"string", "description"=>"Optional parameter to specify the quote character for a delimited file - must be a single character"}, - "should_trim_fields" => {"type"=>"boolean", "description"=>"Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them"}, - "grok_pattern" => {"type"=>"string", "description"=>"Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file"}, - "ecs_compatibility" => {"type"=>"string", "description"=>"Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'"}, - "timestamp_field" => {"type"=>"string", "description"=>"Optional parameter to specify the timestamp field in the file"}, - "timestamp_format" => {"type"=>"string", "description"=>"Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format"}, - "explain" => {"type"=>"boolean", "description"=>"Whether to include a commentary on how the structure was derived", "default"=>false}, - } + params: [ + "lines_to_sample", + "line_merge_size_limit", + "timeout", + "charset", + "format", + "has_header_row", + "column_names", + "delimiter", + "quote", + "should_trim_fields", + "grok_pattern", + "ecs_compatibility", + "timestamp_field", + "timestamp_format", + "explain", + ] } ), "transform.delete_transform" => RestApi.new( @@ -6120,13 +6120,13 @@ def initialize url: { path: "/_transform/{transform_id}", paths: ["/_transform/{transform_id}"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id of the transform to delete"}, - }, - params: { - "force" => {"type"=>"boolean", "required"=>false, "description"=>"When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted."}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the transform deletion"}, - } + parts: [ + "transform_id", + ], + params: [ + "force", + "timeout", + ] } ), "transform.get_transform" => RestApi.new( @@ -6136,15 +6136,15 @@ def initialize url: { path: "/_transform/{transform_id}", paths: ["/_transform/{transform_id}", "/_transform"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms"}, - }, - params: { - "from" => {"type"=>"int", "required"=>false, "description"=>"skips a number of transform configs, defaults to 0"}, - "size" => {"type"=>"int", "required"=>false, "description"=>"specifies a max number of transforms to get, defaults to 100"}, - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)"}, - "exclude_generated" => {"required"=>false, "type"=>"boolean", "default"=>false, "description"=>"Omits fields that are illegal to set on transform PUT"}, - } + parts: [ + "transform_id", + ], + params: [ + "from", + "size", + "allow_no_match", + "exclude_generated", + ] } ), "transform.get_transform_stats" => RestApi.new( @@ -6154,15 +6154,15 @@ def initialize url: { path: "/_transform/{transform_id}/_stats", paths: ["/_transform/{transform_id}/_stats"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id of the transform for which to get stats. '_all' or '*' implies all transforms"}, - }, - params: { - "from" => {"type"=>"number", "required"=>false, "description"=>"skips a number of transform stats, defaults to 0"}, - "size" => {"type"=>"number", "required"=>false, "description"=>"specifies a max number of transform stats to get, defaults to 100"}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the stats"}, - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)"}, - } + parts: [ + "transform_id", + ], + params: [ + "from", + "size", + "timeout", + "allow_no_match", + ] } ), "transform.preview_transform" => RestApi.new( @@ -6172,12 +6172,12 @@ def initialize url: { path: "/_transform/{transform_id}/_preview", paths: ["/_transform/{transform_id}/_preview", "/_transform/_preview"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id of the transform to preview."}, - }, - params: { - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the preview"}, - } + parts: [ + "transform_id", + ], + params: [ + "timeout", + ] } ), "transform.put_transform" => RestApi.new( @@ -6187,13 +6187,13 @@ def initialize url: { path: "/_transform/{transform_id}", paths: ["/_transform/{transform_id}"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id of the new transform."}, - }, - params: { - "defer_validation" => {"type"=>"boolean", "required"=>false, "description"=>"If validations should be deferred until transform starts, defaults to false."}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the transform to start"}, - } + parts: [ + "transform_id", + ], + params: [ + "defer_validation", + "timeout", + ] } ), "transform.reset_transform" => RestApi.new( @@ -6203,13 +6203,13 @@ def initialize url: { path: "/_transform/{transform_id}/_reset", paths: ["/_transform/{transform_id}/_reset"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id of the transform to reset"}, - }, - params: { - "force" => {"type"=>"boolean", "required"=>false, "description"=>"When `true`, the transform is reset regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be reset."}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the transform to reset"}, - } + parts: [ + "transform_id", + ], + params: [ + "force", + "timeout", + ] } ), "transform.schedule_now_transform" => RestApi.new( @@ -6219,12 +6219,12 @@ def initialize url: { path: "/_transform/{transform_id}/_schedule_now", paths: ["/_transform/{transform_id}/_schedule_now"], - parts: { - "transform_id" => {"type"=>"string", "required"=>true, "description"=>"The id of the transform."}, - }, - params: { - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the scheduling to take place"}, - } + parts: [ + "transform_id", + ], + params: [ + "timeout", + ] } ), "transform.start_transform" => RestApi.new( @@ -6234,13 +6234,13 @@ def initialize url: { path: "/_transform/{transform_id}/_start", paths: ["/_transform/{transform_id}/_start"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id of the transform to start"}, - }, - params: { - "from" => {"type"=>"string", "required"=>false, "description"=>"Restricts the set of transformed entities to those changed after this time"}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the transform to start"}, - } + parts: [ + "transform_id", + ], + params: [ + "from", + "timeout", + ] } ), "transform.stop_transform" => RestApi.new( @@ -6250,16 +6250,16 @@ def initialize url: { path: "/_transform/{transform_id}/_stop", paths: ["/_transform/{transform_id}/_stop"], - parts: { - "transform_id" => {"type"=>"string", "description"=>"The id of the transform to stop"}, - }, - params: { - "force" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to force stop a failed transform or not. Default to false"}, - "wait_for_completion" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to wait for the transform to fully stop before returning or not. Default to false"}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait until the transform has stopped. Default to 30 seconds"}, - "allow_no_match" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)"}, - "wait_for_checkpoint" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to wait for the transform to reach a checkpoint before stopping. Default to false"}, - } + parts: [ + "transform_id", + ], + params: [ + "force", + "wait_for_completion", + "timeout", + "allow_no_match", + "wait_for_checkpoint", + ] } ), "transform.update_transform" => RestApi.new( @@ -6269,13 +6269,13 @@ def initialize url: { path: "/_transform/{transform_id}/_update", paths: ["/_transform/{transform_id}/_update"], - parts: { - "transform_id" => {"type"=>"string", "required"=>true, "description"=>"The id of the transform."}, - }, - params: { - "defer_validation" => {"type"=>"boolean", "required"=>false, "description"=>"If validations should be deferred until transform starts, defaults to false."}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the update"}, - } + parts: [ + "transform_id", + ], + params: [ + "defer_validation", + "timeout", + ] } ), "transform.upgrade_transforms" => RestApi.new( @@ -6285,10 +6285,10 @@ def initialize url: { path: "/_transform/_upgrade", paths: ["/_transform/_upgrade"], - params: { - "dry_run" => {"type"=>"boolean", "required"=>false, "description"=>"Whether to only check for updates but don't execute"}, - "timeout" => {"type"=>"time", "required"=>false, "description"=>"Controls the time to wait for the upgrade"}, - } + params: [ + "dry_run", + "timeout", + ] } ), "update" => RestApi.new( @@ -6298,24 +6298,24 @@ def initialize url: { path: "/{index}/_update/{id}", paths: ["/{index}/_update/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Document ID"}, - "index" => {"type"=>"string", "description"=>"The name of the index"}, - }, - params: { - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, - "_source_excludes" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, - "_source_includes" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, - "lang" => {"type"=>"string", "description"=>"The script language (default: painless)"}, - "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, - "retry_on_conflict" => {"type"=>"number", "description"=>"Specify how many times should the operation be retried when a conflict occurs (default: 0)"}, - "routing" => {"type"=>"string", "description"=>"Specific routing value"}, - "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, - "if_seq_no" => {"type"=>"number", "description"=>"only perform the update operation if the last operation that has changed the document has the specified sequence number"}, - "if_primary_term" => {"type"=>"number", "description"=>"only perform the update operation if the last operation that has changed the document has the specified primary term"}, - "require_alias" => {"type"=>"boolean", "description"=>"When true, requires destination is an alias. Default is false"}, - } + parts: [ + "id", + "index", + ], + params: [ + "wait_for_active_shards", + "_source", + "_source_excludes", + "_source_includes", + "lang", + "refresh", + "retry_on_conflict", + "routing", + "timeout", + "if_seq_no", + "if_primary_term", + "require_alias", + ] } ), "update_by_query" => RestApi.new( @@ -6325,42 +6325,42 @@ def initialize url: { path: "/{index}/_update_by_query", paths: ["/{index}/_update_by_query"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, - }, - params: { - "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, - "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, - "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, - "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, - "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "conflicts" => {"type"=>"enum", "options"=>["abort", "proceed"], "default"=>"abort", "description"=>"What to do when the update by query hits version conflicts?"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, - "pipeline" => {"type"=>"string", "description"=>"Ingest pipeline to set on index requests made by this action. (default: none)"}, - "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, - "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, - "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, - "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, - "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, - "search_timeout" => {"type"=>"time", "description"=>"Explicit timeout for each search request. Defaults to no timeout."}, - "max_docs" => {"type"=>"number", "description"=>"Maximum number of documents to process (default: all documents)"}, - "sort" => {"type"=>"list", "description"=>"A comma-separated list of : pairs"}, - "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, - "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, - "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, - "version_type" => {"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, - "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, - "refresh" => {"type"=>"boolean", "description"=>"Should the affected indexes be refreshed?"}, - "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, - "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, - "scroll_size" => {"type"=>"number", "default"=>100, "description"=>"Size on the scroll request powering the update by query"}, - "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the update by query operation is complete."}, - "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, - "slices" => {"type"=>"number|string", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}, - } + parts: [ + "index", + ], + params: [ + "analyzer", + "analyze_wildcard", + "default_operator", + "df", + "from", + "ignore_unavailable", + "allow_no_indices", + "conflicts", + "expand_wildcards", + "lenient", + "pipeline", + "preference", + "q", + "routing", + "scroll", + "search_type", + "search_timeout", + "max_docs", + "sort", + "terminate_after", + "stats", + "version", + "version_type", + "request_cache", + "refresh", + "timeout", + "wait_for_active_shards", + "scroll_size", + "wait_for_completion", + "requests_per_second", + "slices", + ] } ), "update_by_query_rethrottle" => RestApi.new( @@ -6370,12 +6370,12 @@ def initialize url: { path: "/_update_by_query/{task_id}/_rethrottle", paths: ["/_update_by_query/{task_id}/_rethrottle"], - parts: { - "task_id" => {"type"=>"string", "description"=>"The task id to rethrottle"}, - }, - params: { - "requests_per_second" => {"type"=>"number", "required"=>true, "description"=>"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}, - } + parts: [ + "task_id", + ], + params: [ + "requests_per_second", + ] } ), "watcher.ack_watch" => RestApi.new( @@ -6385,10 +6385,10 @@ def initialize url: { path: "/_watcher/watch/{watch_id}/_ack", paths: ["/_watcher/watch/{watch_id}/_ack", "/_watcher/watch/{watch_id}/_ack/{action_id}"], - parts: { - "watch_id" => {"type"=>"string", "description"=>"Watch ID"}, - "action_id" => {"type"=>"list", "description"=>"A comma-separated list of the action ids to be acked"}, - }, + parts: [ + "watch_id", + "action_id", + ], } ), "watcher.activate_watch" => RestApi.new( @@ -6398,9 +6398,9 @@ def initialize url: { path: "/_watcher/watch/{watch_id}/_activate", paths: ["/_watcher/watch/{watch_id}/_activate"], - parts: { - "watch_id" => {"type"=>"string", "description"=>"Watch ID"}, - }, + parts: [ + "watch_id", + ], } ), "watcher.deactivate_watch" => RestApi.new( @@ -6410,9 +6410,9 @@ def initialize url: { path: "/_watcher/watch/{watch_id}/_deactivate", paths: ["/_watcher/watch/{watch_id}/_deactivate"], - parts: { - "watch_id" => {"type"=>"string", "description"=>"Watch ID"}, - }, + parts: [ + "watch_id", + ], } ), "watcher.delete_watch" => RestApi.new( @@ -6422,9 +6422,9 @@ def initialize url: { path: "/_watcher/watch/{id}", paths: ["/_watcher/watch/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Watch ID"}, - }, + parts: [ + "id", + ], } ), "watcher.execute_watch" => RestApi.new( @@ -6434,12 +6434,12 @@ def initialize url: { path: "/_watcher/watch/{id}/_execute", paths: ["/_watcher/watch/{id}/_execute", "/_watcher/watch/_execute"], - parts: { - "id" => {"type"=>"string", "description"=>"Watch ID"}, - }, - params: { - "debug" => {"type"=>"boolean", "description"=>"indicates whether the watch should execute in debug mode", "required"=>false}, - } + parts: [ + "id", + ], + params: [ + "debug", + ] } ), "watcher.get_watch" => RestApi.new( @@ -6449,9 +6449,9 @@ def initialize url: { path: "/_watcher/watch/{id}", paths: ["/_watcher/watch/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Watch ID"}, - }, + parts: [ + "id", + ], } ), "watcher.put_watch" => RestApi.new( @@ -6461,15 +6461,15 @@ def initialize url: { path: "/_watcher/watch/{id}", paths: ["/_watcher/watch/{id}"], - parts: { - "id" => {"type"=>"string", "description"=>"Watch ID"}, - }, - params: { - "active" => {"type"=>"boolean", "description"=>"Specify whether the watch is in/active by default"}, - "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, - "if_seq_no" => {"type"=>"number", "description"=>"only update the watch if the last operation that has changed the watch has the specified sequence number"}, - "if_primary_term" => {"type"=>"number", "description"=>"only update the watch if the last operation that has changed the watch has the specified primary term"}, - } + parts: [ + "id", + ], + params: [ + "active", + "version", + "if_seq_no", + "if_primary_term", + ] } ), "watcher.query_watches" => RestApi.new( @@ -6497,13 +6497,13 @@ def initialize url: { path: "/_watcher/stats", paths: ["/_watcher/stats", "/_watcher/stats/{metric}"], - parts: { - "metric" => {"type"=>"list", "options"=>["_all", "queued_watches", "current_watches", "pending_watches"], "description"=>"Controls what additional stat metrics should be include in the response"}, - }, - params: { - "metric" => {"type"=>"list", "options"=>["_all", "queued_watches", "current_watches", "pending_watches"], "description"=>"Controls what additional stat metrics should be include in the response"}, - "emit_stacktraces" => {"type"=>"boolean", "description"=>"Emits stack traces of currently running watches", "required"=>false}, - } + parts: [ + "metric", + ], + params: [ + "metric", + "emit_stacktraces", + ] } ), "watcher.stop" => RestApi.new( @@ -6522,10 +6522,10 @@ def initialize url: { path: "/_xpack", paths: ["/_xpack"], - params: { - "categories" => {"type"=>"list", "description"=>"Comma-separated list of info categories. Can be any of: build, license, features"}, - "accept_enterprise" => {"type"=>"boolean", "description"=>"If this param is used it must be set to true", "deprecated"=>{"version"=>"8.0.0", "description"=>"Supported for backwards compatibility with 7.x"}}, - } + params: [ + "categories", + "accept_enterprise", + ] } ), "xpack.usage" => RestApi.new( @@ -6535,19 +6535,19 @@ def initialize url: { path: "/_xpack/usage", paths: ["/_xpack/usage"], - params: { - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for watch write operation"}, - } + params: [ + "master_timeout", + ] } ), } - @common_params = { - "pretty" => {"type"=>"boolean", "description"=>"Pretty format the returned JSON response.", "default"=>false}, - "human" => {"type"=>"boolean", "description"=>"Return human readable values for statistics.", "default"=>true}, - "error_trace" => {"type"=>"boolean", "description"=>"Include the stack trace of returned errors.", "default"=>false}, - "source" => {"type"=>"string", "description"=>"The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests."}, - "filter_path" => {"type"=>"list", "description"=>"A comma-separated list of filters used to reduce the response."}, - } + @common_params = [ + "pretty", + "human", + "error_trace", + "source", + "filter_path", + ] super end end diff --git a/lib/elastomer_client/client/rest_api_spec/rest_api.rb b/lib/elastomer_client/client/rest_api_spec/rest_api.rb index b6874626..bc8dddee 100644 --- a/lib/elastomer_client/client/rest_api_spec/rest_api.rb +++ b/lib/elastomer_client/client/rest_api_spec/rest_api.rb @@ -31,11 +31,11 @@ class Url attr_reader :parts_keys attr_reader :params_keys - def initialize(path:, paths: [], parts: {}, params: {}) + def initialize(path:, paths: [], parts: [], params: []) @path = path @paths = Array(paths) - @parts_keys = parts.keys - @params_keys = params.keys + @parts_keys = parts + @params_keys = params @parts_set = Set.new(@parts_keys) @params_set = Set.new(@params_keys) diff --git a/script/generate-rest-api-spec b/script/generate-rest-api-spec index 50afa6b0..b8caec8a 100755 --- a/script/generate-rest-api-spec +++ b/script/generate-rest-api-spec @@ -178,29 +178,29 @@ module ElastomerClient::Client::RestApiSpec path: "<%= generate_path(url) %>", paths: <%= generate_paths(url) %>, <% if (parts = generate_parts(url)) && !parts.empty? -%> - parts: { + parts: [ <% parts.each do |k,v| -%> - "<%= k %>" => <%= v.to_s %>, + "<%= k %>", <% end -%> - }, + ], <% end -%> <% params = generate_params(data) -%> <% if !params.nil? && !params.empty? -%> - params: { + params: [ <% params.each do |k,v| -%> - "<%= k %>" => <%= v.to_s %>, + "<%= k %>", <% end -%> - } + ] <% end -%> } ), <% end -%> } - @common_params = { + @common_params = [ <% each_common do |k,v| -%> - "<%= k %>" => <%= v.to_s %>, + "<%= k %>", <% end -%> - } + ] super end end diff --git a/test/client/rest_api_spec/rest_api_test.rb b/test/client/rest_api_spec/rest_api_test.rb index 396fbe11..995d42ca 100644 --- a/test/client/rest_api_spec/rest_api_test.rb +++ b/test/client/rest_api_spec/rest_api_test.rb @@ -11,18 +11,15 @@ url: { path: "/_cluster/state", paths: ["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], - parts: { - "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, - "metric" => {"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics"}, - }, - params: { - "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, - "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, - "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, - "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, - "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, - "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, - } + parts: ["index", "metric"], + params: [ + "local", + "master_timeout", + "flat_settings", + "ignore_unavailable", + "allow_no_indices", + "expand_wildcards" + ] } end