From bd001474be1d6fab804b960cb7899884c0ddfb1a Mon Sep 17 00:00:00 2001 From: pquentin <42327+pquentin@users.noreply.github.com> Date: Tue, 1 Jul 2025 04:19:14 +0000 Subject: [PATCH] Update rest-api-spec --- output/schema/schema.json | 52 +++++++++++++++++++ .../indices.get_data_stream_mappings.json | 34 ++++++++++++ .../indices.put_data_stream_mappings.json | 47 +++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 specification/_json_spec/indices.get_data_stream_mappings.json create mode 100644 specification/_json_spec/indices.put_data_stream_mappings.json diff --git a/output/schema/schema.json b/output/schema/schema.json index 59f66e7f3e..37f9d7cb1a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7930,6 +7930,32 @@ } ] }, + { + "availability": { + "stack": { + "featureFlag": "logs_stream", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Gets a data stream's mappings", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "name": "indices.get_data_stream_mappings", + "request": null, + "requestBodyRequired": false, + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_data_stream/{name}/_mappings" + } + ] + }, { "availability": { "serverless": { @@ -8581,6 +8607,32 @@ } ] }, + { + "availability": { + "stack": { + "featureFlag": "logs_stream", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Updates a data stream's mappings", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "name": "indices.put_data_stream_mappings", + "request": null, + "requestBodyRequired": true, + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_data_stream/{name}/_mappings" + } + ] + }, { "availability": { "serverless": { diff --git a/specification/_json_spec/indices.get_data_stream_mappings.json b/specification/_json_spec/indices.get_data_stream_mappings.json new file mode 100644 index 0000000000..90f0118f20 --- /dev/null +++ b/specification/_json_spec/indices.get_data_stream_mappings.json @@ -0,0 +1,34 @@ +{ + "indices.get_data_stream_mappings": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "description": "Gets a data stream's mappings" + }, + "stability": "stable", + "visibility": "feature_flag", + "feature_flag": "logs_stream", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_data_stream/{name}/_mappings", + "methods": ["GET"], + "parts": { + "name": { + "type": "string", + "description": "Comma-separated list of data streams or data stream patterns" + } + } + } + ] + }, + "params": { + "master_timeout": { + "type": "time", + "description": "Period to wait for a connection to the master node" + } + } + } +} diff --git a/specification/_json_spec/indices.put_data_stream_mappings.json b/specification/_json_spec/indices.put_data_stream_mappings.json new file mode 100644 index 0000000000..0f12695346 --- /dev/null +++ b/specification/_json_spec/indices.put_data_stream_mappings.json @@ -0,0 +1,47 @@ +{ + "indices.put_data_stream_mappings": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "description": "Updates a data stream's mappings" + }, + "stability": "stable", + "visibility": "feature_flag", + "feature_flag": "logs_stream", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_data_stream/{name}/_mappings", + "methods": ["PUT"], + "parts": { + "name": { + "type": "string", + "description": "Comma-separated list of data streams or data stream patterns" + } + } + } + ] + }, + "params": { + "dry_run": { + "type": "boolean", + "description": "Whether this request should only be a dry run rather than actually applying mappings", + "default": false + }, + "timeout": { + "type": "time", + "description": "Period to wait for a response" + }, + "master_timeout": { + "type": "time", + "description": "Period to wait for a connection to the master node" + } + }, + "body": { + "description": "The data stream mappings to be updated", + "required": true + } + } +}