From e2ba1526c1d3db5268ebd604d2d3df70a7a90099 Mon Sep 17 00:00:00 2001 From: pquentin <42327+pquentin@users.noreply.github.com> Date: Tue, 17 Dec 2024 04:06:50 +0000 Subject: [PATCH] Update rest-api-spec --- output/schema/schema.json | 84 +++++++++++++++++++ output/schema/validation-errors.json | 18 ++++ .../_json_spec/migrate.cancel_reindex.json | 28 +++++++ .../migrate.get_reindex_status.json | 28 +++++++ specification/_json_spec/migrate.reindex.json | 26 ++++++ 5 files changed, 184 insertions(+) create mode 100644 specification/_json_spec/migrate.cancel_reindex.json create mode 100644 specification/_json_spec/migrate.get_reindex_status.json create mode 100644 specification/_json_spec/migrate.reindex.json diff --git a/output/schema/schema.json b/output/schema/schema.json index 43f3e2115d..0d2e9531bd 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -9550,6 +9550,90 @@ } ] }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "private" + } + }, + "description": "This API returns the status of a migration reindex attempt for a data stream or index", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "name": "migrate.cancel_reindex", + "request": null, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_migration/reindex/{index}/_cancel" + } + ] + }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "private" + } + }, + "description": "This API returns the status of a migration reindex attempt for a data stream or index", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "name": "migrate.get_reindex_status", + "request": null, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_migration/reindex/{index}/_status" + } + ] + }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "private" + } + }, + "description": "This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "name": "migrate.reindex", + "request": null, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_migration/reindex" + } + ] + }, { "availability": { "stack": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 18f4b43d11..d4c362fbf4 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -612,6 +612,24 @@ ], "response": [] }, + "migrate.cancel_reindex": { + "request": [ + "Missing request & response" + ], + "response": [] + }, + "migrate.get_reindex_status": { + "request": [ + "Missing request & response" + ], + "response": [] + }, + "migrate.reindex": { + "request": [ + "Missing request & response" + ], + "response": [] + }, "ml.delete_trained_model": { "request": [ "Request: missing json spec query parameter 'timeout'" diff --git a/specification/_json_spec/migrate.cancel_reindex.json b/specification/_json_spec/migrate.cancel_reindex.json new file mode 100644 index 0000000000..660bd47272 --- /dev/null +++ b/specification/_json_spec/migrate.cancel_reindex.json @@ -0,0 +1,28 @@ +{ + "migrate.cancel_reindex": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "description": "This API returns the status of a migration reindex attempt for a data stream or index" + }, + "stability": "experimental", + "visibility": "private", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_migration/reindex/{index}/_cancel", + "methods": ["POST"], + "parts": { + "index": { + "type": "string", + "description": "The index or data stream name" + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/migrate.get_reindex_status.json b/specification/_json_spec/migrate.get_reindex_status.json new file mode 100644 index 0000000000..d5361ff1bb --- /dev/null +++ b/specification/_json_spec/migrate.get_reindex_status.json @@ -0,0 +1,28 @@ +{ + "migrate.get_reindex_status": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "description": "This API returns the status of a migration reindex attempt for a data stream or index" + }, + "stability": "experimental", + "visibility": "private", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_migration/reindex/{index}/_status", + "methods": ["GET"], + "parts": { + "index": { + "type": "string", + "description": "The index or data stream name" + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/migrate.reindex.json b/specification/_json_spec/migrate.reindex.json new file mode 100644 index 0000000000..ae2e6a8f8a --- /dev/null +++ b/specification/_json_spec/migrate.reindex.json @@ -0,0 +1,26 @@ +{ + "migrate.reindex": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "description": "This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task" + }, + "stability": "experimental", + "visibility": "private", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_migration/reindex", + "methods": ["POST"] + } + ] + }, + "body": { + "description": "The body contains the fields `mode` and `source.index, where the only mode currently supported is `upgrade`, and the `source.index` must be a data stream name", + "required": true + } + } +}