From 39bae25ae6c8450eca0955931732c0a365ca4d12 Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 18 Sep 2025 09:33:47 +0100 Subject: [PATCH] Add missing common cat params (#134870) Relates elastic/elasticsearch-specification#5298 Co-authored-by: Quentin Pradet (cherry picked from commit d0ea79a3a41ae9032dbae11f7ace5547dcfa5709) # Conflicts: # rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json --- .../rest-api-spec/api/cat.aliases.json | 29 +++++++++++++++++-- .../rest-api-spec/api/cat.allocation.json | 13 +++++++++ .../api/cat.component_templates.json | 25 ++++++++++++++++ .../rest-api-spec/api/cat.count.json | 25 ++++++++++++++++ .../rest-api-spec/api/cat.fielddata.json | 13 +++++++++ .../rest-api-spec/api/cat.health.json | 12 ++++++++ .../rest-api-spec/api/cat.master.json | 25 ++++++++++++++++ .../rest-api-spec/api/cat.ml_datafeeds.json | 12 ++++++++ .../rest-api-spec/api/cat.nodeattrs.json | 25 ++++++++++++++++ .../rest-api-spec/api/cat.pending_tasks.json | 12 ++++++++ .../rest-api-spec/api/cat.plugins.json | 25 ++++++++++++++++ .../rest-api-spec/api/cat.repositories.json | 25 ++++++++++++++++ .../rest-api-spec/api/cat.segments.json | 13 +++++++++ .../rest-api-spec/api/cat.snapshots.json | 12 ++++++++ .../rest-api-spec/api/cat.tasks.json | 12 ++++++++ .../rest-api-spec/api/cat.templates.json | 25 ++++++++++++++++ .../rest-api-spec/api/cat.thread_pool.json | 12 ++++++++ .../rest-api-spec/api/cat.transforms.json | 12 ++++++++ 18 files changed, 325 insertions(+), 2 deletions(-) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json index daa9596541e10..416b6b99ee29d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json @@ -72,8 +72,33 @@ }, "master_timeout": { "type": "time", - "description": "Timeout for waiting for new cluster state in case it is blocked", - "default": "30s" + "default": "30s", + "description": "Timeout for waiting for new cluster state in case it is blocked" + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.allocation.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.allocation.json index 40700f629e49b..b9a4e7ee71080 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.allocation.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.allocation.json @@ -52,6 +52,19 @@ "pb" ] }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] + }, "local": { "type": "boolean", "description": "Return local information, do not retrieve the state from master node (default: false)" diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.component_templates.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.component_templates.json index b4434ccca69b7..da9922cbbdf73 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.component_templates.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.component_templates.json @@ -65,6 +65,31 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.count.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.count.json index d4714e43b3709..7752bf0e8534d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.count.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.count.json @@ -57,6 +57,31 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.fielddata.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.fielddata.json index 3826a391c9c30..4c1578ccb53ad 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.fielddata.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.fielddata.json @@ -73,6 +73,19 @@ "fields": { "type": "list", "description": "A comma-separated list of fields to return in the output" + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.health.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.health.json index 383a87b0ddb7b..ef696e2872fae 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.health.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.health.json @@ -63,6 +63,18 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.master.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.master.json index e5753f3913e09..5cfd09d1e1794 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.master.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.master.json @@ -53,6 +53,31 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.ml_datafeeds.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.ml_datafeeds.json index 7b81872cbaebc..7323feb8ad491 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.ml_datafeeds.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.ml_datafeeds.json @@ -75,6 +75,18 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodeattrs.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodeattrs.json index 382da2d5fd962..0f7e3bbb5074b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodeattrs.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodeattrs.json @@ -53,6 +53,31 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.pending_tasks.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.pending_tasks.json index eda787899f93d..01362c54ee5d9 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.pending_tasks.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.pending_tasks.json @@ -66,6 +66,18 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.plugins.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.plugins.json index 5b56e63901634..e28fcfa2c516f 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.plugins.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.plugins.json @@ -58,6 +58,31 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.repositories.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.repositories.json index a432a3379516f..a24b01ec62ae7 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.repositories.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.repositories.json @@ -54,6 +54,31 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json index 5057003de47e8..5bc39a447b3ce 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json @@ -77,6 +77,19 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.snapshots.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.snapshots.json index 024aaee557929..be3b7254e8b97 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.snapshots.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.snapshots.json @@ -79,6 +79,18 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.tasks.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.tasks.json index 3aef3ea4f4801..1056e991a8255 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.tasks.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.tasks.json @@ -84,6 +84,18 @@ "type": "boolean", "default": false, "description": "If `true`, the request blocks until the task has completed." + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.templates.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.templates.json index ab5136d46230c..93675d70c314c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.templates.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.templates.json @@ -65,6 +65,31 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] + }, + "time": { + "type": "enum", + "description": "The unit in which to display time values", + "options": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json index e2e21165c7e7a..418bf7bdfe0c8 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json @@ -78,6 +78,18 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.transforms.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.transforms.json index 624544deec842..11d5c53f9b95a 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.transforms.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.transforms.json @@ -85,6 +85,18 @@ "type": "boolean", "description": "Verbose mode. Display column headers", "default": false + }, + "bytes": { + "type": "enum", + "description": "The unit in which to display byte values", + "options": [ + "b", + "kb", + "mb", + "gb", + "tb", + "pb" + ] } } }