From 1f5cf4d414e238f7f25612cd5c34e9514fc43075 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Fri, 16 Jul 2021 10:55:13 +0100 Subject: [PATCH] Add missing X-Pack repositories REST specs (#65548) * Add missing repositories API REST specs A new experimental X-Pack API was added for repositories, but is missing a REST spec. The API was added in #60371 * Move this under the nodes namespace * Rename max_version_to_clear parameter * Update docs URL to use current --- .../api/nodes.clear_metering_archive.json | 33 +++++++++++++++++++ .../api/nodes.get_metering_info.json | 29 ++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/api/nodes.clear_metering_archive.json create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/api/nodes.get_metering_info.json diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.clear_metering_archive.json b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.clear_metering_archive.json new file mode 100644 index 0000000000000..4a7c6e3c0d36c --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.clear_metering_archive.json @@ -0,0 +1,33 @@ +{ + "nodes.clear_metering_archive":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html", + "description":"Removes the archived repositories metering information present in the cluster." + }, + "stability":"experimental", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_nodes/{node_id}/_repositories_metering/{max_archive_version}", + "methods":[ + "DELETE" + ], + "parts":{ + "node_id":{ + "type":"list", + "description":"Comma-separated list of node IDs or names used to limit returned information." + }, + "max_archive_version":{ + "type":"long", + "description":"Specifies the maximum archive_version to be cleared from the archive." + } + } + } + ] + } + } +} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.get_metering_info.json b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.get_metering_info.json new file mode 100644 index 0000000000000..caba879a9a967 --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.get_metering_info.json @@ -0,0 +1,29 @@ +{ + "nodes.get_metering_info":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html", + "description":"Returns cluster repositories metering information." + }, + "stability":"experimental", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_nodes/{node_id}/_repositories_metering", + "methods":[ + "GET" + ], + "parts":{ + "node_id":{ + "type":"list", + "description":"A comma-separated list of node IDs or names to limit the returned information." + } + } + } + ] + } + } +}