diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java index be422450aff..3ea0862a412 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.watcher.rest.action; -import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -23,6 +22,9 @@ import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchRequest; import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchResponse; import org.elasticsearch.xpack.watcher.watch.Watch; +import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.elasticsearch.rest.RestRequest.Method.PUT; + /** * The rest action to ack a watch */ @@ -31,13 +33,26 @@ public class RestAckWatchAction extends WatcherRestHandler { @Inject public RestAckWatchAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/watch/{id}/_ack", this); - controller.registerHandler(RestRequest.Method.POST, URI_BASE + "/watch/{id}/_ack", this); - controller.registerHandler(RestRequest.Method.POST, URI_BASE + "/watch/{id}/_ack/{actions}", this); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/watch/{id}/_ack/{actions}", this); - // these are going to be removed in 6.0 - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/watch/{id}/{actions}/_ack", this); - controller.registerHandler(RestRequest.Method.POST, URI_BASE + "/watch/{id}/{actions}/_ack", this); + // @deprecated Remove deprecations in 6.0 + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/watch/{id}/_ack", this, + POST, "/_watcher/watch/{id}/_ack", deprecationLogger); + controller.registerWithDeprecatedHandler(PUT, URI_BASE + "/watch/{id}/_ack", this, + PUT, "/_watcher/watch/{id}/_ack", deprecationLogger); + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/watch/{id}/_ack/{actions}", this, + POST, "/_watcher/watch/{id}/{actions}/_ack", deprecationLogger); + controller.registerWithDeprecatedHandler(PUT, URI_BASE + "/watch/{id}/_ack/{actions}", this, + PUT, "/_watcher/watch/{id}/{actions}/_ack", deprecationLogger); + + // @deprecated The following can be totally dropped in 6.0 + // Note: we deprecated "/{actions}/_ack" totally; so we don't replace it with a matching _xpack variant + controller.registerAsDeprecatedHandler(POST, "/_watcher/watch/{id}/{actions}/_ack", this, + "[POST /_watcher/watch/{id}/{actions}/_ack] is deprecated! Use " + + "[POST /_xpack/watcher/watch/{id}/_ack/{actions}] instead.", + deprecationLogger); + controller.registerAsDeprecatedHandler(PUT, "/_watcher/watch/{id}/{actions}/_ack", this, + "[PUT /_watcher/watch/{id}/{actions}/_ack] is deprecated! Use " + + "[PUT /_xpack/watcher/watch/{id}/_ack/{actions}] instead.", + deprecationLogger); } @Override diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java index f2d8daddd53..1f706d74bea 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.watcher.rest.action; -import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -23,6 +22,9 @@ import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchR import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchResponse; import org.elasticsearch.xpack.watcher.watch.Watch; +import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.elasticsearch.rest.RestRequest.Method.PUT; + /** * The rest action to de/activate a watch */ @@ -31,11 +33,18 @@ public class RestActivateWatchAction extends WatcherRestHandler { @Inject public RestActivateWatchAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/watch/{id}/_activate", this); - controller.registerHandler(RestRequest.Method.POST, URI_BASE + "/watch/{id}/_activate", this); - DeactivateRestHandler deactivateRestHandler = new DeactivateRestHandler(settings); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/watch/{id}/_deactivate", deactivateRestHandler); - controller.registerHandler(RestRequest.Method.POST, URI_BASE + "/watch/{id}/_deactivate", deactivateRestHandler); + + final DeactivateRestHandler deactivateRestHandler = new DeactivateRestHandler(settings); + + // @deprecated Remove deprecations in 6.0 + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/watch/{id}/_activate", this, + POST, "/_watcher/watch/{id}/_activate", deprecationLogger); + controller.registerWithDeprecatedHandler(PUT, URI_BASE + "/watch/{id}/_activate", this, + PUT, "/_watcher/watch/{id}/_activate", deprecationLogger); + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/watch/{id}/_deactivate", deactivateRestHandler, + POST, "/_watcher/watch/{id}/_deactivate", deprecationLogger); + controller.registerWithDeprecatedHandler(PUT, URI_BASE + "/watch/{id}/_deactivate", deactivateRestHandler, + PUT, "/_watcher/watch/{id}/_deactivate", deprecationLogger); } @Override diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java index e6e62a9b97d..97f0c53172f 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.watcher.rest.action; -import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -32,7 +31,9 @@ public class RestDeleteWatchAction extends WatcherRestHandler { @Inject public RestDeleteWatchAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(DELETE, URI_BASE + "/watch/{id}", this); + // @deprecated Remove deprecations in 6.0 + controller.registerWithDeprecatedHandler(DELETE, URI_BASE + "/watch/{id}", this, + DELETE, "/_watcher/watch/{id}", deprecationLogger); } @Override diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java index 40ec308407d..3d6fd38fbdf 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java @@ -6,7 +6,6 @@ package org.elasticsearch.xpack.watcher.rest.action; import org.elasticsearch.ElasticsearchParseException; -import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.ParseFieldMatcher; import org.elasticsearch.common.inject.Inject; @@ -32,6 +31,8 @@ import org.elasticsearch.xpack.watcher.trigger.TriggerService; import java.io.IOException; +import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.elasticsearch.rest.RestRequest.Method.PUT; import static org.elasticsearch.xpack.watcher.rest.action.RestExecuteWatchAction.Field.IGNORE_CONDITION; import static org.elasticsearch.xpack.watcher.rest.action.RestExecuteWatchAction.Field.RECORD_EXECUTION; @@ -44,11 +45,17 @@ public class RestExecuteWatchAction extends WatcherRestHandler { @Inject public RestExecuteWatchAction(Settings settings, RestController controller, TriggerService triggerService) { super(settings); - controller.registerHandler(RestRequest.Method.POST, URI_BASE + "/watch/{id}/_execute", this); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/watch/{id}/_execute", this); - controller.registerHandler(RestRequest.Method.POST, URI_BASE + "/watch/_execute", this); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/watch/_execute", this); this.triggerService = triggerService; + + // @deprecated Remove deprecations in 6.0 + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/watch/{id}/_execute", this, + POST, "/_watcher/watch/{id}/_execute", deprecationLogger); + controller.registerWithDeprecatedHandler(PUT, URI_BASE + "/watch/{id}/_execute", this, + PUT, "/_watcher/watch/{id}/_execute", deprecationLogger); + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/watch/_execute", this, + POST, "/_watcher/watch/_execute", deprecationLogger); + controller.registerWithDeprecatedHandler(PUT, URI_BASE + "/watch/_execute", this, + PUT, "/_watcher/watch/_execute", deprecationLogger); } @Override diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java index c5034cf55d8..2f5264afb8e 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.watcher.rest.action; -import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -32,7 +31,10 @@ public class RestGetWatchAction extends WatcherRestHandler { @Inject public RestGetWatchAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(GET, URI_BASE + "/watch/{id}", this); + + // @deprecated Remove deprecations in 6.0 + controller.registerWithDeprecatedHandler(GET, URI_BASE + "/watch/{id}", this, + GET, "/_watcher/watch/{id}", deprecationLogger); } @Override diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestHijackOperationAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestHijackOperationAction.java index f86cc83ea2d..e85d2d6a1aa 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestHijackOperationAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestHijackOperationAction.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.watcher.rest.action; -import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -19,29 +18,34 @@ import org.elasticsearch.xpack.watcher.client.WatcherClient; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; import org.elasticsearch.xpack.watcher.watch.WatchStore; +import static org.elasticsearch.rest.RestRequest.Method.DELETE; +import static org.elasticsearch.rest.RestRequest.Method.GET; +import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.elasticsearch.rest.RestRequest.Method.PUT; + /** */ public class RestHijackOperationAction extends WatcherRestHandler { - private static String ALLOW_DIRECT_ACCESS_TO_WATCH_INDEX_SETTING = "xpack.watcher.index.rest.direct_access"; + private static final String ALLOW_DIRECT_ACCESS_TO_WATCH_INDEX_SETTING = "xpack.watcher.index.rest.direct_access"; @Inject public RestHijackOperationAction(Settings settings, RestController controller) { super(settings); if (!settings.getAsBoolean(ALLOW_DIRECT_ACCESS_TO_WATCH_INDEX_SETTING, false)) { WatcherRestHandler unsupportedHandler = new UnsupportedHandler(settings); - controller.registerHandler(RestRequest.Method.POST, WatchStore.INDEX + "/watch", this); - controller.registerHandler(RestRequest.Method.POST, WatchStore.INDEX + "/watch/{id}", this); - controller.registerHandler(RestRequest.Method.PUT, WatchStore.INDEX + "/watch/{id}", this); - controller.registerHandler(RestRequest.Method.POST, WatchStore.INDEX + "/watch/{id}/_update", this); - controller.registerHandler(RestRequest.Method.DELETE, WatchStore.INDEX + "/watch/_query", this); - controller.registerHandler(RestRequest.Method.DELETE, WatchStore.INDEX + "/watch/{id}", this); - controller.registerHandler(RestRequest.Method.GET, WatchStore.INDEX + "/watch/{id}", this); - controller.registerHandler(RestRequest.Method.POST, WatchStore.INDEX + "/watch/_bulk", unsupportedHandler); - controller.registerHandler(RestRequest.Method.POST, WatchStore.INDEX + "/_bulk", unsupportedHandler); - controller.registerHandler(RestRequest.Method.PUT, WatchStore.INDEX + "/watch/_bulk", unsupportedHandler); - controller.registerHandler(RestRequest.Method.PUT, WatchStore.INDEX + "/_bulk", unsupportedHandler); - controller.registerHandler(RestRequest.Method.DELETE, WatchStore.INDEX, unsupportedHandler); + controller.registerHandler(POST, WatchStore.INDEX + "/watch", this); + controller.registerHandler(POST, WatchStore.INDEX + "/watch/{id}", this); + controller.registerHandler(PUT, WatchStore.INDEX + "/watch/{id}", this); + controller.registerHandler(POST, WatchStore.INDEX + "/watch/{id}/_update", this); + controller.registerHandler(DELETE, WatchStore.INDEX + "/watch/_query", this); + controller.registerHandler(DELETE, WatchStore.INDEX + "/watch/{id}", this); + controller.registerHandler(GET, WatchStore.INDEX + "/watch/{id}", this); + controller.registerHandler(POST, WatchStore.INDEX + "/watch/_bulk", unsupportedHandler); + controller.registerHandler(POST, WatchStore.INDEX + "/_bulk", unsupportedHandler); + controller.registerHandler(PUT, WatchStore.INDEX + "/watch/_bulk", unsupportedHandler); + controller.registerHandler(PUT, WatchStore.INDEX + "/_bulk", unsupportedHandler); + controller.registerHandler(DELETE, WatchStore.INDEX, unsupportedHandler); } } @@ -73,4 +77,5 @@ public class RestHijackOperationAction extends WatcherRestHandler { channel.sendResponse(new BytesRestResponse(RestStatus.BAD_REQUEST, jsonBuilder)); } } + } diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java index c36a60eedbd..0d39c69a337 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.watcher.rest.action; -import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -33,8 +32,12 @@ public class RestPutWatchAction extends WatcherRestHandler { @Inject public RestPutWatchAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(POST, URI_BASE + "/watch/{id}", this); - controller.registerHandler(PUT, URI_BASE + "/watch/{id}", this); + + // @deprecated Remove deprecations in 6.0 + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/watch/{id}", this, + POST, "/_watcher/watch/{id}", deprecationLogger); + controller.registerWithDeprecatedHandler(PUT, URI_BASE + "/watch/{id}", this, + PUT, "/_watcher/watch/{id}", deprecationLogger); } @Override diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java index 0d0bc6232a7..9a8593fbaa4 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java @@ -15,6 +15,9 @@ import org.elasticsearch.xpack.watcher.client.WatcherClient; import org.elasticsearch.xpack.watcher.rest.WatcherRestHandler; import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceRequest; +import static org.elasticsearch.rest.RestRequest.Method.POST; +import static org.elasticsearch.rest.RestRequest.Method.PUT; + /** */ public class RestWatchServiceAction extends WatcherRestHandler { @@ -22,9 +25,15 @@ public class RestWatchServiceAction extends WatcherRestHandler { @Inject public RestWatchServiceAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/_restart", this); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/_start", new StartRestHandler(settings)); - controller.registerHandler(RestRequest.Method.PUT, URI_BASE + "/_stop", new StopRestHandler(settings)); + + // @deprecated Remove in 6.0 + // NOTE: we switched from PUT in 2.x to POST in 5.x + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/_restart", this, + PUT, "/_watcher/_restart", deprecationLogger); + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/_start", new StartRestHandler(settings), + PUT, "/_watcher/_start", deprecationLogger); + controller.registerWithDeprecatedHandler(POST, URI_BASE + "/_stop", new StopRestHandler(settings), + PUT, "/_watcher/_stop", deprecationLogger); } @Override diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java index dd36e9461ec..41e3ed57fa7 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.watcher.rest.action; -import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Strings; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; @@ -31,8 +30,12 @@ public class RestWatcherStatsAction extends WatcherRestHandler { @Inject public RestWatcherStatsAction(Settings settings, RestController controller) { super(settings); - controller.registerHandler(GET, URI_BASE + "/stats", this); - controller.registerHandler(GET, URI_BASE + "/stats/{metric}", this); + + // @deprecated Remove deprecations in 6.0 + controller.registerWithDeprecatedHandler(GET, URI_BASE + "/stats", this, + GET, "/_watcher/stats", deprecationLogger); + controller.registerWithDeprecatedHandler(GET, URI_BASE + "/stats/{metric}", this, + GET, "/_watcher/stats/{metric}", deprecationLogger); } @Override diff --git a/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.restart.json b/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.restart.json index 2daf3e4bd99..78ad50a94a8 100644 --- a/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.restart.json +++ b/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.restart.json @@ -1,7 +1,7 @@ { "xpack.watcher.restart": { "documentation": "http://www.elastic.co/guide/en/watcher/current/appendix-api-service.html", - "methods": [ "PUT" ], + "methods": [ "POST" ], "url": { "path": "/_xpack/watcher/_restart", "paths": [ "/_xpack/watcher/_restart" ], diff --git a/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.start.json b/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.start.json index f2b13d16b9e..62105083269 100644 --- a/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.start.json +++ b/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.start.json @@ -1,7 +1,7 @@ { "xpack.watcher.start": { "documentation": "http://www.elastic.co/guide/en/watcher/current/appendix-api-service.html", - "methods": [ "PUT" ], + "methods": [ "POST" ], "url": { "path": "/_xpack/watcher/_start", "paths": [ "/_xpack/watcher/_start" ], diff --git a/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json b/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json index 14636b7936c..89aae2ac43f 100644 --- a/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json +++ b/elasticsearch/x-pack/watcher/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json @@ -1,7 +1,7 @@ { "xpack.watcher.stop": { "documentation": "http://www.elastic.co/guide/en/watcher/current/appendix-api-service.html", - "methods": [ "PUT" ], + "methods": [ "POST" ], "url": { "path": "/_xpack/watcher/_stop", "paths": [ "/_xpack/watcher/_stop" ],