From d2bdd993085f1fd71bf71a2031b4e2322203c219 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Fri, 23 Jun 2017 10:31:00 -0400 Subject: [PATCH] Update upgrade API endpoints (elastic/x-pack-elasticsearch#1724) Switch from /_xpack/_upgrade to /_xpack/migration/assistance and /_xpack/migration/upgrade Original commit: elastic/x-pack-elasticsearch@b15217135cd728b61d6f0429d1c3ee7e887d4fed --- .../xpack/upgrade/rest/RestIndexUpgradeAction.java | 2 +- .../xpack/upgrade/rest/RestIndexUpgradeInfoAction.java | 4 ++-- .../resources/rest-api-spec/api/xpack.upgrade.info.json | 6 +++--- .../src/test/resources/rest-api-spec/api/xpack.upgrade.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugin/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java b/plugin/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java index 8d553cc8454..7678c19ac50 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java @@ -34,7 +34,7 @@ public class RestIndexUpgradeAction extends BaseRestHandler { public RestIndexUpgradeAction(Settings settings, RestController controller, Set extraParameters) { super(settings); - controller.registerHandler(RestRequest.Method.POST, "{index}/_xpack/_upgrade", this); + controller.registerHandler(RestRequest.Method.POST, "_xpack/migration/upgrade/{index}", this); this.extraParameters = extraParameters; } diff --git a/plugin/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java b/plugin/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java index ecafc0664bd..6a900687bc9 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java @@ -26,8 +26,8 @@ public class RestIndexUpgradeInfoAction extends BaseRestHandler { public RestIndexUpgradeInfoAction(Settings settings, RestController controller, Set extraParameters) { super(settings); - controller.registerHandler(RestRequest.Method.GET, "/_xpack/_upgrade", this); - controller.registerHandler(RestRequest.Method.GET, "{index}/_xpack/_upgrade", this); + controller.registerHandler(RestRequest.Method.GET, "/_xpack/migration/assistance", this); + controller.registerHandler(RestRequest.Method.GET, "/_xpack/migration/assistance/{index}", this); this.extraParameters = extraParameters; } diff --git a/plugin/src/test/resources/rest-api-spec/api/xpack.upgrade.info.json b/plugin/src/test/resources/rest-api-spec/api/xpack.upgrade.info.json index 214f35c6d35..8cf2876b985 100644 --- a/plugin/src/test/resources/rest-api-spec/api/xpack.upgrade.info.json +++ b/plugin/src/test/resources/rest-api-spec/api/xpack.upgrade.info.json @@ -2,10 +2,10 @@ "xpack.upgrade.info": { "methods": [ "GET" ], "url": { - "path": "/_xpack/_upgrade", + "path": "/_xpack/migration/assistance", "paths": [ - "/_xpack/_upgrade", - "/{index}/_xpack/_upgrade" + "/_xpack/migration/assistance", + "/_xpack/migration/assistance/{index}" ], "parts": { "index": { diff --git a/plugin/src/test/resources/rest-api-spec/api/xpack.upgrade.json b/plugin/src/test/resources/rest-api-spec/api/xpack.upgrade.json index f703fa7774e..77f2d526d6f 100644 --- a/plugin/src/test/resources/rest-api-spec/api/xpack.upgrade.json +++ b/plugin/src/test/resources/rest-api-spec/api/xpack.upgrade.json @@ -2,9 +2,9 @@ "xpack.upgrade": { "methods": [ "POST" ], "url": { - "path": "/{index}/_xpack/_upgrade", + "path": "/_xpack/migration/upgrade/{index}", "paths": [ - "/{index}/_xpack/_upgrade" + "/_xpack/migration/upgrade/{index}" ], "parts": { "index": {