From c04513638985eb6b78ed6b192d8cbccee713bc1b Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 14 Nov 2025 10:52:38 +0400 Subject: [PATCH] rest-api-spec: fix cluster/indices/nodes enums (#137999) --- .../rest-api-spec/api/cluster.reroute.json | 15 ++--- .../rest-api-spec/api/cluster.state.json | 2 + .../rest-api-spec/api/indices.stats.json | 16 ++++- .../rest-api-spec/api/nodes.info.json | 10 ++- .../rest-api-spec/api/nodes.stats.json | 64 +++++++++++++++---- .../rest-api-spec/api/nodes.usage.json | 2 + 6 files changed, 79 insertions(+), 30 deletions(-) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cluster.reroute.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cluster.reroute.json index 4181c6b43663e..df930a78edf2f 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cluster.reroute.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cluster.reroute.json @@ -42,17 +42,10 @@ }, "metric": { "type": "list", - "options": [ - "_all", - "blocks", - "metadata", - "nodes", - "none", - "routing_table", - "master_node", - "version" - ], - "default": "all", + "deprecated": { + "version": "8.6.0", + "description": "This parameter has no effect; its use will be forbidden in a future version." + }, "description": "Limit the information returned to the specified metrics. Defaults to all but metadata" }, "master_timeout": { diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json index 8c0e0cfb09c84..50f4c73128344 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json @@ -30,6 +30,7 @@ "options": [ "_all", "blocks", + "customs", "metadata", "nodes", "routing_table", @@ -56,6 +57,7 @@ "options": [ "_all", "blocks", + "customs", "metadata", "nodes", "routing_table", diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.stats.json b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.stats.json index abc180ce96630..d4f043070246a 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.stats.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.stats.json @@ -36,14 +36,20 @@ "flush", "get", "indexing", + "mappings", "merge", + "recovery", "request_cache", "refresh", "search", "segments", + "shard_stats", "store", + "translog", "warmer", - "bulk" + "bulk", + "dense_vector", + "sparse_vector" ], "description": "Limit the information returned the specific metrics." } @@ -82,14 +88,20 @@ "flush", "get", "indexing", + "mappings", "merge", + "recovery", "request_cache", "refresh", "search", "segments", + "shard_stats", "store", + "translog", "warmer", - "bulk" + "bulk", + "dense_vector", + "sparse_vector" ], "description": "Limit the information returned the specific metrics." } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.info.json b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.info.json index 662a43bb6120f..76f0a951be1d5 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.info.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.info.json @@ -40,9 +40,12 @@ "metric": { "type": "list", "options": [ + "_all", + "_none", "settings", "os", "process", + "remote_cluster_server", "jvm", "thread_pool", "transport", @@ -69,9 +72,12 @@ "metric": { "type": "list", "options": [ + "_all", + "_none", "settings", "os", "process", + "remote_cluster_server", "jvm", "thread_pool", "transport", @@ -79,9 +85,7 @@ "plugins", "ingest", "indices", - "aggregations", - "_all", - "_none" + "aggregations" ], "description": "A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics." } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.stats.json b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.stats.json index 82b480d70dd55..bd69bc7544959 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.stats.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.stats.json @@ -41,18 +41,24 @@ "type": "list", "options": [ "_all", + "_none", + "adaptive_selection", + "allocations", "breaker", + "discovery", "fs", "http", + "indexing_pressure", "indices", "ingest", "jvm", "os", "process", + "repositories", + "script", + "script_cache", "thread_pool", - "transport", - "discovery", - "indexing_pressure" + "transport" ], "description": "Limit the information returned to the specified metrics" } @@ -68,18 +74,24 @@ "type": "list", "options": [ "_all", + "_none", + "adaptive_selection", + "allocations", "breaker", + "discovery", "fs", "http", + "indexing_pressure", "indices", "ingest", "jvm", "os", "process", + "repositories", + "script", + "script_cache", "thread_pool", - "transport", - "discovery", - "indexing_pressure" + "transport" ], "description": "Limit the information returned to the specified metrics" }, @@ -99,17 +111,24 @@ "type": "list", "options": [ "_all", + "_none", + "adaptive_selection", + "allocations", "breaker", + "discovery", "fs", "http", + "indexing_pressure", "indices", + "ingest", "jvm", "os", "process", + "repositories", + "script", + "script_cache", "thread_pool", - "transport", - "discovery", - "indexing_pressure" + "transport" ], "description": "Limit the information returned to the specified metrics" }, @@ -124,15 +143,20 @@ "flush", "get", "indexing", + "mappings", "merge", "request_cache", + "recovery", "refresh", "search", "segments", "store", "warmer", "bulk", - "shard_stats" + "shard_stats", + "translog", + "dense_vector", + "sparse_vector" ], "description": "Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified." } @@ -148,17 +172,24 @@ "type": "list", "options": [ "_all", + "_none", + "adaptive_selection", + "allocations", "breaker", + "discovery", "fs", "http", + "indexing_pressure", "indices", + "ingest", "jvm", "os", "process", + "repositories", + "script", + "script_cache", "thread_pool", - "transport", - "discovery", - "indexing_pressure" + "transport" ], "description": "Limit the information returned to the specified metrics" }, @@ -173,15 +204,20 @@ "flush", "get", "indexing", + "mappings", "merge", "request_cache", + "recovery", "refresh", "search", "segments", "store", "warmer", "bulk", - "shard_stats" + "shard_stats", + "translog", + "dense_vector", + "sparse_vector" ], "description": "Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified." }, diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.usage.json b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.usage.json index 439d20221f2a6..6eee8111cb72b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.usage.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.usage.json @@ -41,6 +41,7 @@ "type": "list", "options": [ "_all", + "aggregations", "rest_actions" ], "description": "Limit the information returned to the specified metrics" @@ -57,6 +58,7 @@ "type": "list", "options": [ "_all", + "aggregations", "rest_actions" ], "description": "Limit the information returned to the specified metrics"