Skip to content

Commit f4ee5ee

Browse files
committed
Update Rest spec and generated code
1 parent aaef899 commit f4ee5ee

22 files changed

+1775
-135
lines changed

api_generator/rest_specs/cat.nodes.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@
8787
"type":"boolean",
8888
"description":"Verbose mode. Display column headers",
8989
"default":false
90+
},
91+
"include_unloaded_segments":{
92+
"type":"boolean",
93+
"description":"If set to true segment stats will include stats for segments that are not currently loaded into memory",
94+
"default":false
9095
}
9196
}
9297
}

api_generator/rest_specs/snapshot.get_features.json renamed to api_generator/rest_specs/features.get_features.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"snapshot.get_features":{
2+
"features.get_features":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html",
5-
"description":"Returns a list of features which can be snapshotted in this cluster."
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html",
5+
"description":"Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot"
66
},
77
"stability":"stable",
88
"visibility":"public",
@@ -12,7 +12,7 @@
1212
"url":{
1313
"paths":[
1414
{
15-
"path":"/_snapshottable_features",
15+
"path":"/_features",
1616
"methods":[
1717
"GET"
1818
]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"features.reset_features":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html",
5+
"description":"Resets the internal state of features, usually by deleting system indices"
6+
},
7+
"stability":"experimental",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"]
11+
},
12+
"url":{
13+
"paths":[
14+
{
15+
"path":"/_features/_reset",
16+
"methods":[
17+
"POST"
18+
]
19+
}
20+
]
21+
}
22+
}
23+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"ingest.geo_ip_stats": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html",
5+
"description": "Returns statistical information about geoip databases"
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
13+
},
14+
"url": {
15+
"paths": [
16+
{
17+
"path": "/_ingest/geoip/stats",
18+
"methods": [
19+
"GET"
20+
]
21+
}
22+
]
23+
}
24+
}
25+
}

api_generator/rest_specs/ingest.get_pipeline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
]
3333
},
3434
"params":{
35+
"summary":{
36+
"type":"boolean",
37+
"description":"Return pipelines without their definitions (default: false)"
38+
},
3539
"master_timeout":{
3640
"type":"time",
3741
"description":"Explicit operation timeout for connection to master node"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"ml.delete_trained_model_alias":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html",
5+
"description":"Deletes a model alias that refers to the trained model"
6+
},
7+
"stability":"beta",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url":{
14+
"paths":[
15+
{
16+
"path":"/_ml/trained_models/{model_id}/model_aliases/{model_alias}",
17+
"methods":[
18+
"DELETE"
19+
],
20+
"parts":{
21+
"model_alias":{
22+
"type":"string",
23+
"description":"The trained model alias to delete"
24+
},
25+
"model_id": {
26+
"type": "string",
27+
"description": "The trained model where the model alias is assigned"
28+
}
29+
}
30+
}
31+
]
32+
}
33+
}
34+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"ml.preview_data_frame_analytics":{
3+
"documentation":{
4+
"url":"http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html",
5+
"description":"Previews that will be analyzed given a data frame analytics config."
6+
},
7+
"stability":"beta",
8+
"visibility":"public",
9+
"headers":{
10+
"accept":[ "application/json"],
11+
"content_type":["application/json"]
12+
},
13+
"url":{
14+
"paths":[
15+
{
16+
"path":"/_ml/data_frame/analytics/_preview",
17+
"methods":[
18+
"GET",
19+
"POST"
20+
],
21+
"parts":{}
22+
},
23+
{
24+
"path":"/_ml/data_frame/analytics/{id}/_preview",
25+
"methods":[
26+
"GET",
27+
"POST"
28+
],
29+
"parts":{
30+
"id":{
31+
"type":"string",
32+
"description":"The ID of the data frame analytics to preview"
33+
}
34+
}
35+
}
36+
]
37+
},
38+
"body":{
39+
"description":"The data frame analytics config to preview",
40+
"required":false
41+
}
42+
}
43+
}

