antbird 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1514 @@
1
+ # Generated REST API methods file - DO NOT EDIT!
2
+ # opensearch version: 3.8.0
3
+
4
+ module Antbird
5
+ module RestApi
6
+ module RestApiOpensearchV3_8
7
+ def common_params
8
+ @common_params ||= {"documentation" => {"description" => "Parameters that are accepted by all API endpoints.", "url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html"}, "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."}}}
9
+ end
10
+
11
+
12
+ # bulk
13
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html", "description" => "Allows to perform multiple index/update/delete operations in a single request."}
14
+ def bulk(params = {})
15
+ api_name = 'bulk'
16
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_bulk", "methods" => ["POST", "PUT"]}, {"path" => "/{index}/_bulk", "methods" => ["POST", "PUT"]}]}, "body" => {"required" => true}, "params" => {"wait_for_active_shards" => {"type" => "string"}, "refresh" => {"type" => "enum"}, "routing" => {"type" => "string"}, "timeout" => {"type" => "time"}, "type" => {"type" => "string"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "pipeline" => {"type" => "string"}, "require_alias" => {"type" => "boolean"}, "batch_size" => {"type" => "int"}}}
17
+ request(api_name, api_spec, params, [:index])
18
+ end
19
+
20
+
21
+ # cat.aliases
22
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/", "description" => "Shows information about currently configured aliases to indices including filter and routing infos."}
23
+ def cat_aliases(params = {})
24
+ api_name = 'cat.aliases'
25
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/aliases", "methods" => ["GET"]}, {"path" => "/_cat/aliases/{name}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "local" => {"type" => "boolean"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
26
+ request(api_name, api_spec, params, [:name])
27
+ end
28
+
29
+
30
+ # cat.allocation
31
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/", "description" => "Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using."}
32
+ def cat_allocation(params = {})
33
+ api_name = 'cat.allocation'
34
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/allocation", "methods" => ["GET"]}, {"path" => "/_cat/allocation/{node_id}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "bytes" => {"type" => "enum"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
35
+ request(api_name, api_spec, params, [:node_id])
36
+ end
37
+
38
+
39
+ # cat.cluster_manager
40
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/", "description" => "Returns information about the cluster-manager node."}
41
+ def cat_cluster_manager(params = {})
42
+ api_name = 'cat.cluster_manager'
43
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/cluster_manager", "methods" => ["GET"]}, {"path" => "/_cat/master", "methods" => ["GET"], "deprecated" => true}]}, "params" => {"format" => {"type" => "string"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
44
+ request(api_name, api_spec, params, [])
45
+ end
46
+
47
+
48
+ # cat.count
49
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-count/", "description" => "Provides quick access to the document count of the entire cluster, or individual indices."}
50
+ def cat_count(params = {})
51
+ api_name = 'cat.count'
52
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/count", "methods" => ["GET"]}, {"path" => "/_cat/count/{index}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
53
+ request(api_name, api_spec, params, [:index])
54
+ end
55
+
56
+
57
+ # cat.fielddata
58
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/", "description" => "Shows how much heap memory is currently being used by fielddata on every data node in the cluster."}
59
+ def cat_fielddata(params = {})
60
+ api_name = 'cat.fielddata'
61
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/fielddata", "methods" => ["GET"]}, {"path" => "/_cat/fielddata/{fields}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "bytes" => {"type" => "enum"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}, "fields" => {"type" => "list"}}}
62
+ request(api_name, api_spec, params, [:fields])
63
+ end
64
+
65
+
66
+ # cat.health
67
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html", "description" => "Returns a concise representation of the cluster health."}
68
+ def cat_health(params = {})
69
+ api_name = 'cat.health'
70
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/health", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "ts" => {"type" => "boolean"}, "v" => {"type" => "boolean"}}}
71
+ request(api_name, api_spec, params, [])
72
+ end
73
+
74
+
75
+ # cat.help
76
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/index/", "description" => "Returns help for the Cat APIs."}
77
+ def cat_help(params = {})
78
+ api_name = 'cat.help'
79
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat", "methods" => ["GET"]}]}, "params" => {"help" => {"type" => "boolean"}, "s" => {"type" => "list"}}}
80
+ request(api_name, api_spec, params, [])
81
+ end
82
+
83
+
84
+ # cat.indices
85
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-indices/", "description" => "Returns information about indices: number of primaries and replicas, document counts, disk size, ..."}
86
+ def cat_indices(params = {})
87
+ api_name = 'cat.indices'
88
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/indices", "methods" => ["GET"]}, {"path" => "/_cat/indices/{index}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "bytes" => {"type" => "enum"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "health" => {"type" => "enum"}, "help" => {"type" => "boolean"}, "pri" => {"type" => "boolean"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "v" => {"type" => "boolean"}, "include_unloaded_segments" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
89
+ request(api_name, api_spec, params, [:index])
90
+ end
91
+
92
+
93
+ # cat.nodeattrs
94
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/", "description" => "Returns information about custom node attributes."}
95
+ def cat_nodeattrs(params = {})
96
+ api_name = 'cat.nodeattrs'
97
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/nodeattrs", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
98
+ request(api_name, api_spec, params, [])
99
+ end
100
+
101
+
102
+ # cat.nodes
103
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/", "description" => "Returns basic statistics about performance of cluster nodes."}
104
+ def cat_nodes(params = {})
105
+ api_name = 'cat.nodes'
106
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/nodes", "methods" => ["GET"]}]}, "params" => {"bytes" => {"type" => "enum"}, "format" => {"type" => "string"}, "full_id" => {"type" => "boolean"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "v" => {"type" => "boolean"}}}
107
+ request(api_name, api_spec, params, [])
108
+ end
109
+
110
+
111
+ # cat.pending_tasks
112
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/", "description" => "Returns a concise representation of the cluster pending tasks."}
113
+ def cat_pending_tasks(params = {})
114
+ api_name = 'cat.pending_tasks'
115
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/pending_tasks", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "v" => {"type" => "boolean"}}}
116
+ request(api_name, api_spec, params, [])
117
+ end
118
+
119
+
120
+ # cat.plugins
121
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/", "description" => "Returns information about installed plugins across nodes node."}
122
+ def cat_plugins(params = {})
123
+ api_name = 'cat.plugins'
124
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/plugins", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
125
+ request(api_name, api_spec, params, [])
126
+ end
127
+
128
+
129
+ # cat.recovery
130
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-recovery/", "description" => "Returns information about index shard recoveries, both on-going completed."}
131
+ def cat_recovery(params = {})
132
+ api_name = 'cat.recovery'
133
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/recovery", "methods" => ["GET"]}, {"path" => "/_cat/recovery/{index}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "active_only" => {"type" => "boolean"}, "bytes" => {"type" => "enum"}, "detailed" => {"type" => "boolean"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "index" => {"type" => "list"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "v" => {"type" => "boolean"}}}
134
+ request(api_name, api_spec, params, [:index])
135
+ end
136
+
137
+
138
+ # cat.repositories
139
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/", "description" => "Returns information about snapshot repositories registered in the cluster."}
140
+ def cat_repositories(params = {})
141
+ api_name = 'cat.repositories'
142
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/repositories", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
143
+ request(api_name, api_spec, params, [])
144
+ end
145
+
146
+
147
+ # cat.segment_replication
148
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-segment-replication/", "description" => "Returns information about both on-going and latest completed Segment Replication events"}
149
+ def cat_segment_replication(params = {})
150
+ api_name = 'cat.segment_replication'
151
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/segment_replication", "methods" => ["GET"]}, {"path" => "/_cat/segment_replication/{index}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "active_only" => {"type" => "boolean"}, "bytes" => {"type" => "enum"}, "detailed" => {"type" => "boolean"}, "shards" => {"type" => "list"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "index" => {"type" => "list"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "v" => {"type" => "boolean"}}}
152
+ request(api_name, api_spec, params, [:index])
153
+ end
154
+
155
+
156
+ # cat.segments
157
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-segments/", "description" => "Provides low-level information about the segments in the shards of an index."}
158
+ def cat_segments(params = {})
159
+ api_name = 'cat.segments'
160
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/segments", "methods" => ["GET"]}, {"path" => "/_cat/segments/{index}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "bytes" => {"type" => "enum"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
161
+ request(api_name, api_spec, params, [:index])
162
+ end
163
+
164
+
165
+ # cat.shards
166
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-shards/", "description" => "Provides a detailed view of shard allocation on nodes."}
167
+ def cat_shards(params = {})
168
+ api_name = 'cat.shards'
169
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/shards", "methods" => ["GET"]}, {"path" => "/_cat/shards/{index}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "bytes" => {"type" => "enum"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "v" => {"type" => "boolean"}}}
170
+ request(api_name, api_spec, params, [:index])
171
+ end
172
+
173
+
174
+ # cat.snapshots
175
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/", "description" => "Returns all snapshots in a specific repository."}
176
+ def cat_snapshots(params = {})
177
+ api_name = 'cat.snapshots'
178
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/snapshots", "methods" => ["GET"]}, {"path" => "/_cat/snapshots/{repository}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "ignore_unavailable" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "v" => {"type" => "boolean"}}}
179
+ request(api_name, api_spec, params, [:repository])
180
+ end
181
+
182
+
183
+ # cat.tasks
184
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/", "description" => "Returns information about the tasks currently executing on one or more nodes in the cluster."}
185
+ def cat_tasks(params = {})
186
+ api_name = 'cat.tasks'
187
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/tasks", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "nodes" => {"type" => "list"}, "actions" => {"type" => "list"}, "detailed" => {"type" => "boolean"}, "parent_task_id" => {"type" => "string"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "time" => {"type" => "enum"}, "v" => {"type" => "boolean"}}}
188
+ request(api_name, api_spec, params, [])
189
+ end
190
+
191
+
192
+ # cat.templates
193
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-templates/", "description" => "Returns information about existing templates."}
194
+ def cat_templates(params = {})
195
+ api_name = 'cat.templates'
196
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/templates", "methods" => ["GET"]}, {"path" => "/_cat/templates/{name}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
197
+ request(api_name, api_spec, params, [:name])
198
+ end
199
+
200
+
201
+ # cat.thread_pool
202
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/", "description" => "Returns cluster-wide thread pool statistics per node.\nBy default the active, queue and rejected statistics are returned for all thread pools."}
203
+ def cat_thread_pool(params = {})
204
+ api_name = 'cat.thread_pool'
205
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cat/thread_pool", "methods" => ["GET"]}, {"path" => "/_cat/thread_pool/{thread_pool_patterns}", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string"}, "size" => {"type" => "enum"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "h" => {"type" => "list"}, "help" => {"type" => "boolean"}, "s" => {"type" => "list"}, "v" => {"type" => "boolean"}}}
206
+ request(api_name, api_spec, params, [:thread_pool_patterns])
207
+ end
208
+
209
+
210
+ # clear_scroll
211
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/scroll/", "description" => "Explicitly clears the search context for a scroll."}
212
+ def clear_scroll(params = {})
213
+ api_name = 'clear_scroll'
214
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/scroll", "methods" => ["DELETE"]}, {"path" => "/_search/scroll/{scroll_id}", "methods" => ["DELETE"], "deprecated" => true}]}, "params" => {}}
215
+ request(api_name, api_spec, params, [:scroll_id])
216
+ end
217
+
218
+
219
+ # cluster.allocation_explain
220
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/", "description" => "Provides explanations for shard allocations in the cluster."}
221
+ def cluster_allocation_explain(params = {})
222
+ api_name = 'cluster.allocation_explain'
223
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/allocation/explain", "methods" => ["GET", "POST"]}]}, "params" => {"include_yes_decisions" => {"type" => "boolean"}, "include_disk_info" => {"type" => "boolean"}}}
224
+ request(api_name, api_spec, params, [])
225
+ end
226
+
227
+
228
+ # cluster.delete_component_template
229
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates/#create-a-component-template", "description" => "Deletes a component template"}
230
+ def cluster_delete_component_template(params = {})
231
+ api_name = 'cluster.delete_component_template'
232
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_component_template/{name}", "methods" => ["DELETE"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
233
+ request(api_name, api_spec, params, [:name])
234
+ end
235
+
236
+
237
+ # cluster.delete_decommission_awareness
238
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/", "description" => "Delete any existing decommission."}
239
+ def cluster_delete_decommission_awareness(params = {})
240
+ api_name = 'cluster.delete_decommission_awareness'
241
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/decommission/awareness/", "methods" => ["DELETE"]}]}}
242
+ request(api_name, api_spec, params, [])
243
+ end
244
+
245
+
246
+ # cluster.delete_voting_config_exclusions
247
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description" => "Clears cluster voting config exclusions."}
248
+ def cluster_delete_voting_config_exclusions(params = {})
249
+ api_name = 'cluster.delete_voting_config_exclusions'
250
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/voting_config_exclusions", "methods" => ["DELETE"]}]}, "params" => {"wait_for_removal" => {"type" => "boolean"}}}
251
+ request(api_name, api_spec, params, [])
252
+ end
253
+
254
+
255
+ # cluster.delete_weighted_routing
256
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-awareness", "description" => "Delete weighted shard routing weights"}
257
+ def cluster_delete_weighted_routing(params = {})
258
+ api_name = 'cluster.delete_weighted_routing'
259
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/routing/awareness/weights", "methods" => ["DELETE"]}]}}
260
+ request(api_name, api_spec, params, [])
261
+ end
262
+
263
+
264
+ # cluster.exists_component_template
265
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Returns information about whether a particular component template exist"}
266
+ def cluster_exists_component_template(params = {})
267
+ api_name = 'cluster.exists_component_template'
268
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_component_template/{name}", "methods" => ["HEAD"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "local" => {"type" => "boolean"}}}
269
+ request(api_name, api_spec, params, [:name])
270
+ end
271
+ alias :cluster_exists_component_template? :cluster_exists_component_template
272
+
273
+
274
+ # cluster.get_component_template
275
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Returns one or more component templates"}
276
+ def cluster_get_component_template(params = {})
277
+ api_name = 'cluster.get_component_template'
278
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_component_template", "methods" => ["GET"]}, {"path" => "/_component_template/{name}", "methods" => ["GET"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "local" => {"type" => "boolean"}}}
279
+ request(api_name, api_spec, params, [:name])
280
+ end
281
+
282
+
283
+ # cluster.get_decommission_awareness
284
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/", "description" => "Get details and status of decommissioned attribute"}
285
+ def cluster_get_decommission_awareness(params = {})
286
+ api_name = 'cluster.get_decommission_awareness'
287
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/decommission/awareness/{awareness_attribute_name}/_status", "methods" => ["GET"]}]}}
288
+ request(api_name, api_spec, params, [:awareness_attribute_name])
289
+ end
290
+
291
+
292
+ # cluster.get_settings
293
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/", "description" => "Returns cluster settings."}
294
+ def cluster_get_settings(params = {})
295
+ api_name = 'cluster.get_settings'
296
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/settings", "methods" => ["GET"]}]}, "params" => {"flat_settings" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}, "include_defaults" => {"type" => "boolean"}}}
297
+ request(api_name, api_spec, params, [])
298
+ end
299
+
300
+
301
+ # cluster.get_weighted_routing
302
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-awareness/", "description" => "Fetches weighted shard routing weights"}
303
+ def cluster_get_weighted_routing(params = {})
304
+ api_name = 'cluster.get_weighted_routing'
305
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/routing/awareness/{attribute}/weights", "methods" => ["GET"]}]}}
306
+ request(api_name, api_spec, params, [:attribute])
307
+ end
308
+
309
+
310
+ # cluster.health
311
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/", "description" => "Returns basic information about the health of the cluster."}
312
+ def cluster_health(params = {})
313
+ api_name = 'cluster.health'
314
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/health", "methods" => ["GET"]}, {"path" => "/_cluster/health/{index}", "methods" => ["GET"]}]}, "params" => {"expand_wildcards" => {"type" => "enum"}, "level" => {"type" => "enum"}, "local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}, "wait_for_active_shards" => {"type" => "string"}, "wait_for_nodes" => {"type" => "string"}, "wait_for_events" => {"type" => "enum"}, "wait_for_no_relocating_shards" => {"type" => "boolean"}, "wait_for_no_initializing_shards" => {"type" => "boolean"}, "wait_for_status" => {"type" => "enum"}, "awareness_attribute" => {"type" => "string"}, "ensure_node_weighed_in" => {"type" => "boolean"}}}
315
+ request(api_name, api_spec, params, [:index])
316
+ end
317
+
318
+
319
+ # cluster.pending_tasks
320
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html", "description" => "Returns a list of any cluster-level changes (e.g. create index, update mapping,\nallocate or fail shard) which have not yet been executed."}
321
+ def cluster_pending_tasks(params = {})
322
+ api_name = 'cluster.pending_tasks'
323
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/pending_tasks", "methods" => ["GET"]}]}, "params" => {"local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
324
+ request(api_name, api_spec, params, [])
325
+ end
326
+
327
+
328
+ # cluster.post_voting_config_exclusions
329
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description" => "Updates the cluster voting config exclusions by node ids or node names."}
330
+ def cluster_post_voting_config_exclusions(params = {})
331
+ api_name = 'cluster.post_voting_config_exclusions'
332
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/voting_config_exclusions", "methods" => ["POST"]}]}, "params" => {"node_ids" => {"type" => "string"}, "node_names" => {"type" => "string"}, "timeout" => {"type" => "time"}}}
333
+ request(api_name, api_spec, params, [])
334
+ end
335
+
336
+
337
+ # cluster.put_component_template
338
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates/#create-a-component-template", "description" => "Creates or updates a component template"}
339
+ def cluster_put_component_template(params = {})
340
+ api_name = 'cluster.put_component_template'
341
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_component_template/{name}", "methods" => ["PUT", "POST"]}]}, "body" => {"required" => true}, "params" => {"create" => {"type" => "boolean"}, "timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
342
+ request(api_name, api_spec, params, [:name])
343
+ end
344
+
345
+
346
+ # cluster.put_decommission_awareness
347
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/", "description" => "Decommissions an awareness attribute"}
348
+ def cluster_put_decommission_awareness(params = {})
349
+ api_name = 'cluster.put_decommission_awareness'
350
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/decommission/awareness/{awareness_attribute_name}/{awareness_attribute_value}", "methods" => ["PUT"]}]}}
351
+ request(api_name, api_spec, params, [:awareness_attribute_name, :awareness_attribute_value])
352
+ end
353
+
354
+
355
+ # cluster.put_settings
356
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/", "description" => "Updates the cluster settings."}
357
+ def cluster_put_settings(params = {})
358
+ api_name = 'cluster.put_settings'
359
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/settings", "methods" => ["PUT"]}]}, "body" => {"required" => true}, "params" => {"flat_settings" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
360
+ request(api_name, api_spec, params, [])
361
+ end
362
+
363
+
364
+ # cluster.put_weighted_routing
365
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-awareness", "description" => "Updates weighted shard routing weights"}
366
+ def cluster_put_weighted_routing(params = {})
367
+ api_name = 'cluster.put_weighted_routing'
368
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/routing/awareness/{attribute}/weights", "methods" => ["PUT"]}]}}
369
+ request(api_name, api_spec, params, [:attribute])
370
+ end
371
+
372
+
373
+ # cluster.remote_info
374
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/remote-info/", "description" => "Returns the information about configured remote clusters."}
375
+ def cluster_remote_info(params = {})
376
+ api_name = 'cluster.remote_info'
377
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_remote/info", "methods" => ["GET"]}]}, "params" => {}}
378
+ request(api_name, api_spec, params, [])
379
+ end
380
+
381
+
382
+ # cluster.reroute
383
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html", "description" => "Allows to manually change the allocation of individual shards in the cluster."}
384
+ def cluster_reroute(params = {})
385
+ api_name = 'cluster.reroute'
386
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/reroute", "methods" => ["POST"]}]}, "params" => {"dry_run" => {"type" => "boolean"}, "explain" => {"type" => "boolean"}, "retry_failed" => {"type" => "boolean"}, "metric" => {"type" => "list"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
387
+ request(api_name, api_spec, params, [])
388
+ end
389
+
390
+
391
+ # cluster.state
392
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/count/", "description" => "Returns a comprehensive information about the state of the cluster."}
393
+ def cluster_state(params = {})
394
+ api_name = 'cluster.state'
395
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/state", "methods" => ["GET"]}, {"path" => "/_cluster/state/{metric}", "methods" => ["GET"]}, {"path" => "/_cluster/state/{metric}/{index}", "methods" => ["GET"]}]}, "params" => {"local" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "flat_settings" => {"type" => "boolean"}, "wait_for_metadata_version" => {"type" => "number"}, "wait_for_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
396
+ request(api_name, api_spec, params, [:metric, :index])
397
+ end
398
+
399
+
400
+ # cluster.stats
401
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/", "description" => "Returns high-level overview of cluster statistics."}
402
+ def cluster_stats(params = {})
403
+ api_name = 'cluster.stats'
404
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cluster/stats", "methods" => ["GET"]}, {"path" => "/_cluster/stats/nodes/{node_id}", "methods" => ["GET"]}]}, "params" => {"flat_settings" => {"type" => "boolean"}, "timeout" => {"type" => "time"}}}
405
+ request(api_name, api_spec, params, [:node_id])
406
+ end
407
+
408
+
409
+ # count
410
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/count/", "description" => "Returns number of documents matching a query."}
411
+ def count(params = {})
412
+ api_name = 'count'
413
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_count", "methods" => ["POST", "GET"]}, {"path" => "/{index}/_count", "methods" => ["POST", "GET"]}]}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "ignore_throttled" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "min_score" => {"type" => "number"}, "preference" => {"type" => "string"}, "routing" => {"type" => "list"}, "q" => {"type" => "string"}, "analyzer" => {"type" => "string"}, "analyze_wildcard" => {"type" => "boolean"}, "default_operator" => {"type" => "enum"}, "df" => {"type" => "string"}, "lenient" => {"type" => "boolean"}, "terminate_after" => {"type" => "number"}}}
414
+ request(api_name, api_spec, params, [:index])
415
+ end
416
+
417
+
418
+ # create
419
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/index-document/", "description" => "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index."}
420
+ def create(params = {})
421
+ api_name = 'create'
422
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_create/{id}", "methods" => ["PUT", "POST"]}]}, "body" => {"required" => true}, "params" => {"wait_for_active_shards" => {"type" => "string"}, "refresh" => {"type" => "enum"}, "routing" => {"type" => "string"}, "timeout" => {"type" => "time"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}, "pipeline" => {"type" => "string"}}}
423
+ request(api_name, api_spec, params, [:id, :index])
424
+ end
425
+
426
+
427
+ # create_pit
428
+ # {"url" => "https://opensearch.org/docs/latest/search-plugins/searching-data/point-in-time-api", "description" => "Creates point in time context."}
429
+ def create_pit(params = {})
430
+ api_name = 'create_pit'
431
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_search/point_in_time", "methods" => ["POST"]}]}, "params" => {"allow_partial_pit_creation" => {"type" => "boolean"}, "keep_alive" => {"type" => "string"}, "preference" => {"type" => "string"}, "routing" => {"type" => "list"}}}
432
+ request(api_name, api_spec, params, [:index])
433
+ end
434
+
435
+
436
+ # dangling_indices.delete_dangling_index
437
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/", "description" => "Deletes the specified dangling index"}
438
+ def dangling_indices_delete_dangling_index(params = {})
439
+ api_name = 'dangling_indices.delete_dangling_index'
440
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_dangling/{index_uuid}", "methods" => ["DELETE"]}]}, "params" => {"accept_data_loss" => {"type" => "boolean"}, "timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
441
+ request(api_name, api_spec, params, [:index_uuid])
442
+ end
443
+
444
+
445
+ # dangling_indices.import_dangling_index
446
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/", "description" => "Imports the specified dangling index"}
447
+ def dangling_indices_import_dangling_index(params = {})
448
+ api_name = 'dangling_indices.import_dangling_index'
449
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_dangling/{index_uuid}", "methods" => ["POST"]}]}, "params" => {"accept_data_loss" => {"type" => "boolean"}, "timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
450
+ request(api_name, api_spec, params, [:index_uuid])
451
+ end
452
+
453
+
454
+ # dangling_indices.list_dangling_indices
455
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/", "description" => "Returns all dangling indices."}
456
+ def dangling_indices_list_dangling_indices(params = {})
457
+ api_name = 'dangling_indices.list_dangling_indices'
458
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_dangling", "methods" => ["GET"]}]}, "params" => {}}
459
+ request(api_name, api_spec, params, [])
460
+ end
461
+
462
+
463
+ # delete
464
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/delete-document/", "description" => "Removes a document from the index."}
465
+ def delete(params = {})
466
+ api_name = 'delete'
467
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_doc/{id}", "methods" => ["DELETE"]}]}, "params" => {"wait_for_active_shards" => {"type" => "string"}, "refresh" => {"type" => "enum"}, "routing" => {"type" => "string"}, "timeout" => {"type" => "time"}, "if_seq_no" => {"type" => "number"}, "if_primary_term" => {"type" => "number"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}}}
468
+ request(api_name, api_spec, params, [:id, :index])
469
+ end
470
+
471
+
472
+ # delete_all_pits
473
+ # {"url" => "https://opensearch.org/docs/latest/search-plugins/searching-data/point-in-time-api", "description" => "Deletes all active point in time searches."}
474
+ def delete_all_pits(params = {})
475
+ api_name = 'delete_all_pits'
476
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/point_in_time/_all", "methods" => ["DELETE"]}]}}
477
+ request(api_name, api_spec, params, [])
478
+ end
479
+
480
+
481
+ # delete_by_query
482
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/delete-by-query/", "description" => "Deletes documents matching the provided query."}
483
+ def delete_by_query(params = {})
484
+ api_name = 'delete_by_query'
485
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_delete_by_query", "methods" => ["POST"]}]}, "body" => {"required" => true}, "params" => {"analyzer" => {"type" => "string"}, "analyze_wildcard" => {"type" => "boolean"}, "default_operator" => {"type" => "enum"}, "df" => {"type" => "string"}, "from" => {"type" => "number"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "conflicts" => {"type" => "enum"}, "expand_wildcards" => {"type" => "enum"}, "lenient" => {"type" => "boolean"}, "preference" => {"type" => "string"}, "q" => {"type" => "string"}, "routing" => {"type" => "list"}, "scroll" => {"type" => "time"}, "search_type" => {"type" => "enum"}, "search_timeout" => {"type" => "time"}, "size" => {"type" => "number"}, "max_docs" => {"type" => "number"}, "sort" => {"type" => "list"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "terminate_after" => {"type" => "number"}, "stats" => {"type" => "list"}, "version" => {"type" => "boolean"}, "request_cache" => {"type" => "boolean"}, "refresh" => {"type" => "boolean"}, "timeout" => {"type" => "time"}, "wait_for_active_shards" => {"type" => "string"}, "scroll_size" => {"type" => "number"}, "wait_for_completion" => {"type" => "boolean"}, "requests_per_second" => {"type" => "number"}, "slices" => {"type" => "number|string"}}}
486
+ request(api_name, api_spec, params, [:index])
487
+ end
488
+
489
+
490
+ # delete_by_query_rethrottle
491
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/delete-by-query/", "description" => "Changes the number of requests per second for a particular Delete By Query operation."}
492
+ def delete_by_query_rethrottle(params = {})
493
+ api_name = 'delete_by_query_rethrottle'
494
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_delete_by_query/{task_id}/_rethrottle", "methods" => ["POST"]}]}, "params" => {"requests_per_second" => {"type" => "number", "required" => true}}}
495
+ request(api_name, api_spec, params, [:task_id])
496
+ end
497
+
498
+
499
+ # delete_pit
500
+ # {"url" => "https://opensearch.org/docs/latest/search-plugins/searching-data/point-in-time-api", "description" => "Deletes one or more point in time searches based on the IDs passed."}
501
+ def delete_pit(params = {})
502
+ api_name = 'delete_pit'
503
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/point_in_time", "methods" => ["DELETE"]}]}, "body" => {"required" => true}}
504
+ request(api_name, api_spec, params, [])
505
+ end
506
+
507
+
508
+ # delete_script
509
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/script-apis/delete-script/", "description" => "Deletes a script."}
510
+ def delete_script(params = {})
511
+ api_name = 'delete_script'
512
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_scripts/{id}", "methods" => ["DELETE"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
513
+ request(api_name, api_spec, params, [:id])
514
+ end
515
+
516
+
517
+ # exists
518
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/", "description" => "Returns information about whether a document exists in an index."}
519
+ def exists(params = {})
520
+ api_name = 'exists'
521
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_doc/{id}", "methods" => ["HEAD"]}]}, "params" => {"stored_fields" => {"type" => "list"}, "preference" => {"type" => "string"}, "realtime" => {"type" => "boolean"}, "refresh" => {"type" => "boolean"}, "routing" => {"type" => "string"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}}}
522
+ request(api_name, api_spec, params, [:id, :index])
523
+ end
524
+ alias :exists? :exists
525
+
526
+
527
+ # exists_source
528
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/", "description" => "Returns information about whether a document source exists in an index."}
529
+ def exists_source(params = {})
530
+ api_name = 'exists_source'
531
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_source/{id}", "methods" => ["HEAD"]}]}, "params" => {"preference" => {"type" => "string"}, "realtime" => {"type" => "boolean"}, "refresh" => {"type" => "boolean"}, "routing" => {"type" => "string"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}}}
532
+ request(api_name, api_spec, params, [:id, :index])
533
+ end
534
+ alias :exists_source? :exists_source
535
+
536
+
537
+ # explain
538
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/explain/", "description" => "Returns information about why a specific matches (or doesn't match) a query."}
539
+ def explain(params = {})
540
+ api_name = 'explain'
541
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_explain/{id}", "methods" => ["GET", "POST"]}]}, "params" => {"analyze_wildcard" => {"type" => "boolean"}, "analyzer" => {"type" => "string"}, "default_operator" => {"type" => "enum"}, "df" => {"type" => "string"}, "stored_fields" => {"type" => "list"}, "lenient" => {"type" => "boolean"}, "preference" => {"type" => "string"}, "q" => {"type" => "string"}, "routing" => {"type" => "string"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}}}
542
+ request(api_name, api_spec, params, [:id, :index])
543
+ end
544
+
545
+
546
+ # field_caps
547
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html", "description" => "Returns the information about the capabilities of fields among multiple indices."}
548
+ def field_caps(params = {})
549
+ api_name = 'field_caps'
550
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_field_caps", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_field_caps", "methods" => ["GET", "POST"]}]}, "params" => {"fields" => {"type" => "list"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "include_unmapped" => {"type" => "boolean"}}}
551
+ request(api_name, api_spec, params, [:index])
552
+ end
553
+
554
+
555
+ # get
556
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/", "description" => "Returns a document."}
557
+ def get(params = {})
558
+ api_name = 'get'
559
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_doc/{id}", "methods" => ["GET"]}]}, "params" => {"stored_fields" => {"type" => "list"}, "preference" => {"type" => "string"}, "realtime" => {"type" => "boolean"}, "refresh" => {"type" => "boolean"}, "routing" => {"type" => "string"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}}}
560
+ request(api_name, api_spec, params, [:id, :index])
561
+ end
562
+
563
+
564
+ # get_all_pits
565
+ # {"url" => "https://opensearch.org/docs/latest/search-plugins/searching-data/point-in-time-api", "description" => "Lists all active point in time searches."}
566
+ def get_all_pits(params = {})
567
+ api_name = 'get_all_pits'
568
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/point_in_time/_all", "methods" => ["GET"]}]}}
569
+ request(api_name, api_spec, params, [])
570
+ end
571
+
572
+
573
+ # get_script
574
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Returns a script."}
575
+ def get_script(params = {})
576
+ api_name = 'get_script'
577
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_scripts/{id}", "methods" => ["GET"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
578
+ request(api_name, api_spec, params, [:id])
579
+ end
580
+
581
+
582
+ # get_script_context
583
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/script-apis/get-script-language/", "description" => "Returns all script contexts."}
584
+ def get_script_context(params = {})
585
+ api_name = 'get_script_context'
586
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_script_context", "methods" => ["GET"]}]}, "params" => {}}
587
+ request(api_name, api_spec, params, [])
588
+ end
589
+
590
+
591
+ # get_script_languages
592
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/script-apis/get-script-language/", "description" => "Returns available script types, languages and contexts"}
593
+ def get_script_languages(params = {})
594
+ api_name = 'get_script_languages'
595
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_script_language", "methods" => ["GET"]}]}, "params" => {}}
596
+ request(api_name, api_spec, params, [])
597
+ end
598
+
599
+
600
+ # get_source
601
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/", "description" => "Returns the source of a document."}
602
+ def get_source(params = {})
603
+ api_name = 'get_source'
604
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_source/{id}", "methods" => ["GET"]}]}, "params" => {"preference" => {"type" => "string"}, "realtime" => {"type" => "boolean"}, "refresh" => {"type" => "boolean"}, "routing" => {"type" => "string"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}}}
605
+ request(api_name, api_spec, params, [:id, :index])
606
+ end
607
+
608
+
609
+ # index
610
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/index-document/", "description" => "Creates or updates a document in an index."}
611
+ def index(params = {})
612
+ api_name = 'index'
613
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_doc/{id}", "methods" => ["PUT", "POST"]}, {"path" => "/{index}/_doc", "methods" => ["POST"]}]}, "body" => {"required" => true}, "params" => {"wait_for_active_shards" => {"type" => "string"}, "op_type" => {"type" => "enum"}, "refresh" => {"type" => "enum"}, "routing" => {"type" => "string"}, "timeout" => {"type" => "time"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}, "if_seq_no" => {"type" => "number"}, "if_primary_term" => {"type" => "number"}, "pipeline" => {"type" => "string"}, "require_alias" => {"type" => "boolean"}}}
614
+ request(api_name, api_spec, params, [:id, :index])
615
+ end
616
+
617
+
618
+ # indices.add_block
619
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html", "description" => "Adds a block to an index."}
620
+ def indices_add_block(params = {})
621
+ api_name = 'indices.add_block'
622
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_block/{block}", "methods" => ["PUT"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
623
+ request(api_name, api_spec, params, [:index, :block])
624
+ end
625
+
626
+
627
+ # indices.analyze
628
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/analyze-apis/", "description" => "Performs the analysis process on a text and return the tokens breakdown of the text."}
629
+ def indices_analyze(params = {})
630
+ api_name = 'indices.analyze'
631
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_analyze", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_analyze", "methods" => ["GET", "POST"]}]}, "params" => {"index" => {"type" => "string"}}}
632
+ request(api_name, api_spec, params, [:index])
633
+ end
634
+
635
+
636
+ # indices.clear_cache
637
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/clear-index-cache/", "description" => "Clears all or specific caches for one or more indices."}
638
+ def indices_clear_cache(params = {})
639
+ api_name = 'indices.clear_cache'
640
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_cache/clear", "methods" => ["POST"]}, {"path" => "/{index}/_cache/clear", "methods" => ["POST"]}]}, "params" => {"fielddata" => {"type" => "boolean"}, "fields" => {"type" => "list"}, "query" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "index" => {"type" => "list"}, "request" => {"type" => "boolean"}, "file" => {"type" => "boolean"}}}
641
+ request(api_name, api_spec, params, [:index])
642
+ end
643
+
644
+
645
+ # indices.clone
646
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/clone/", "description" => "Clones an index"}
647
+ def indices_clone(params = {})
648
+ api_name = 'indices.clone'
649
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_clone/{target}", "methods" => ["PUT", "POST"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "wait_for_active_shards" => {"type" => "string"}, "wait_for_completion" => {"type" => "boolean"}, "task_execution_timeout" => {"type" => "time"}}}
650
+ request(api_name, api_spec, params, [:index, :target])
651
+ end
652
+
653
+
654
+ # indices.close
655
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/close-index/", "description" => "Closes an index."}
656
+ def indices_close(params = {})
657
+ api_name = 'indices.close'
658
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_close", "methods" => ["POST"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "wait_for_active_shards" => {"type" => "string"}}}
659
+ request(api_name, api_spec, params, [:index])
660
+ end
661
+
662
+
663
+ # indices.create
664
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/create-index/", "description" => "Creates an index with optional settings and mappings."}
665
+ def indices_create(params = {})
666
+ api_name = 'indices.create'
667
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}", "methods" => ["PUT"]}]}, "params" => {"wait_for_active_shards" => {"type" => "string"}, "timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
668
+ request(api_name, api_spec, params, [:index])
669
+ end
670
+
671
+
672
+ # indices.create_data_stream
673
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Creates or updates a data stream"}
674
+ def indices_create_data_stream(params = {})
675
+ api_name = 'indices.create_data_stream'
676
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_data_stream/{name}", "methods" => ["PUT"]}]}, "params" => {}}
677
+ request(api_name, api_spec, params, [:name])
678
+ end
679
+
680
+
681
+ # indices.data_streams_stats
682
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/data-streams/", "description" => "Provides statistics on operations happening in a data stream."}
683
+ def indices_data_streams_stats(params = {})
684
+ api_name = 'indices.data_streams_stats'
685
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_data_stream/_stats", "methods" => ["GET"]}, {"path" => "/_data_stream/{name}/_stats", "methods" => ["GET"]}]}}
686
+ request(api_name, api_spec, params, [:name])
687
+ end
688
+
689
+
690
+ # indices.delete
691
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/delete-index/", "description" => "Deletes an index."}
692
+ def indices_delete(params = {})
693
+ api_name = 'indices.delete'
694
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}", "methods" => ["DELETE"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
695
+ request(api_name, api_spec, params, [:index])
696
+ end
697
+
698
+
699
+ # indices.delete_alias
700
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Deletes an alias."}
701
+ def indices_delete_alias(params = {})
702
+ api_name = 'indices.delete_alias'
703
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_alias/{name}", "methods" => ["DELETE"]}, {"path" => "/{index}/_aliases/{name}", "methods" => ["DELETE"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
704
+ request(api_name, api_spec, params, [:index, :name])
705
+ end
706
+
707
+
708
+ # indices.delete_data_stream
709
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/data-streams/", "description" => "Deletes a data stream."}
710
+ def indices_delete_data_stream(params = {})
711
+ api_name = 'indices.delete_data_stream'
712
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_data_stream/{name}", "methods" => ["DELETE"]}]}, "params" => {}}
713
+ request(api_name, api_spec, params, [:name])
714
+ end
715
+
716
+
717
+ # indices.delete_index_template
718
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Deletes an index template."}
719
+ def indices_delete_index_template(params = {})
720
+ api_name = 'indices.delete_index_template'
721
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_index_template/{name}", "methods" => ["DELETE"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
722
+ request(api_name, api_spec, params, [:name])
723
+ end
724
+
725
+
726
+ # indices.delete_template
727
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Deletes an index template."}
728
+ def indices_delete_template(params = {})
729
+ api_name = 'indices.delete_template'
730
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_template/{name}", "methods" => ["DELETE"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
731
+ request(api_name, api_spec, params, [:name])
732
+ end
733
+
734
+
735
+ # indices.exists
736
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/exists/", "description" => "Returns information about whether a particular index exists."}
737
+ def indices_exists(params = {})
738
+ api_name = 'indices.exists'
739
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}", "methods" => ["HEAD"]}]}, "params" => {"local" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "flat_settings" => {"type" => "boolean"}, "include_defaults" => {"type" => "boolean"}}}
740
+ request(api_name, api_spec, params, [:index])
741
+ end
742
+ alias :indices_exists? :indices_exists
743
+
744
+
745
+ # indices.exists_alias
746
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/alias/", "description" => "Returns information about whether a particular alias exists."}
747
+ def indices_exists_alias(params = {})
748
+ api_name = 'indices.exists_alias'
749
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_alias/{name}", "methods" => ["HEAD"]}, {"path" => "/{index}/_alias/{name}", "methods" => ["HEAD"]}]}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "local" => {"type" => "boolean"}}}
750
+ request(api_name, api_spec, params, [:name, :index])
751
+ end
752
+ alias :indices_exists_alias? :indices_exists_alias
753
+
754
+
755
+ # indices.exists_index_template
756
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Returns information about whether a particular index template exists."}
757
+ def indices_exists_index_template(params = {})
758
+ api_name = 'indices.exists_index_template'
759
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_index_template/{name}", "methods" => ["HEAD"]}]}, "params" => {"flat_settings" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "local" => {"type" => "boolean"}}}
760
+ request(api_name, api_spec, params, [:name])
761
+ end
762
+ alias :indices_exists_index_template? :indices_exists_index_template
763
+
764
+
765
+ # indices.exists_template
766
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Returns information about whether a particular index template exists."}
767
+ def indices_exists_template(params = {})
768
+ api_name = 'indices.exists_template'
769
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_template/{name}", "methods" => ["HEAD"]}]}, "params" => {"flat_settings" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "local" => {"type" => "boolean"}}}
770
+ request(api_name, api_spec, params, [:name])
771
+ end
772
+ alias :indices_exists_template? :indices_exists_template
773
+
774
+
775
+ # indices.flush
776
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html", "description" => "Performs the flush operation on one or more indices."}
777
+ def indices_flush(params = {})
778
+ api_name = 'indices.flush'
779
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_flush", "methods" => ["POST", "GET"]}, {"path" => "/{index}/_flush", "methods" => ["POST", "GET"]}]}, "params" => {"force" => {"type" => "boolean"}, "wait_if_ongoing" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
780
+ request(api_name, api_spec, params, [:index])
781
+ end
782
+
783
+
784
+ # indices.forcemerge
785
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/force-merge/", "description" => "Performs the force merge operation on one or more indices."}
786
+ def indices_forcemerge(params = {})
787
+ api_name = 'indices.forcemerge'
788
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_forcemerge", "methods" => ["POST"]}, {"path" => "/{index}/_forcemerge", "methods" => ["POST"]}]}, "params" => {"flush" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "max_num_segments" => {"type" => "number"}, "only_expunge_deletes" => {"type" => "boolean"}, "wait_for_completion" => {"type" => "boolean"}, "primary_only" => {"type" => "boolean"}}}
789
+ request(api_name, api_spec, params, [:index])
790
+ end
791
+
792
+
793
+ # indices.get
794
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/get-index/", "description" => "Returns information about one or more indices."}
795
+ def indices_get(params = {})
796
+ api_name = 'indices.get'
797
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}", "methods" => ["GET"]}]}, "params" => {"local" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "flat_settings" => {"type" => "boolean"}, "include_defaults" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
798
+ request(api_name, api_spec, params, [:index])
799
+ end
800
+
801
+
802
+ # indices.get_alias
803
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Returns an alias."}
804
+ def indices_get_alias(params = {})
805
+ api_name = 'indices.get_alias'
806
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_alias", "methods" => ["GET"]}, {"path" => "/_alias/{name}", "methods" => ["GET"]}, {"path" => "/{index}/_alias/{name}", "methods" => ["GET"]}, {"path" => "/{index}/_alias", "methods" => ["GET"]}]}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "local" => {"type" => "boolean"}}}
807
+ request(api_name, api_spec, params, [:name, :index])
808
+ end
809
+
810
+
811
+ # indices.get_data_stream
812
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/data-streams/", "description" => "Returns data streams."}
813
+ def indices_get_data_stream(params = {})
814
+ api_name = 'indices.get_data_stream'
815
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_data_stream", "methods" => ["GET"]}, {"path" => "/_data_stream/{name}", "methods" => ["GET"]}]}, "params" => {}}
816
+ request(api_name, api_spec, params, [:name])
817
+ end
818
+
819
+
820
+ # indices.get_field_mapping
821
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/put-mapping/", "description" => "Returns mapping for one or more fields."}
822
+ def indices_get_field_mapping(params = {})
823
+ api_name = 'indices.get_field_mapping'
824
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_mapping/field/{fields}", "methods" => ["GET"]}, {"path" => "/{index}/_mapping/field/{fields}", "methods" => ["GET"]}]}, "params" => {"include_defaults" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "local" => {"type" => "boolean"}}}
825
+ request(api_name, api_spec, params, [:fields, :index])
826
+ end
827
+
828
+
829
+ # indices.get_index_template
830
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Returns an index template."}
831
+ def indices_get_index_template(params = {})
832
+ api_name = 'indices.get_index_template'
833
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_index_template", "methods" => ["GET"]}, {"path" => "/_index_template/{name}", "methods" => ["GET"]}]}, "params" => {"flat_settings" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "local" => {"type" => "boolean"}}}
834
+ request(api_name, api_spec, params, [:name])
835
+ end
836
+
837
+
838
+ # indices.get_mapping
839
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/put-mapping/", "description" => "Returns mappings for one or more indices."}
840
+ def indices_get_mapping(params = {})
841
+ api_name = 'indices.get_mapping'
842
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_mapping", "methods" => ["GET"]}, {"path" => "/{index}/_mapping", "methods" => ["GET"]}]}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "local" => {"type" => "boolean"}}}
843
+ request(api_name, api_spec, params, [:index])
844
+ end
845
+
846
+
847
+ # indices.get_settings
848
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/get-settings/", "description" => "Returns settings for one or more indices."}
849
+ def indices_get_settings(params = {})
850
+ api_name = 'indices.get_settings'
851
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_settings", "methods" => ["GET"]}, {"path" => "/{index}/_settings", "methods" => ["GET"]}, {"path" => "/{index}/_settings/{name}", "methods" => ["GET"]}, {"path" => "/_settings/{name}", "methods" => ["GET"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "flat_settings" => {"type" => "boolean"}, "local" => {"type" => "boolean"}, "include_defaults" => {"type" => "boolean"}}}
852
+ request(api_name, api_spec, params, [:index, :name])
853
+ end
854
+
855
+
856
+ # indices.get_template
857
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Returns an index template."}
858
+ def indices_get_template(params = {})
859
+ api_name = 'indices.get_template'
860
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_template", "methods" => ["GET"]}, {"path" => "/_template/{name}", "methods" => ["GET"]}]}, "params" => {"flat_settings" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "local" => {"type" => "boolean"}}}
861
+ request(api_name, api_spec, params, [:name])
862
+ end
863
+
864
+
865
+ # indices.get_upgrade
866
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description" => "The _upgrade API is no longer useful and will be removed."}
867
+ def indices_get_upgrade(params = {})
868
+ api_name = 'indices.get_upgrade'
869
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_upgrade", "methods" => ["GET"]}, {"path" => "/{index}/_upgrade", "methods" => ["GET"]}]}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
870
+ request(api_name, api_spec, params, [:index])
871
+ end
872
+
873
+
874
+ # indices.modify_data_stream
875
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/data-streams/", "description" => "Adds or removes backing indices of a data stream with metadata-only actions"}
876
+ def indices_modify_data_stream(params = {})
877
+ api_name = 'indices.modify_data_stream'
878
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_data_stream/_modify", "methods" => ["POST"]}]}, "body" => {"required" => true}, "params" => {"cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
879
+ request(api_name, api_spec, params, [])
880
+ end
881
+
882
+
883
+ # indices.open
884
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/open-index/", "description" => "Opens an index."}
885
+ def indices_open(params = {})
886
+ api_name = 'indices.open'
887
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_open", "methods" => ["POST"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "wait_for_active_shards" => {"type" => "string"}, "wait_for_completion" => {"type" => "boolean"}, "task_execution_timeout" => {"type" => "time"}}}
888
+ request(api_name, api_spec, params, [:index])
889
+ end
890
+
891
+
892
+ # indices.put_alias
893
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/update-alias/", "description" => "Creates or updates an alias."}
894
+ def indices_put_alias(params = {})
895
+ api_name = 'indices.put_alias'
896
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_alias/{name}", "methods" => ["PUT", "POST"]}, {"path" => "/{index}/_aliases/{name}", "methods" => ["PUT", "POST"]}, {"path" => "/{index}/_alias", "methods" => ["PUT"]}, {"path" => "/{index}/_aliases", "methods" => ["PUT"]}, {"path" => "/_alias/{name}", "methods" => ["PUT", "POST"]}, {"path" => "/_aliases/{name}", "methods" => ["PUT", "POST"]}, {"path" => "/_alias", "methods" => ["PUT"]}]}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
897
+ request(api_name, api_spec, params, [:index, :name])
898
+ end
899
+
900
+
901
+ # indices.put_index_template
902
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Creates or updates an index template."}
903
+ def indices_put_index_template(params = {})
904
+ api_name = 'indices.put_index_template'
905
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_index_template/{name}", "methods" => ["PUT", "POST"]}]}, "body" => {"required" => true}, "params" => {"create" => {"type" => "boolean"}, "cause" => {"type" => "string"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
906
+ request(api_name, api_spec, params, [:name])
907
+ end
908
+
909
+
910
+ # indices.put_mapping
911
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/put-mapping/", "description" => "Updates the index mappings."}
912
+ def indices_put_mapping(params = {})
913
+ api_name = 'indices.put_mapping'
914
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_mapping", "methods" => ["PUT", "POST"]}]}, "body" => {"required" => true}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "write_index_only" => {"type" => "boolean"}}}
915
+ request(api_name, api_spec, params, [:index])
916
+ end
917
+
918
+
919
+ # indices.put_settings
920
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html", "description" => "Updates the index settings."}
921
+ def indices_put_settings(params = {})
922
+ api_name = 'indices.put_settings'
923
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_settings", "methods" => ["PUT"]}, {"path" => "/{index}/_settings", "methods" => ["PUT"]}]}, "body" => {"required" => true}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}, "preserve_existing" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "flat_settings" => {"type" => "boolean"}}}
924
+ request(api_name, api_spec, params, [:index])
925
+ end
926
+
927
+
928
+ # indices.put_template
929
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Creates or updates an index template."}
930
+ def indices_put_template(params = {})
931
+ api_name = 'indices.put_template'
932
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_template/{name}", "methods" => ["PUT", "POST"]}]}, "body" => {"required" => true}, "params" => {"order" => {"type" => "number"}, "create" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
933
+ request(api_name, api_spec, params, [:name])
934
+ end
935
+
936
+
937
+ # indices.recovery
938
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html", "description" => "Returns information about ongoing index shard recoveries."}
939
+ def indices_recovery(params = {})
940
+ api_name = 'indices.recovery'
941
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_recovery", "methods" => ["GET"]}, {"path" => "/{index}/_recovery", "methods" => ["GET"]}]}, "params" => {"detailed" => {"type" => "boolean"}, "active_only" => {"type" => "boolean"}}}
942
+ request(api_name, api_spec, params, [:index])
943
+ end
944
+
945
+
946
+ # indices.refresh
947
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html", "description" => "Performs the refresh operation in one or more indices."}
948
+ def indices_refresh(params = {})
949
+ api_name = 'indices.refresh'
950
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_refresh", "methods" => ["POST", "GET"]}, {"path" => "/{index}/_refresh", "methods" => ["POST", "GET"]}]}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
951
+ request(api_name, api_spec, params, [:index])
952
+ end
953
+
954
+
955
+ # indices.resolve_index
956
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html", "description" => "Returns information about any matching indices, aliases, and data streams"}
957
+ def indices_resolve_index(params = {})
958
+ api_name = 'indices.resolve_index'
959
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_resolve/index/{name}", "methods" => ["GET"]}]}, "params" => {"expand_wildcards" => {"type" => "enum"}}}
960
+ request(api_name, api_spec, params, [:name])
961
+ end
962
+
963
+
964
+ # indices.rollover
965
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html", "description" => "Updates an alias to point to a new index when the existing index\nis considered to be too large or too old."}
966
+ def indices_rollover(params = {})
967
+ api_name = 'indices.rollover'
968
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{alias}/_rollover", "methods" => ["POST"]}, {"path" => "/{alias}/_rollover/{new_index}", "methods" => ["POST"]}]}, "params" => {"timeout" => {"type" => "time"}, "dry_run" => {"type" => "boolean"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "wait_for_active_shards" => {"type" => "string"}}}
969
+ request(api_name, api_spec, params, [:alias, :new_index])
970
+ end
971
+
972
+
973
+ # indices.segments
974
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html", "description" => "Provides low-level information about segments in a Lucene index."}
975
+ def indices_segments(params = {})
976
+ api_name = 'indices.segments'
977
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_segments", "methods" => ["GET"]}, {"path" => "/{index}/_segments", "methods" => ["GET"]}]}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "verbose" => {"type" => "boolean"}}}
978
+ request(api_name, api_spec, params, [:index])
979
+ end
980
+
981
+
982
+ # indices.shard_stores
983
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html", "description" => "Provides store information for shard copies of indices."}
984
+ def indices_shard_stores(params = {})
985
+ api_name = 'indices.shard_stores'
986
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_shard_stores", "methods" => ["GET"]}, {"path" => "/{index}/_shard_stores", "methods" => ["GET"]}]}, "params" => {"status" => {"type" => "list"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
987
+ request(api_name, api_spec, params, [:index])
988
+ end
989
+
990
+
991
+ # indices.shrink
992
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/shrink-index/", "description" => "Allow to shrink an existing index into a new index with fewer primary shards."}
993
+ def indices_shrink(params = {})
994
+ api_name = 'indices.shrink'
995
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_shrink/{target}", "methods" => ["PUT", "POST"]}]}, "params" => {"copy_settings" => {"type" => "boolean"}, "timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "wait_for_active_shards" => {"type" => "string"}, "wait_for_completion" => {"type" => "boolean"}, "task_execution_timeout" => {"type" => "time"}}}
996
+ request(api_name, api_spec, params, [:index, :target])
997
+ end
998
+
999
+
1000
+ # indices.simulate_index_template
1001
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Simulate matching the given index name against the index templates in the system"}
1002
+ def indices_simulate_index_template(params = {})
1003
+ api_name = 'indices.simulate_index_template'
1004
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_index_template/_simulate_index/{name}", "methods" => ["POST"]}]}, "params" => {"create" => {"type" => "boolean"}, "cause" => {"type" => "string"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
1005
+ request(api_name, api_spec, params, [:name])
1006
+ end
1007
+
1008
+
1009
+ # indices.simulate_template
1010
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/index-templates", "description" => "Simulate resolving the given template name or body"}
1011
+ def indices_simulate_template(params = {})
1012
+ api_name = 'indices.simulate_template'
1013
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_index_template/_simulate", "methods" => ["POST"]}, {"path" => "/_index_template/_simulate/{name}", "methods" => ["POST"]}]}, "params" => {"create" => {"type" => "boolean"}, "cause" => {"type" => "string"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
1014
+ request(api_name, api_spec, params, [:name])
1015
+ end
1016
+
1017
+
1018
+ # indices.split
1019
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/split/", "description" => "Allows you to split an existing index into a new index with more primary shards."}
1020
+ def indices_split(params = {})
1021
+ api_name = 'indices.split'
1022
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_split/{target}", "methods" => ["PUT", "POST"]}]}, "params" => {"copy_settings" => {"type" => "boolean"}, "timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "wait_for_active_shards" => {"type" => "string"}, "wait_for_completion" => {"type" => "boolean"}, "task_execution_timeout" => {"type" => "time"}}}
1023
+ request(api_name, api_spec, params, [:index, :target])
1024
+ end
1025
+
1026
+
1027
+ # indices.stats
1028
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/stats/", "description" => "Provides statistics on operations happening in an index."}
1029
+ def indices_stats(params = {})
1030
+ api_name = 'indices.stats'
1031
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_stats", "methods" => ["GET"]}, {"path" => "/_stats/{metric}", "methods" => ["GET"]}, {"path" => "/{index}/_stats", "methods" => ["GET"]}, {"path" => "/{index}/_stats/{metric}", "methods" => ["GET"]}]}, "params" => {"completion_fields" => {"type" => "list"}, "fielddata_fields" => {"type" => "list"}, "fields" => {"type" => "list"}, "groups" => {"type" => "list"}, "level" => {"type" => "enum"}, "include_segment_file_sizes" => {"type" => "boolean"}, "include_unloaded_segments" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "forbid_closed_indices" => {"type" => "boolean"}}}
1032
+ request(api_name, api_spec, params, [:metric, :index])
1033
+ end
1034
+
1035
+
1036
+ # indices.update_aliases
1037
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/index-apis/alias/", "description" => "Updates index aliases."}
1038
+ def indices_update_aliases(params = {})
1039
+ api_name = 'indices.update_aliases'
1040
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_aliases", "methods" => ["POST"]}]}, "body" => {"required" => true}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
1041
+ request(api_name, api_spec, params, [])
1042
+ end
1043
+
1044
+
1045
+ # indices.upgrade
1046
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description" => "The _upgrade API is no longer useful and will be removed."}
1047
+ def indices_upgrade(params = {})
1048
+ api_name = 'indices.upgrade'
1049
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_upgrade", "methods" => ["POST"]}, {"path" => "/{index}/_upgrade", "methods" => ["POST"]}]}, "params" => {"allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "ignore_unavailable" => {"type" => "boolean"}, "wait_for_completion" => {"type" => "boolean"}, "only_ancient_segments" => {"type" => "boolean"}}}
1050
+ request(api_name, api_spec, params, [:index])
1051
+ end
1052
+
1053
+
1054
+ # indices.validate_query
1055
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html", "description" => "Allows a user to validate a potentially expensive query without executing it."}
1056
+ def indices_validate_query(params = {})
1057
+ api_name = 'indices.validate_query'
1058
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_validate/query", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_validate/query", "methods" => ["GET", "POST"]}]}, "params" => {"explain" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "q" => {"type" => "string"}, "analyzer" => {"type" => "string"}, "analyze_wildcard" => {"type" => "boolean"}, "default_operator" => {"type" => "enum"}, "df" => {"type" => "string"}, "lenient" => {"type" => "boolean"}, "rewrite" => {"type" => "boolean"}, "all_shards" => {"type" => "boolean"}}}
1059
+ request(api_name, api_spec, params, [:index])
1060
+ end
1061
+
1062
+
1063
+ # info
1064
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description" => "Returns basic information about the cluster."}
1065
+ def info(params = {})
1066
+ api_name = 'info'
1067
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/", "methods" => ["GET"]}]}, "params" => {}}
1068
+ request(api_name, api_spec, params, [])
1069
+ end
1070
+
1071
+
1072
+ # ingest.delete_pipeline
1073
+ # {"url" => "https://opensearch.org/docs/latest/ingest-pipelines/delete-ingest/", "description" => "Deletes a pipeline."}
1074
+ def ingest_delete_pipeline(params = {})
1075
+ api_name = 'ingest.delete_pipeline'
1076
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_ingest/pipeline/{id}", "methods" => ["DELETE"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
1077
+ request(api_name, api_spec, params, [:id])
1078
+ end
1079
+
1080
+
1081
+ # ingest.get_pipeline
1082
+ # {"url" => "https://opensearch.org/docs/latest/ingest-pipelines/get-ingest/", "description" => "Returns a pipeline."}
1083
+ def ingest_get_pipeline(params = {})
1084
+ api_name = 'ingest.get_pipeline'
1085
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_ingest/pipeline", "methods" => ["GET"]}, {"path" => "/_ingest/pipeline/{id}", "methods" => ["GET"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
1086
+ request(api_name, api_spec, params, [:id])
1087
+ end
1088
+
1089
+
1090
+ # ingest.processor_grok
1091
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get", "description" => "Returns a list of the built-in patterns."}
1092
+ def ingest_processor_grok(params = {})
1093
+ api_name = 'ingest.processor_grok'
1094
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_ingest/processor/grok", "methods" => ["GET"]}]}, "params" => {}}
1095
+ request(api_name, api_spec, params, [])
1096
+ end
1097
+
1098
+
1099
+ # ingest.put_pipeline
1100
+ # {"url" => "https://opensearch.org/docs/latest/ingest-pipelines/create-ingest/", "description" => "Creates or updates a pipeline."}
1101
+ def ingest_put_pipeline(params = {})
1102
+ api_name = 'ingest.put_pipeline'
1103
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_ingest/pipeline/{id}", "methods" => ["PUT"]}]}, "body" => {"required" => true}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
1104
+ request(api_name, api_spec, params, [:id])
1105
+ end
1106
+
1107
+
1108
+ # ingest.simulate
1109
+ # {"url" => "https://opensearch.org/docs/latest/ingest-pipelines/simulate-ingest/", "description" => "Allows to simulate a pipeline with example documents."}
1110
+ def ingest_simulate(params = {})
1111
+ api_name = 'ingest.simulate'
1112
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_ingest/pipeline/_simulate", "methods" => ["GET", "POST"]}, {"path" => "/_ingest/pipeline/{id}/_simulate", "methods" => ["GET", "POST"]}]}, "body" => {"required" => true}, "params" => {"verbose" => {"type" => "boolean"}}}
1113
+ request(api_name, api_spec, params, [:id])
1114
+ end
1115
+
1116
+
1117
+ # mget
1118
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html", "description" => "Allows to get multiple documents in one request."}
1119
+ def mget(params = {})
1120
+ api_name = 'mget'
1121
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_mget", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_mget", "methods" => ["GET", "POST"]}]}, "body" => {"required" => true}, "params" => {"stored_fields" => {"type" => "list"}, "preference" => {"type" => "string"}, "realtime" => {"type" => "boolean"}, "refresh" => {"type" => "boolean"}, "routing" => {"type" => "string"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}}}
1122
+ request(api_name, api_spec, params, [:index])
1123
+ end
1124
+
1125
+
1126
+ # msearch
1127
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/multi-search/", "description" => "Allows to execute several search operations in one request."}
1128
+ def msearch(params = {})
1129
+ api_name = 'msearch'
1130
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_msearch", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_msearch", "methods" => ["GET", "POST"]}]}, "body" => {"required" => true}, "params" => {"search_type" => {"type" => "enum"}, "max_concurrent_searches" => {"type" => "number"}, "typed_keys" => {"type" => "boolean"}, "pre_filter_shard_size" => {"type" => "number"}, "max_concurrent_shard_requests" => {"type" => "number"}, "rest_total_hits_as_int" => {"type" => "boolean"}, "ccs_minimize_roundtrips" => {"type" => "boolean"}}}
1131
+ request(api_name, api_spec, params, [:index])
1132
+ end
1133
+
1134
+
1135
+ # msearch_template
1136
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/search-template/", "description" => "Allows to execute several search template operations in one request."}
1137
+ def msearch_template(params = {})
1138
+ api_name = 'msearch_template'
1139
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_msearch/template", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_msearch/template", "methods" => ["GET", "POST"]}]}, "body" => {"required" => true}, "params" => {"search_type" => {"type" => "enum"}, "typed_keys" => {"type" => "boolean"}, "max_concurrent_searches" => {"type" => "number"}, "rest_total_hits_as_int" => {"type" => "boolean"}, "ccs_minimize_roundtrips" => {"type" => "boolean"}}}
1140
+ request(api_name, api_spec, params, [:index])
1141
+ end
1142
+
1143
+
1144
+ # mtermvectors
1145
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html", "description" => "Returns multiple termvectors in one request."}
1146
+ def mtermvectors(params = {})
1147
+ api_name = 'mtermvectors'
1148
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_mtermvectors", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_mtermvectors", "methods" => ["GET", "POST"]}]}, "params" => {"ids" => {"type" => "list"}, "term_statistics" => {"type" => "boolean"}, "field_statistics" => {"type" => "boolean"}, "fields" => {"type" => "list"}, "offsets" => {"type" => "boolean"}, "positions" => {"type" => "boolean"}, "payloads" => {"type" => "boolean"}, "preference" => {"type" => "string"}, "routing" => {"type" => "string"}, "realtime" => {"type" => "boolean"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}}}
1149
+ request(api_name, api_spec, params, [:index])
1150
+ end
1151
+
1152
+
1153
+ # nodes.hot_threads
1154
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/", "description" => "Returns information about hot threads on each node in the cluster."}
1155
+ def nodes_hot_threads(params = {})
1156
+ api_name = 'nodes.hot_threads'
1157
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_nodes/hot_threads", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/hot_threads", "methods" => ["GET"]}, {"path" => "/_cluster/nodes/hotthreads", "methods" => ["GET"], "deprecated" => true}, {"path" => "/_cluster/nodes/{node_id}/hotthreads", "methods" => ["GET"], "deprecated" => true}, {"path" => "/_nodes/hotthreads", "methods" => ["GET"], "deprecated" => true}, {"path" => "/_nodes/{node_id}/hotthreads", "methods" => ["GET"], "deprecated" => true}, {"path" => "/_cluster/nodes/hot_threads", "methods" => ["GET"], "deprecated" => true}, {"path" => "/_cluster/nodes/{node_id}/hot_threads", "methods" => ["GET"], "deprecated" => true}]}, "params" => {"interval" => {"type" => "time"}, "snapshots" => {"type" => "number"}, "threads" => {"type" => "number"}, "ignore_idle_threads" => {"type" => "boolean"}, "type" => {"type" => "enum"}, "timeout" => {"type" => "time"}}}
1158
+ request(api_name, api_spec, params, [:node_id])
1159
+ end
1160
+
1161
+
1162
+ # nodes.info
1163
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/", "description" => "Returns information about nodes in the cluster."}
1164
+ def nodes_info(params = {})
1165
+ api_name = 'nodes.info'
1166
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_nodes", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}", "methods" => ["GET"]}, {"path" => "/_nodes/{metric}", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/{metric}", "methods" => ["GET"]}]}, "params" => {"flat_settings" => {"type" => "boolean"}, "timeout" => {"type" => "time"}}}
1167
+ request(api_name, api_spec, params, [:node_id, :metric])
1168
+ end
1169
+
1170
+
1171
+ # nodes.reload_secure_settings
1172
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-reload-secure/", "description" => "Reloads secure settings."}
1173
+ def nodes_reload_secure_settings(params = {})
1174
+ api_name = 'nodes.reload_secure_settings'
1175
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_nodes/reload_secure_settings", "methods" => ["POST"]}, {"path" => "/_nodes/{node_id}/reload_secure_settings", "methods" => ["POST"]}]}, "params" => {"timeout" => {"type" => "time"}}}
1176
+ request(api_name, api_spec, params, [:node_id])
1177
+ end
1178
+
1179
+
1180
+ # nodes.stats
1181
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-stats/", "description" => "Returns statistical information about nodes in the cluster."}
1182
+ def nodes_stats(params = {})
1183
+ api_name = 'nodes.stats'
1184
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_nodes/stats", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/stats", "methods" => ["GET"]}, {"path" => "/_nodes/stats/{metric}", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/stats/{metric}", "methods" => ["GET"]}, {"path" => "/_nodes/stats/{metric}/{index_metric}", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/stats/{metric}/{index_metric}", "methods" => ["GET"]}]}, "params" => {"completion_fields" => {"type" => "list"}, "fielddata_fields" => {"type" => "list"}, "fields" => {"type" => "list"}, "groups" => {"type" => "boolean"}, "level" => {"type" => "enum"}, "types" => {"type" => "list"}, "timeout" => {"type" => "time"}, "include_segment_file_sizes" => {"type" => "boolean"}}}
1185
+ request(api_name, api_spec, params, [:node_id, :metric, :index_metric])
1186
+ end
1187
+
1188
+
1189
+ # nodes.usage
1190
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/", "description" => "Returns low-level information about REST actions usage on nodes."}
1191
+ def nodes_usage(params = {})
1192
+ api_name = 'nodes.usage'
1193
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_nodes/usage", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/usage", "methods" => ["GET"]}, {"path" => "/_nodes/usage/{metric}", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/usage/{metric}", "methods" => ["GET"]}]}, "params" => {"timeout" => {"type" => "time"}}}
1194
+ request(api_name, api_spec, params, [:node_id, :metric])
1195
+ end
1196
+
1197
+
1198
+ # ping
1199
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description" => "Returns whether the cluster is running."}
1200
+ def ping(params = {})
1201
+ api_name = 'ping'
1202
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/", "methods" => ["HEAD"]}]}, "params" => {}}
1203
+ request(api_name, api_spec, params, [])
1204
+ end
1205
+ alias :ping? :ping
1206
+
1207
+
1208
+ # put_script
1209
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/", "description" => "Creates or updates a script."}
1210
+ def put_script(params = {})
1211
+ api_name = 'put_script'
1212
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_scripts/{id}", "methods" => ["PUT", "POST"]}, {"path" => "/_scripts/{id}/{context}", "methods" => ["PUT", "POST"]}]}, "body" => {"required" => true}, "params" => {"timeout" => {"type" => "time"}, "master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "context" => {"type" => "string"}}}
1213
+ request(api_name, api_spec, params, [:id, :context])
1214
+ end
1215
+
1216
+
1217
+ # rank_eval
1218
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/rank-eval/", "description" => "Allows to evaluate the quality of ranked search results over a set of typical search queries"}
1219
+ def rank_eval(params = {})
1220
+ api_name = 'rank_eval'
1221
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_rank_eval", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_rank_eval", "methods" => ["GET", "POST"]}]}, "body" => {"required" => true}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "search_type" => {"type" => "enum"}}}
1222
+ request(api_name, api_spec, params, [:index])
1223
+ end
1224
+
1225
+
1226
+ # reindex
1227
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/reindex-data/", "description" => "Allows to copy documents from one index to another, optionally filtering the source\ndocuments by a query, changing the destination index settings, or fetching the\ndocuments from a remote cluster."}
1228
+ def reindex(params = {})
1229
+ api_name = 'reindex'
1230
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_reindex", "methods" => ["POST"]}]}, "body" => {"required" => true}, "params" => {"refresh" => {"type" => "boolean"}, "timeout" => {"type" => "time"}, "wait_for_active_shards" => {"type" => "string"}, "wait_for_completion" => {"type" => "boolean"}, "requests_per_second" => {"type" => "number"}, "scroll" => {"type" => "time"}, "slices" => {"type" => "number|string"}, "max_docs" => {"type" => "number"}}}
1231
+ request(api_name, api_spec, params, [])
1232
+ end
1233
+
1234
+
1235
+ # reindex_rethrottle
1236
+ # {"url" => "https://opensearch.org/docs/latest/im-plugin/reindex-data/", "description" => "Changes the number of requests per second for a particular Reindex operation."}
1237
+ def reindex_rethrottle(params = {})
1238
+ api_name = 'reindex_rethrottle'
1239
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_reindex/{task_id}/_rethrottle", "methods" => ["POST"]}]}, "params" => {"requests_per_second" => {"type" => "number", "required" => true}}}
1240
+ request(api_name, api_spec, params, [:task_id])
1241
+ end
1242
+
1243
+
1244
+ # remote_store.restore
1245
+ # {"url" => "https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/remote-store/index/#restoring-from-a-backup", "description" => "Restores from remote store."}
1246
+ def remote_store_restore(params = {})
1247
+ api_name = 'remote_store.restore'
1248
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_remotestore/_restore", "methods" => ["POST"]}]}, "body" => {"required" => true}, "params" => {"cluster_manager_timeout" => {"type" => "time"}, "wait_for_completion" => {"type" => "boolean"}}}
1249
+ request(api_name, api_spec, params, [])
1250
+ end
1251
+
1252
+
1253
+ # remote_store.stats
1254
+ # {"url" => "https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/remote-store/remote-store-stats-api/", "description" => "Stats for remote store."}
1255
+ def remote_store_stats(params = {})
1256
+ api_name = 'remote_store.stats'
1257
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_remotestore/stats/{index}", "methods" => ["GET"]}, {"path" => "/_remotestore/stats/{index}/{shard_id}", "methods" => ["GET"]}]}, "params" => {"timeout" => {"type" => "time"}}}
1258
+ request(api_name, api_spec, params, [:index, :shard_id])
1259
+ end
1260
+
1261
+
1262
+ # render_search_template
1263
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/search-template/", "description" => "Allows to use the Mustache language to pre-render a search definition."}
1264
+ def render_search_template(params = {})
1265
+ api_name = 'render_search_template'
1266
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_render/template", "methods" => ["GET", "POST"]}, {"path" => "/_render/template/{id}", "methods" => ["GET", "POST"]}]}}
1267
+ request(api_name, api_spec, params, [:id])
1268
+ end
1269
+
1270
+
1271
+ # scripts_painless_execute
1272
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/script-apis/exec-stored-script/", "description" => "Allows an arbitrary script to be executed and a result to be returned"}
1273
+ def scripts_painless_execute(params = {})
1274
+ api_name = 'scripts_painless_execute'
1275
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_scripts/painless/_execute", "methods" => ["GET", "POST"]}]}, "params" => {}}
1276
+ request(api_name, api_spec, params, [])
1277
+ end
1278
+
1279
+
1280
+ # scroll
1281
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/scroll/", "description" => "Allows to retrieve a large numbers of results from a single search request."}
1282
+ def scroll(params = {})
1283
+ api_name = 'scroll'
1284
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/scroll", "methods" => ["GET", "POST"]}, {"path" => "/_search/scroll/{scroll_id}", "methods" => ["GET", "POST"], "deprecated" => true}]}, "params" => {"scroll" => {"type" => "time"}, "scroll_id" => {"type" => "string"}, "rest_total_hits_as_int" => {"type" => "boolean"}}}
1285
+ request(api_name, api_spec, params, [:scroll_id])
1286
+ end
1287
+
1288
+
1289
+ # search
1290
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/search/", "description" => "Returns results matching a query."}
1291
+ def search(params = {})
1292
+ api_name = 'search'
1293
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_search", "methods" => ["GET", "POST"]}]}, "params" => {"analyzer" => {"type" => "string"}, "analyze_wildcard" => {"type" => "boolean"}, "ccs_minimize_roundtrips" => {"type" => "boolean"}, "default_operator" => {"type" => "enum"}, "df" => {"type" => "string"}, "explain" => {"type" => "boolean"}, "stored_fields" => {"type" => "list"}, "docvalue_fields" => {"type" => "list"}, "from" => {"type" => "number"}, "ignore_unavailable" => {"type" => "boolean"}, "ignore_throttled" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "lenient" => {"type" => "boolean"}, "preference" => {"type" => "string"}, "q" => {"type" => "string"}, "routing" => {"type" => "list"}, "scroll" => {"type" => "time"}, "search_type" => {"type" => "enum"}, "size" => {"type" => "number"}, "sort" => {"type" => "list"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "terminate_after" => {"type" => "number"}, "stats" => {"type" => "list"}, "suggest_field" => {"type" => "string"}, "suggest_mode" => {"type" => "enum"}, "suggest_size" => {"type" => "number"}, "suggest_text" => {"type" => "string"}, "timeout" => {"type" => "time"}, "track_scores" => {"type" => "boolean"}, "track_total_hits" => {"type" => "boolean"}, "allow_partial_search_results" => {"type" => "boolean"}, "typed_keys" => {"type" => "boolean"}, "version" => {"type" => "boolean"}, "seq_no_primary_term" => {"type" => "boolean"}, "request_cache" => {"type" => "boolean"}, "batched_reduce_size" => {"type" => "number"}, "max_concurrent_shard_requests" => {"type" => "number"}, "pre_filter_shard_size" => {"type" => "number"}, "rest_total_hits_as_int" => {"type" => "boolean"}, "search_pipeline" => {"type" => "string"}, "include_named_queries_score" => {"type" => "boolean"}}}
1294
+ request(api_name, api_spec, params, [:index])
1295
+ end
1296
+
1297
+
1298
+ # search_pipeline.delete
1299
+ # {"description" => "Deletes a search pipeline.", "url" => "https://opensearch.org/docs/latest/search-plugins/search-pipelines/index/"}
1300
+ def search_pipeline_delete(params = {})
1301
+ api_name = 'search_pipeline.delete'
1302
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/pipeline/{id}", "methods" => ["DELETE"]}]}, "params" => {"cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
1303
+ request(api_name, api_spec, params, [:id])
1304
+ end
1305
+
1306
+
1307
+ # search_pipeline.get
1308
+ # {"description" => "Returns a search pipeline", "url" => "https://opensearch.org/docs/latest/search-plugins/search-pipelines/retrieving-search-pipeline/"}
1309
+ def search_pipeline_get(params = {})
1310
+ api_name = 'search_pipeline.get'
1311
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/pipeline", "methods" => ["GET"]}, {"path" => "/_search/pipeline/{id}", "methods" => ["GET"]}]}, "params" => {"cluster_manager_timeout" => {"type" => "time"}}}
1312
+ request(api_name, api_spec, params, [:id])
1313
+ end
1314
+
1315
+
1316
+ # search_pipeline.put
1317
+ # {"description" => "Creates or updates a search pipeline.", "url" => "https://opensearch.org/docs/latest/search-plugins/search-pipelines/creating-search-pipeline/"}
1318
+ def search_pipeline_put(params = {})
1319
+ api_name = 'search_pipeline.put'
1320
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/pipeline/{id}", "methods" => ["PUT"]}]}, "body" => {"required" => true}, "params" => {"cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
1321
+ request(api_name, api_spec, params, [:id])
1322
+ end
1323
+
1324
+
1325
+ # search_shards
1326
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html", "description" => "Returns information about the indices and shards that a search request would be executed against."}
1327
+ def search_shards(params = {})
1328
+ api_name = 'search_shards'
1329
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search_shards", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_search_shards", "methods" => ["GET", "POST"]}]}, "params" => {"preference" => {"type" => "string"}, "routing" => {"type" => "string"}, "local" => {"type" => "boolean"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}}}
1330
+ request(api_name, api_spec, params, [:index])
1331
+ end
1332
+
1333
+
1334
+ # search_template
1335
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/search-template/", "description" => "Allows to use the Mustache language to pre-render a search definition."}
1336
+ def search_template(params = {})
1337
+ api_name = 'search_template'
1338
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_search/template", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_search/template", "methods" => ["GET", "POST"]}]}, "body" => {"required" => true}, "params" => {"ignore_unavailable" => {"type" => "boolean"}, "ignore_throttled" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "expand_wildcards" => {"type" => "enum"}, "preference" => {"type" => "string"}, "routing" => {"type" => "list"}, "scroll" => {"type" => "time"}, "search_type" => {"type" => "enum"}, "explain" => {"type" => "boolean"}, "profile" => {"type" => "boolean"}, "typed_keys" => {"type" => "boolean"}, "rest_total_hits_as_int" => {"type" => "boolean"}, "ccs_minimize_roundtrips" => {"type" => "boolean"}}}
1339
+ request(api_name, api_spec, params, [:index])
1340
+ end
1341
+
1342
+
1343
+ # snapshot.cleanup_repository
1344
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/index/", "description" => "Removes stale data from repository."}
1345
+ def snapshot_cleanup_repository(params = {})
1346
+ api_name = 'snapshot.cleanup_repository'
1347
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}/_cleanup", "methods" => ["POST"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
1348
+ request(api_name, api_spec, params, [:repository])
1349
+ end
1350
+
1351
+
1352
+ # snapshot.clone
1353
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/index/", "description" => "Clones indices from one snapshot into another snapshot in the same repository."}
1354
+ def snapshot_clone(params = {})
1355
+ api_name = 'snapshot.clone'
1356
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}", "methods" => ["PUT"]}]}, "body" => {"required" => true}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
1357
+ request(api_name, api_spec, params, [:repository, :snapshot, :target_snapshot])
1358
+ end
1359
+
1360
+
1361
+ # snapshot.create
1362
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/create-snapshot/", "description" => "Creates a snapshot in a repository."}
1363
+ def snapshot_create(params = {})
1364
+ api_name = 'snapshot.create'
1365
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}", "methods" => ["PUT", "POST"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "wait_for_completion" => {"type" => "boolean"}}}
1366
+ request(api_name, api_spec, params, [:repository, :snapshot])
1367
+ end
1368
+
1369
+
1370
+ # snapshot.create_repository
1371
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/create-repository/", "description" => "Creates a repository."}
1372
+ def snapshot_create_repository(params = {})
1373
+ api_name = 'snapshot.create_repository'
1374
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}", "methods" => ["PUT", "POST"]}]}, "body" => {"required" => true}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}, "verify" => {"type" => "boolean"}}}
1375
+ request(api_name, api_spec, params, [:repository])
1376
+ end
1377
+
1378
+
1379
+ # snapshot.delete
1380
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot/", "description" => "Deletes a snapshot."}
1381
+ def snapshot_delete(params = {})
1382
+ api_name = 'snapshot.delete'
1383
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}", "methods" => ["DELETE"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}}}
1384
+ request(api_name, api_spec, params, [:repository, :snapshot])
1385
+ end
1386
+
1387
+
1388
+ # snapshot.delete_repository
1389
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot-repository/", "description" => "Deletes a repository."}
1390
+ def snapshot_delete_repository(params = {})
1391
+ api_name = 'snapshot.delete_repository'
1392
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}", "methods" => ["DELETE"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
1393
+ request(api_name, api_spec, params, [:repository])
1394
+ end
1395
+
1396
+
1397
+ # snapshot.get
1398
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot/", "description" => "Returns information about a snapshot."}
1399
+ def snapshot_get(params = {})
1400
+ api_name = 'snapshot.get'
1401
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}", "methods" => ["GET"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}, "verbose" => {"type" => "boolean"}}}
1402
+ request(api_name, api_spec, params, [:repository, :snapshot])
1403
+ end
1404
+
1405
+
1406
+ # snapshot.get_repository
1407
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-repository/", "description" => "Returns information about a repository."}
1408
+ def snapshot_get_repository(params = {})
1409
+ api_name = 'snapshot.get_repository'
1410
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot", "methods" => ["GET"]}, {"path" => "/_snapshot/{repository}", "methods" => ["GET"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "local" => {"type" => "boolean"}}}
1411
+ request(api_name, api_spec, params, [:repository])
1412
+ end
1413
+
1414
+
1415
+ # snapshot.restore
1416
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/restore-snapshot/", "description" => "Restores a snapshot."}
1417
+ def snapshot_restore(params = {})
1418
+ api_name = 'snapshot.restore'
1419
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}/_restore", "methods" => ["POST"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "wait_for_completion" => {"type" => "boolean"}, "source_remote_store_repository" => {"type" => "string"}}}
1420
+ request(api_name, api_spec, params, [:repository, :snapshot])
1421
+ end
1422
+
1423
+
1424
+ # snapshot.status
1425
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-status/", "description" => "Returns information about the status of a snapshot."}
1426
+ def snapshot_status(params = {})
1427
+ api_name = 'snapshot.status'
1428
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/_status", "methods" => ["GET"]}, {"path" => "/_snapshot/{repository}/_status", "methods" => ["GET"]}, {"path" => "/_snapshot/{repository}/{snapshot}/_status", "methods" => ["GET"]}, {"path" => "/_snapshot/{repository}/{snapshot}/{index}/_status", "methods" => ["GET"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "ignore_unavailable" => {"type" => "boolean"}}}
1429
+ request(api_name, api_spec, params, [:repository, :snapshot, :index])
1430
+ end
1431
+
1432
+
1433
+ # snapshot.verify_repository
1434
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/snapshots/verify-snapshot-repository/", "description" => "Verifies a repository."}
1435
+ def snapshot_verify_repository(params = {})
1436
+ api_name = 'snapshot.verify_repository'
1437
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_snapshot/{repository}/_verify", "methods" => ["POST"]}]}, "params" => {"master_timeout" => {"type" => "time"}, "cluster_manager_timeout" => {"type" => "time"}, "timeout" => {"type" => "time"}}}
1438
+ request(api_name, api_spec, params, [:repository])
1439
+ end
1440
+
1441
+
1442
+ # tasks.cancel
1443
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/tasks/", "description" => "Cancels a task, if it can be cancelled through an API."}
1444
+ def tasks_cancel(params = {})
1445
+ api_name = 'tasks.cancel'
1446
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_tasks/_cancel", "methods" => ["POST"]}, {"path" => "/_tasks/{task_id}/_cancel", "methods" => ["POST"]}]}, "params" => {"nodes" => {"type" => "list"}, "actions" => {"type" => "list"}, "parent_task_id" => {"type" => "string"}, "wait_for_completion" => {"type" => "boolean"}}}
1447
+ request(api_name, api_spec, params, [:task_id])
1448
+ end
1449
+
1450
+
1451
+ # tasks.get
1452
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/tasks/", "description" => "Returns information about a task."}
1453
+ def tasks_get(params = {})
1454
+ api_name = 'tasks.get'
1455
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_tasks/{task_id}", "methods" => ["GET"]}]}, "params" => {"wait_for_completion" => {"type" => "boolean"}, "timeout" => {"type" => "time"}}}
1456
+ request(api_name, api_spec, params, [:task_id])
1457
+ end
1458
+
1459
+
1460
+ # tasks.list
1461
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/tasks/", "description" => "Returns a list of tasks."}
1462
+ def tasks_list(params = {})
1463
+ api_name = 'tasks.list'
1464
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_tasks", "methods" => ["GET"]}]}, "params" => {"nodes" => {"type" => "list"}, "actions" => {"type" => "list"}, "detailed" => {"type" => "boolean"}, "parent_task_id" => {"type" => "string"}, "wait_for_completion" => {"type" => "boolean"}, "group_by" => {"type" => "enum"}, "timeout" => {"type" => "time"}}}
1465
+ request(api_name, api_spec, params, [])
1466
+ end
1467
+
1468
+
1469
+ # termvectors
1470
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html", "description" => "Returns information and statistics about terms in the fields of a particular document."}
1471
+ def termvectors(params = {})
1472
+ api_name = 'termvectors'
1473
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_termvectors/{id}", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_termvectors", "methods" => ["GET", "POST"]}]}, "params" => {"term_statistics" => {"type" => "boolean"}, "field_statistics" => {"type" => "boolean"}, "fields" => {"type" => "list"}, "offsets" => {"type" => "boolean"}, "positions" => {"type" => "boolean"}, "payloads" => {"type" => "boolean"}, "preference" => {"type" => "string"}, "routing" => {"type" => "string"}, "realtime" => {"type" => "boolean"}, "version" => {"type" => "number"}, "version_type" => {"type" => "enum"}}}
1474
+ request(api_name, api_spec, params, [:index, :id])
1475
+ end
1476
+
1477
+
1478
+ # update
1479
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/update-document/", "description" => "Updates a document with a script or partial document."}
1480
+ def update(params = {})
1481
+ api_name = 'update'
1482
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_update/{id}", "methods" => ["POST"]}]}, "body" => {"required" => true}, "params" => {"wait_for_active_shards" => {"type" => "string"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "lang" => {"type" => "string"}, "refresh" => {"type" => "enum"}, "retry_on_conflict" => {"type" => "number"}, "routing" => {"type" => "string"}, "timeout" => {"type" => "time"}, "if_seq_no" => {"type" => "number"}, "if_primary_term" => {"type" => "number"}, "require_alias" => {"type" => "boolean"}}}
1483
+ request(api_name, api_spec, params, [:id, :index])
1484
+ end
1485
+
1486
+
1487
+ # update_by_query
1488
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/update-by-query/", "description" => "Performs an update on every document in the index without changing the source,\nfor example to pick up a mapping change."}
1489
+ def update_by_query(params = {})
1490
+ api_name = 'update_by_query'
1491
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/{index}/_update_by_query", "methods" => ["POST"]}]}, "params" => {"analyzer" => {"type" => "string"}, "analyze_wildcard" => {"type" => "boolean"}, "default_operator" => {"type" => "enum"}, "df" => {"type" => "string"}, "from" => {"type" => "number"}, "ignore_unavailable" => {"type" => "boolean"}, "allow_no_indices" => {"type" => "boolean"}, "conflicts" => {"type" => "enum"}, "expand_wildcards" => {"type" => "enum"}, "lenient" => {"type" => "boolean"}, "pipeline" => {"type" => "string"}, "preference" => {"type" => "string"}, "q" => {"type" => "string"}, "routing" => {"type" => "list"}, "scroll" => {"type" => "time"}, "search_type" => {"type" => "enum"}, "search_timeout" => {"type" => "time"}, "size" => {"type" => "number"}, "max_docs" => {"type" => "number"}, "sort" => {"type" => "list"}, "_source" => {"type" => "list"}, "_source_excludes" => {"type" => "list"}, "_source_includes" => {"type" => "list"}, "terminate_after" => {"type" => "number"}, "stats" => {"type" => "list"}, "version" => {"type" => "boolean"}, "version_type" => {"type" => "boolean"}, "request_cache" => {"type" => "boolean"}, "refresh" => {"type" => "boolean"}, "timeout" => {"type" => "time"}, "wait_for_active_shards" => {"type" => "string"}, "scroll_size" => {"type" => "number"}, "wait_for_completion" => {"type" => "boolean"}, "requests_per_second" => {"type" => "number"}, "slices" => {"type" => "number|string"}}}
1492
+ request(api_name, api_spec, params, [:index])
1493
+ end
1494
+
1495
+
1496
+ # update_by_query_rethrottle
1497
+ # {"url" => "https://opensearch.org/docs/latest/api-reference/document-apis/update-by-query/", "description" => "Changes the number of requests per second for a particular Update By Query operation."}
1498
+ def update_by_query_rethrottle(params = {})
1499
+ api_name = 'update_by_query_rethrottle'
1500
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_update_by_query/{task_id}/_rethrottle", "methods" => ["POST"]}]}, "params" => {"requests_per_second" => {"type" => "number", "required" => true}}}
1501
+ request(api_name, api_spec, params, [:task_id])
1502
+ end
1503
+
1504
+
1505
+ # wlm_stats_list
1506
+ # {"url" => "https://docs.opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/workload-management/wlm-feature-overview/", "description" => "This API endpoint returns a list of WLM stats with pagination support."}
1507
+ def wlm_stats_list(params = {})
1508
+ api_name = 'wlm_stats_list'
1509
+ api_spec = @api_specs[api_name] ||= {"url" => {"paths" => [{"path" => "/_list/wlm_stats", "methods" => ["GET"]}]}, "params" => {"size" => {"type" => "int"}, "next_token" => {"type" => "string"}, "sort" => {"type" => "string"}, "order" => {"type" => "string"}, "v" => {"type" => "boolean"}}}
1510
+ request(api_name, api_spec, params, [])
1511
+ end
1512
+ end
1513
+ end
1514
+ end