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