api_generator/rest_specs/ml.preview_datafeed.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,28 @@
1414
{
1515
"path":"/_ml/datafeeds/{datafeed_id}/_preview",
1616
"methods":[
17-
"GET"
17+
"GET",
18+
"POST"
1819
],
1920
"parts":{
2021
"datafeed_id":{
2122
"type":"string",
2223
"description":"The ID of the datafeed to preview"
2324
}
2425
}
26+
},
27+
{
28+
"path":"/_ml/datafeeds/_preview",
29+
"methods":[
30+
"GET",
31+
"POST"
32+
]
2533
}
2634
]
35+
},
36+
"body":{
37+
"description":"The datafeed config and job config with which to execute the preview",
38+
"required":false
2739
}
2840
}
2941
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"ml.put_trained_model_alias":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html",
5+
"description":"Creates a new model alias (or reassigns an existing one) to refer to the trained model"
6+
},
7+
"stability":"beta",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url":{
14+
"paths":[
15+
{
16+
"path":"/_ml/trained_models/{model_id}/model_aliases/{model_alias}",
17+
"methods":[
18+
"PUT"
19+
],
20+
"parts":{
21+
"model_alias":{
22+
"type":"string",
23+
"description":"The trained model alias to update"
24+
},
25+
"model_id": {
26+
"type": "string",
27+
"description": "The trained model where the model alias should be assigned"
28+
}
29+
}
30+
}
31+
]
32+
},
33+
"params":{
34+
"reassign":{
35+
"type":"boolean",
36+
"description":"If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false."
37+
}
38+
}
39+
}
40+
}

api_generator/rest_specs/nodes.stats.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@
226226
"type":"boolean",
227227
"description":"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)",
228228
"default":false
229+
},
230+
"include_unloaded_segments":{
231+
"type":"boolean",
232+
"description":"If set to true segment stats will include stats for segments that are not currently loaded into memory",
233+
"default":false
229234
}
230235
}
231236
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"shutdown.delete_node":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current",
5+
"description":"Removes a node from the shutdown list"
6+
},
7+
"stability":"experimental",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url":{
14+
"paths":[
15+
{
16+
"path":"/_nodes/{node_id}/shutdown",
17+
"methods":[
18+
"DELETE"
19+
],
20+
"parts":{
21+
"node_id":{
22+
"type":"string",
23+
"description":"The node id of node to be removed from the shutdown state"
24+
}
25+
}
26+
}
27+
]
28+
},
29+
"params":{}
30+
}
31+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"shutdown.get_node":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current",
5+
"description":"Retrieve status of a node or nodes that are currently marked as shutting down"
6+
},
7+
"stability":"experimental",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url":{
14+
"paths":[
15+
{
16+
"path":"/_nodes/shutdown",
17+
"methods":["GET"],
18+
"parts":{}
19+
},
20+
{
21+
"path":"/_nodes/{node_id}/shutdown",
22+
"methods":["GET"],
23+
"parts":{
24+
"node_id":{
25+
"type":"string",
26+
"description":"Which node for which to retrieve the shutdown status"
27+
}
28+
}
29+
}
30+
]
31+
},
32+
"params":{}
33+
}
34+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"shutdown.put_node":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current",
5+
"description":"Adds a node to be shut down"
6+
},
7+
"stability":"experimental",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url":{
14+
"paths":[
15+
{
16+
"path":"/_nodes/{node_id}/shutdown",
17+
"methods":[
18+
"PUT"
19+
],
20+
"parts":{
21+
"node_id":{
22+
"type":"string",
23+
"description":"The node id of node to be shut down"
24+
}
25+
}
26+
}
27+
]
28+
},
29+
"params":{},
30+
"body":{
31+
"description":"The shutdown type definition to register",
32+
"required": true
33+
}
34+
}
35+
}

elasticsearch/src/.generated.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ written = [
77
'dangling_indices.rs',
88
'enrich.rs',
99
'eql.rs',
10+
'features.rs',
1011
'graph.rs',
1112
'ilm.rs',
1213
'indices.rs',
@@ -21,6 +22,7 @@ written = [
2122
'root/mod.rs',
2223
'searchable_snapshots.rs',
2324
'security.rs',
25+
'shutdown.rs',
2426
'slm.rs',
2527
'snapshot.rs',
2628
'sql.rs',

0 commit comments

Comments
 (0)