瀏覽代碼

Fix #38623 remove xpack namespace REST API (#38625)

* Fix #38623 remove xpack namespace REST API

Except for xpack.usage and xpack.info API's, this moves the last remaining API's out of the xpack namespace

* rename xpack api's inside inside the files as well

* updated yaml tests references to xpack namespaces api's

* update callsApi calls in the IT subclasses

* make sure docs testing does not use xpack namespaced api's

* fix leftover xpack namespaced method names in docs/build.gradle

* found another leftover reference
Martijn Laarman 6 年之前
父節點
當前提交
ccb5d93436
共有 100 個文件被更改,包括 389 次插入389 次删除
  1. 12 12
      docs/build.gradle
  2. 17 17
      x-pack/docs/build.gradle
  3. 2 2
      x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java
  4. 3 3
      x-pack/plugin/ml/qa/ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityUserRoleIT.java
  5. 2 2
      x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java
  6. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/graph.explore.json
  7. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/license.delete.json
  8. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/license.get.json
  9. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_basic_status.json
  10. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_trial_status.json
  11. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/license.post.json
  12. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_basic.json
  13. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_trial.json
  14. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/migration.deprecations.json
  15. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/migration.get_assistance.json
  16. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/migration.upgrade.json
  17. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.delete_job.json
  18. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_jobs.json
  19. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_caps.json
  20. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_index_caps.json
  21. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.put_job.json
  22. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.rollup_search.json
  23. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.start_job.json
  24. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.stop_job.json
  25. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/sql.clear_cursor.json
  26. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/sql.query.json
  27. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/sql.translate.json
  28. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.ack_watch.json
  29. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.activate_watch.json
  30. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.deactivate_watch.json
  31. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.delete_watch.json
  32. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.execute_watch.json
  33. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.get_watch.json
  34. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.put_watch.json
  35. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.start.json
  36. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stats.json
  37. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stop.json
  38. 2 2
      x-pack/plugin/src/test/resources/rest-api-spec/test/deprecation/10_basic.yml
  39. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml
  40. 8 8
      x-pack/plugin/src/test/resources/rest-api-spec/test/license/20_put_license.yml
  41. 11 11
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/delete_job.yml
  42. 7 7
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_jobs.yml
  43. 7 7
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml
  44. 15 15
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml
  45. 8 8
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/put_job.yml
  46. 20 20
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/rollup_search.yml
  47. 6 6
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/security_tests.yml
  48. 4 4
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/start_job.yml
  49. 10 10
      x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/stop_job.yml
  50. 7 7
      x-pack/plugin/src/test/resources/rest-api-spec/test/sql/sql.yml
  51. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/test/sql/translate.yml
  52. 4 4
      x-pack/plugin/src/test/resources/rest-api-spec/test/upgrade/10_basic.yml
  53. 4 4
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml
  54. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yml
  55. 9 9
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/30_reset_ack_after_unmet_condition.yml
  56. 9 9
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/40_reset_ack_after_unmet_action_condition.yml
  57. 9 9
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml
  58. 4 4
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml
  59. 7 7
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml
  60. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/20_transform.yml
  61. 6 6
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/30_throttled.yml
  62. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/40_ignore_condition.yml
  63. 4 4
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/50_action_mode.yml
  64. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/60_http_input.yml
  65. 4 4
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/70_invalid.yml
  66. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml
  67. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yml
  68. 2 2
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/30_with_chain_input.yml
  69. 2 2
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yml
  70. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yml
  71. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yml
  72. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yml
  73. 2 2
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yml
  74. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yml
  75. 13 13
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yml
  76. 8 8
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml
  77. 4 4
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/90_ensure_watch_gets_overwritten_without_version.yml
  78. 2 2
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/91_search_total_hits_as_int.yml
  79. 1 1
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yml
  80. 6 6
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yml
  81. 2 2
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yml
  82. 2 2
      x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/usage/10_basic.yml
  83. 3 3
      x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/15_basic.yml
  84. 7 7
      x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_watcher.yml
  85. 8 8
      x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_watcher.yml
  86. 7 7
      x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_watcher.yml
  87. 4 4
      x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java
  88. 2 2
      x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/10_insufficient_privs.yml
  89. 20 20
      x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/20_test_run_as_execute_watch.yml
  90. 4 4
      x-pack/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/WatcherRestIT.java
  91. 2 2
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/10_webhook.yml
  92. 1 1
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/20_array_access.yml
  93. 1 1
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/25_array_compare.yml
  94. 5 5
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/30_search_input.yml
  95. 3 3
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/40_search_transform.yml
  96. 3 3
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/50_webhook_url_escaping.yml
  97. 6 6
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/10_basic.yml
  98. 2 2
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/20_minimal_body.yml
  99. 1 1
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/30_inline_watch.yml
  100. 3 3
      x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml

+ 12 - 12
docs/build.gradle

@@ -840,7 +840,7 @@ buildRestTests.setups['sensor_prefab_data'] = '''
 '''
 buildRestTests.setups['sample_job'] = '''
   - do:
-      xpack.ml.put_job:
+      ml.put_job:
         job_id: "sample_job"
         body:  >
           {
@@ -894,7 +894,7 @@ buildRestTests.setups['farequote_data'] = buildRestTests.setups['farequote_index
 '''
 buildRestTests.setups['farequote_job'] = buildRestTests.setups['farequote_data'] + '''
   - do:
-      xpack.ml.put_job:
+      ml.put_job:
         job_id: "farequote"
         body:  >
           {
@@ -914,7 +914,7 @@ buildRestTests.setups['farequote_job'] = buildRestTests.setups['farequote_data']
 '''
 buildRestTests.setups['farequote_datafeed'] = buildRestTests.setups['farequote_job'] + '''
   - do:
-      xpack.ml.put_datafeed:
+      ml.put_datafeed:
         datafeed_id: "datafeed-farequote"
         body:  >
           {
@@ -978,7 +978,7 @@ buildRestTests.setups['server_metrics_data'] = buildRestTests.setups['server_met
 '''
 buildRestTests.setups['server_metrics_job'] = buildRestTests.setups['server_metrics_data'] + '''
   - do:
-      xpack.ml.put_job:
+      ml.put_job:
         job_id: "total-requests"
         body:  >
           {
@@ -1000,7 +1000,7 @@ buildRestTests.setups['server_metrics_job'] = buildRestTests.setups['server_metr
 '''
 buildRestTests.setups['server_metrics_datafeed'] = buildRestTests.setups['server_metrics_job'] + '''
   - do:
-      xpack.ml.put_datafeed:
+      ml.put_datafeed:
         datafeed_id: "datafeed-total-requests"
         body:  >
           {
@@ -1010,22 +1010,22 @@ buildRestTests.setups['server_metrics_datafeed'] = buildRestTests.setups['server
 '''
 buildRestTests.setups['server_metrics_openjob'] = buildRestTests.setups['server_metrics_datafeed'] + '''
   - do:
-      xpack.ml.open_job:
+      ml.open_job:
         job_id: "total-requests"
 '''
 buildRestTests.setups['server_metrics_startdf'] = buildRestTests.setups['server_metrics_openjob'] + '''
   - do:
-      xpack.ml.start_datafeed:
+      ml.start_datafeed:
         datafeed_id: "datafeed-total-requests"
 '''
 buildRestTests.setups['calendar_outages'] = '''
   - do:
-        xpack.ml.put_calendar:
+        ml.put_calendar:
           calendar_id: "planned-outages"
 '''
 buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['calendar_outages'] + '''
   - do:
-        xpack.ml.post_calendar_events:
+        ml.post_calendar_events:
           calendar_id: "planned-outages"
           body: >
             { "description": "event 1", "start_time": "2017-12-01T00:00:00Z", "end_time": "2017-12-02T00:00:00Z", "calendar_id": "planned-outages" }
@@ -1034,12 +1034,12 @@ buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['cale
 '''
 buildRestTests.setups['calendar_outages_openjob'] = buildRestTests.setups['server_metrics_openjob'] + '''
   - do:
-       xpack.ml.put_calendar:
+       ml.put_calendar:
          calendar_id: "planned-outages"
 '''
 buildRestTests.setups['calendar_outages_addjob'] = buildRestTests.setups['server_metrics_openjob'] + '''
   - do:
-       xpack.ml.put_calendar:
+       ml.put_calendar:
          calendar_id: "planned-outages"
          body:  >
            {
@@ -1048,7 +1048,7 @@ buildRestTests.setups['calendar_outages_addjob'] = buildRestTests.setups['server
 '''
 buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['calendar_outages_addjob'] + '''
   - do:
-       xpack.ml.post_calendar_events:
+       ml.post_calendar_events:
          calendar_id: "planned-outages"
          body:  >
            { "events" : [

+ 17 - 17
x-pack/docs/build.gradle

@@ -97,7 +97,7 @@ buildRestTests.docs = fileTree(projectDir) {
 Map<String, String> setups = buildRestTests.setups
 setups['my_inactive_watch'] = '''
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         active: false
         body:  >
@@ -216,7 +216,7 @@ setups['library'] = '''
 '''
 setups['sample_job'] = '''
   - do:
-      xpack.ml.put_job:
+      ml.put_job:
         job_id: "sample_job"
         body:  >
           {
@@ -270,7 +270,7 @@ setups['farequote_data'] = setups['farequote_index'] + '''
 '''
 setups['farequote_job'] = setups['farequote_data'] + '''
   - do:
-      xpack.ml.put_job:
+      ml.put_job:
         job_id: "farequote"
         body:  >
           {
@@ -290,7 +290,7 @@ setups['farequote_job'] = setups['farequote_data'] + '''
 '''
 setups['farequote_datafeed'] = setups['farequote_job'] + '''
   - do:
-      xpack.ml.put_datafeed:
+      ml.put_datafeed:
         datafeed_id: "datafeed-farequote"
         body:  >
           {
@@ -300,7 +300,7 @@ setups['farequote_datafeed'] = setups['farequote_job'] + '''
 '''
 setups['ml_filter_safe_domains'] = '''
   - do:
-      xpack.ml.put_filter:
+      ml.put_filter:
         filter_id: "safe_domains"
         body:  >
           {
@@ -364,7 +364,7 @@ setups['server_metrics_data'] = setups['server_metrics_index'] + '''
 '''
 setups['server_metrics_job'] = setups['server_metrics_data'] + '''
   - do:
-      xpack.ml.put_job:
+      ml.put_job:
         job_id: "total-requests"
         body:  >
           {
@@ -386,7 +386,7 @@ setups['server_metrics_job'] = setups['server_metrics_data'] + '''
 '''
 setups['server_metrics_datafeed'] = setups['server_metrics_job'] + '''
   - do:
-      xpack.ml.put_datafeed:
+      ml.put_datafeed:
         datafeed_id: "datafeed-total-requests"
         body:  >
           {
@@ -396,22 +396,22 @@ setups['server_metrics_datafeed'] = setups['server_metrics_job'] + '''
 '''
 setups['server_metrics_openjob'] = setups['server_metrics_datafeed'] + '''
   - do:
-      xpack.ml.open_job:
+      ml.open_job:
         job_id: "total-requests"
 '''
 setups['server_metrics_startdf'] = setups['server_metrics_openjob'] + '''
   - do:
-      xpack.ml.start_datafeed:
+      ml.start_datafeed:
         datafeed_id: "datafeed-total-requests"
 '''
 setups['calendar_outages'] = '''
   - do:
-        xpack.ml.put_calendar:
+        ml.put_calendar:
           calendar_id: "planned-outages"
 '''
 setups['calendar_outages_addevent'] = setups['calendar_outages'] + '''
   - do:
-        xpack.ml.post_calendar_events:
+        ml.post_calendar_events:
           calendar_id: "planned-outages"
           body: >
             { "description": "event 1", "start_time": "2017-12-01T00:00:00Z", "end_time": "2017-12-02T00:00:00Z", "calendar_id": "planned-outages" }
@@ -420,12 +420,12 @@ setups['calendar_outages_addevent'] = setups['calendar_outages'] + '''
 '''
 setups['calendar_outages_openjob'] = setups['server_metrics_openjob'] + '''
   - do:
-       xpack.ml.put_calendar:
+       ml.put_calendar:
          calendar_id: "planned-outages"
 '''
 setups['calendar_outages_addjob'] = setups['server_metrics_openjob'] + '''
   - do:
-       xpack.ml.put_calendar:
+       ml.put_calendar:
          calendar_id: "planned-outages"
          body:  >
            {
@@ -434,7 +434,7 @@ setups['calendar_outages_addjob'] = setups['server_metrics_openjob'] + '''
 '''
 setups['calendar_outages_addevent'] = setups['calendar_outages_addjob'] + '''
   - do:
-       xpack.ml.post_calendar_events:
+       ml.post_calendar_events:
          calendar_id: "planned-outages"
          body:  >
            { "events" : [
@@ -473,7 +473,7 @@ setups['sensor_rollup_job'] = '''
               node:
                 type: keyword
   - do:
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: "sensor"
         body:  >
             {
@@ -541,7 +541,7 @@ setups['sensor_started_rollup_job'] = '''
           {"timestamp": 1516297294000, "temperature": 202, "voltage": 4.0, "node": "c"}
 
   - do:
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: "sensor"
         body:  >
             {
@@ -571,7 +571,7 @@ setups['sensor_started_rollup_job'] = '''
                 ]
             }
   - do:
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: "sensor"
 '''
 

+ 2 - 2
x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java

@@ -79,13 +79,13 @@ public class XDocsClientYamlTestSuiteIT extends XPackRestIT {
         if (isWatcherTest()) {
             assertBusy(() -> {
                 ClientYamlTestResponse response =
-                        getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap());
+                        getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap());
                 String state = (String) response.evaluate("stats.0.watcher_state");
 
                 switch (state) {
                     case "stopped":
                         ClientYamlTestResponse startResponse =
-                                getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap());
+                                getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap());
                         boolean isAcknowledged = (boolean) startResponse.evaluate("acknowledged");
                         assertThat(isAcknowledged, is(true));
                         throw new AssertionError("waiting until stopped state reached started state");

+ 3 - 3
x-pack/plugin/ml/qa/ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityUserRoleIT.java

@@ -35,9 +35,9 @@ public class MlWithSecurityUserRoleIT extends MlWithSecurityIT {
             // role
             for (ExecutableSection section : testCandidate.getTestSection().getExecutableSections()) {
                 if (section instanceof DoSection) {
-                    if (((DoSection) section).getApiCallSection().getApi().startsWith("xpack.ml.") &&
-                            ((DoSection) section).getApiCallSection().getApi().startsWith("xpack.ml.get_") == false &&
-                            ((DoSection) section).getApiCallSection().getApi().equals("xpack.ml.find_file_structure") == false) {
+                    if (((DoSection) section).getApiCallSection().getApi().startsWith("ml.") &&
+                            ((DoSection) section).getApiCallSection().getApi().startsWith("ml.get_") == false &&
+                            ((DoSection) section).getApiCallSection().getApi().equals("ml.find_file_structure") == false) {
                         fail("should have failed because of missing role");
                     }
                 }

+ 2 - 2
x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java

@@ -105,13 +105,13 @@ public class XPackRestIT extends ESClientYamlSuiteTestCase {
         if (isWatcherTest()) {
             assertBusy(() -> {
                 ClientYamlTestResponse response =
-                    getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap());
+                    getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap());
                 String state = (String) response.evaluate("stats.0.watcher_state");
 
                 switch (state) {
                     case "stopped":
                         ClientYamlTestResponse startResponse =
-                            getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap());
+                            getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap());
                         boolean isAcknowledged = (boolean) startResponse.evaluate("acknowledged");
                         assertThat(isAcknowledged, is(true));
                         throw new AssertionError("waiting until stopped state reached started state");

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.graph.explore.json → x-pack/plugin/src/test/resources/rest-api-spec/api/graph.explore.json

@@ -1,5 +1,5 @@
 {
-  "xpack.graph.explore": {
+  "graph.explore": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html",
     "methods": ["GET", "POST"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.delete.json → x-pack/plugin/src/test/resources/rest-api-spec/api/license.delete.json

@@ -1,5 +1,5 @@
 {
-  "xpack.license.delete": {
+  "license.delete": {
     "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html",
     "methods": ["DELETE"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get.json → x-pack/plugin/src/test/resources/rest-api-spec/api/license.get.json

@@ -1,5 +1,5 @@
 {
-  "xpack.license.get": {
+  "license.get": {
     "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html",
     "methods": ["GET"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get_basic_status.json → x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_basic_status.json

@@ -1,5 +1,5 @@
 {
-  "xpack.license.get_basic_status": {
+  "license.get_basic_status": {
     "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html",
     "methods": ["GET"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get_trial_status.json → x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_trial_status.json

@@ -1,5 +1,5 @@
 {
-  "xpack.license.get_trial_status": {
+  "license.get_trial_status": {
     "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html",
     "methods": ["GET"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post.json → x-pack/plugin/src/test/resources/rest-api-spec/api/license.post.json

@@ -1,5 +1,5 @@
 {
-  "xpack.license.post": {
+  "license.post": {
     "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html",
     "methods": ["PUT", "POST"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post_start_basic.json → x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_basic.json

@@ -1,5 +1,5 @@
 {
-  "xpack.license.post_start_basic": {
+  "license.post_start_basic": {
     "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html",
     "methods": ["POST"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post_start_trial.json → x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_trial.json

@@ -1,5 +1,5 @@
 {
-  "xpack.license.post_start_trial": {
+  "license.post_start_trial": {
     "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html",
     "methods": ["POST"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.deprecations.json → x-pack/plugin/src/test/resources/rest-api-spec/api/migration.deprecations.json

@@ -1,5 +1,5 @@
 {
-  "xpack.migration.deprecations": {
+  "migration.deprecations": {
     "documentation": "http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html",
     "methods": [ "GET" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.get_assistance.json → x-pack/plugin/src/test/resources/rest-api-spec/api/migration.get_assistance.json

@@ -1,5 +1,5 @@
 {
-  "xpack.migration.get_assistance": {
+  "migration.get_assistance": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-assistance.html",
     "methods": [ "GET" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.upgrade.json → x-pack/plugin/src/test/resources/rest-api-spec/api/migration.upgrade.json

@@ -1,5 +1,5 @@
 {
-  "xpack.migration.upgrade": {
+  "migration.upgrade": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html",
     "methods": [ "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.delete_job.json → x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.delete_job.json

@@ -1,5 +1,5 @@
 {
-  "xpack.rollup.delete_job": {
+  "rollup.delete_job": {
     "documentation": "",
     "methods": [ "DELETE" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_jobs.json → x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_jobs.json

@@ -1,5 +1,5 @@
 {
-  "xpack.rollup.get_jobs": {
+  "rollup.get_jobs": {
     "documentation": "",
     "methods": [ "GET" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_rollup_caps.json → x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_caps.json

@@ -1,5 +1,5 @@
 {
-  "xpack.rollup.get_rollup_caps": {
+  "rollup.get_rollup_caps": {
     "documentation": "",
     "methods": [ "GET" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_rollup_index_caps.json → x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_index_caps.json

@@ -1,5 +1,5 @@
 {
-  "xpack.rollup.get_rollup_index_caps": {
+  "rollup.get_rollup_index_caps": {
     "documentation": "",
     "methods": [ "GET" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.put_job.json → x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.put_job.json

@@ -1,5 +1,5 @@
 {
-  "xpack.rollup.put_job": {
+  "rollup.put_job": {
     "documentation": "",
     "methods": [ "PUT" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.rollup_search.json → x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.rollup_search.json

@@ -1,5 +1,5 @@
 {
-  "xpack.rollup.rollup_search": {
+  "rollup.rollup_search": {
     "documentation": "",
     "methods": [ "GET", "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.start_job.json → x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.start_job.json

@@ -1,5 +1,5 @@
 {
-  "xpack.rollup.start_job": {
+  "rollup.start_job": {
     "documentation": "",
     "methods": [ "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.stop_job.json → x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.stop_job.json

@@ -1,5 +1,5 @@
 {
-  "xpack.rollup.stop_job": {
+  "rollup.stop_job": {
     "documentation": "",
     "methods": [ "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.clear_cursor.json → x-pack/plugin/src/test/resources/rest-api-spec/api/sql.clear_cursor.json

@@ -1,5 +1,5 @@
 {
-  "xpack.sql.clear_cursor": {
+  "sql.clear_cursor": {
     "documentation": "Clear SQL cursor",
     "methods": [ "POST"],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.query.json → x-pack/plugin/src/test/resources/rest-api-spec/api/sql.query.json

@@ -1,5 +1,5 @@
 {
-    "xpack.sql.query": {
+    "sql.query": {
       "documentation": "Execute SQL",
       "methods": [ "POST", "GET" ],
       "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.translate.json → x-pack/plugin/src/test/resources/rest-api-spec/api/sql.translate.json

@@ -1,5 +1,5 @@
 {
-    "xpack.sql.translate": {
+    "sql.translate": {
       "documentation": "Translate SQL into Elasticsearch queries",
       "methods": [ "POST", "GET" ],
       "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.ack_watch.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.ack_watch.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.ack_watch": {
+  "watcher.ack_watch": {
     "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html",
     "methods": [ "PUT", "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.activate_watch.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.activate_watch.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.activate_watch": {
+  "watcher.activate_watch": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html",
     "methods": [ "PUT", "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.deactivate_watch.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.deactivate_watch.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.deactivate_watch": {
+  "watcher.deactivate_watch": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html",
     "methods": [ "PUT", "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.delete_watch.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.delete_watch.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.delete_watch": {
+  "watcher.delete_watch": {
     "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html",
 
     "methods": [ "DELETE" ],

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.execute_watch.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.execute_watch.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.execute_watch": {
+  "watcher.execute_watch": {
     "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html",
     "methods": [ "PUT", "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.get_watch.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.get_watch.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.get_watch": {
+  "watcher.get_watch": {
     "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html",
     "methods": [ "GET" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.put_watch.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.put_watch.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.put_watch": {
+  "watcher.put_watch": {
     "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html",
     "methods": [ "PUT", "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.start.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.start.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.start": {
+  "watcher.start": {
     "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html",
     "methods": [ "POST" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stats.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stats.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.stats": {
+  "watcher.stats": {
     "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html",
     "methods": [ "GET" ],
     "url": {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json → x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stop.json

@@ -1,5 +1,5 @@
 {
-  "xpack.watcher.stop": {
+  "watcher.stop": {
     "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html",
     "methods": [ "POST" ],
     "url": {

+ 2 - 2
x-pack/plugin/src/test/resources/rest-api-spec/test/deprecation/10_basic.yml

@@ -7,7 +7,7 @@ setup:
 ---
 "Test Deprecations":
   - do:
-      xpack.migration.deprecations:
+      migration.deprecations:
         index: "*"
   - length: { cluster_settings: 0 }
   - length: { node_settings: 0 }
@@ -54,7 +54,7 @@ setup:
   - do:
       warnings:
         - Deprecated field [use_dis_max] used, replaced by [Set [tie_breaker] to 1 instead]
-      xpack.migration.deprecations:
+      migration.deprecations:
         index: "*"
   - length: { ml_settings: 1 }
   - match: { ml_settings.0.level : warning }

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml

@@ -39,7 +39,7 @@ setup:
            wait_for_status: green
 
   - do:
-      xpack.graph.explore:
+      graph.explore:
         index:  test_1
         body:  {"query": {"match": {"keys": 1}},"controls":{"use_significance":false},"vertices":[{"field": "keys","min_doc_count": 1}]}
   - length: {failures: 0}

文件差異過大導致無法顯示
+ 8 - 8
x-pack/plugin/src/test/resources/rest-api-spec/test/license/20_put_license.yml


+ 11 - 11
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/delete_job.yml

@@ -15,7 +15,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -41,7 +41,7 @@ setup:
 "Test basic delete_job":
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
 
   - match:
@@ -80,12 +80,12 @@ setup:
             upgraded_doc_id: true
 
   - do:
-      xpack.rollup.delete_job:
+      rollup.delete_job:
         id: foo
   - is_true: acknowledged
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
   - match:
       jobs: []
@@ -94,7 +94,7 @@ setup:
 "Test delete job twice":
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
 
   - match:
@@ -133,12 +133,12 @@ setup:
             upgraded_doc_id: true
 
   - do:
-      xpack.rollup.delete_job:
+      rollup.delete_job:
         id: foo
   - is_true: acknowledged
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
   - match:
       jobs: []
@@ -147,7 +147,7 @@ setup:
 "Test delete running job":
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
 
   - match:
@@ -186,13 +186,13 @@ setup:
             upgraded_doc_id: true
 
   - do:
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: foo
   - is_true: started
 
   - do:
       catch: request
-      xpack.rollup.delete_job:
+      rollup.delete_job:
         id: foo
   - is_false: acknowledged
   - match: { task_failures.0.reason.type: "illegal_state_exception" }
@@ -205,5 +205,5 @@ setup:
       catch: /the task with id \[does_not_exist\] doesn't exist/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.delete_job:
+      rollup.delete_job:
         id: does_not_exist

+ 7 - 7
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_jobs.yml

@@ -18,7 +18,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -42,7 +42,7 @@ setup:
   - is_true: acknowledged
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
 
   - match:
@@ -83,7 +83,7 @@ setup:
 "Test get with no jobs":
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: "_all"
 
   - length: { jobs: 0 }
@@ -92,7 +92,7 @@ setup:
 "Test get missing job":
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
 
   - match:
@@ -108,7 +108,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -134,7 +134,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: bar
         body:  >
           {
@@ -158,7 +158,7 @@ setup:
   - is_true: acknowledged
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: "_all"
 
   - length: { jobs: 2 }

+ 7 - 7
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml

@@ -36,7 +36,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -62,7 +62,7 @@ setup:
 "Verify one job caps":
 
   - do:
-      xpack.rollup.get_rollup_caps:
+      rollup.get_rollup_caps:
         id: "foo"
 
   - match:
@@ -87,7 +87,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -109,7 +109,7 @@ setup:
             ]
           }
   - do:
-      xpack.rollup.get_rollup_caps:
+      rollup.get_rollup_caps:
         id: "foo"
 
   - match:
@@ -146,7 +146,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -171,7 +171,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo3
         body:  >
           {
@@ -194,7 +194,7 @@ setup:
           }
 
   - do:
-      xpack.rollup.get_rollup_caps:
+      rollup.get_rollup_caps:
         id: "_all"
 
   - match:

+ 15 - 15
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml

@@ -36,7 +36,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -62,7 +62,7 @@ setup:
 "Verify one job caps by rollup index":
 
   - do:
-      xpack.rollup.get_rollup_index_caps:
+      rollup.get_rollup_index_caps:
         index: "foo_rollup"
 
   - match:
@@ -87,7 +87,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -109,7 +109,7 @@ setup:
             ]
           }
   - do:
-      xpack.rollup.get_rollup_index_caps:
+      rollup.get_rollup_index_caps:
         index: "foo_rollup"
 
   - match:
@@ -147,7 +147,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -169,7 +169,7 @@ setup:
             ]
           }
   - do:
-      xpack.rollup.get_rollup_index_caps:
+      rollup.get_rollup_index_caps:
         index: "foo_rollup"
 
   - match:
@@ -194,7 +194,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -218,7 +218,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo3
         body:  >
           {
@@ -241,7 +241,7 @@ setup:
           }
 
   - do:
-      xpack.rollup.get_rollup_index_caps:
+      rollup.get_rollup_index_caps:
         index: "_all"
 
   - match:
@@ -297,7 +297,7 @@ setup:
 - do:
     headers:
       Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-    xpack.rollup.put_job:
+    rollup.put_job:
       id: foo2
       body:  >
         {
@@ -321,7 +321,7 @@ setup:
 - do:
     headers:
       Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-    xpack.rollup.put_job:
+    rollup.put_job:
       id: foo3
       body:  >
         {
@@ -344,7 +344,7 @@ setup:
         }
 
 - do:
-    xpack.rollup.get_rollup_index_caps:
+    rollup.get_rollup_index_caps:
       index: "foo_rollup2,foo_rollup"
 
 - match:
@@ -396,7 +396,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -420,7 +420,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo3
         body:  >
           {
@@ -443,7 +443,7 @@ setup:
           }
 
   - do:
-      xpack.rollup.get_rollup_index_caps:
+      rollup.get_rollup_index_caps:
         index: "*_rollup2"
 
   - match:

+ 8 - 8
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/put_job.yml

@@ -18,7 +18,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -42,7 +42,7 @@ setup:
   - is_true: acknowledged
 
   - do:
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
 
   - match:
@@ -86,7 +86,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -113,7 +113,7 @@ setup:
       catch: /Cannot create rollup job \[foo\] because job was previously created \(existing metadata\)/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -144,7 +144,7 @@ setup:
       catch: /foo/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -174,7 +174,7 @@ setup:
       catch: /unknown field \[headers\], parser not found/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -206,7 +206,7 @@ setup:
       catch: /Could not find a \[numeric\] or \[date\] field with name \[field_doesnt_exist\] in any of the indices matching the index pattern/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -235,7 +235,7 @@ setup:
       catch: /Unsupported metric \[does_not_exist\]/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {

+ 20 - 20
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/rollup_search.yml

@@ -17,7 +17,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -127,7 +127,7 @@ setup:
 "Basic Search":
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         body:
           size: 0
@@ -152,7 +152,7 @@ setup:
 "Formatted Date Histo":
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         body:
           size: 0
@@ -178,7 +178,7 @@ setup:
 "Empty aggregation":
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         rest_total_hits_as_int: true
         index: "foo_rollup"
         body:
@@ -193,7 +193,7 @@ setup:
 "Empty aggregation with new response format":
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         body:
           size: 0
@@ -210,7 +210,7 @@ setup:
 "Search with Metric":
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         body:
           size: 0
@@ -243,7 +243,7 @@ setup:
 "Search with Query":
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         body:
           size: 0
@@ -280,7 +280,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -388,7 +388,7 @@ setup:
 
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         body:
           size: 0
@@ -423,7 +423,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -531,7 +531,7 @@ setup:
 
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         body:
           size: 0
@@ -568,7 +568,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo2
         body:  >
           {
@@ -675,7 +675,7 @@ setup:
             "_rollup.version": 1
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         body:
           size: 0
@@ -710,7 +710,7 @@ setup:
 "Wildcards matching single rollup index":
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup*"
         body:
           size: 0
@@ -750,7 +750,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: bar
         body:  >
           {
@@ -777,7 +777,7 @@ setup:
 
   - do:
       catch: /RollupSearch currently only supports searching one rollup index at a time\./
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "*_rollup"
         body:
           size: 0
@@ -798,7 +798,7 @@ setup:
         name: rollup_alias
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "rollup_alias"
         body:
           size: 0
@@ -838,7 +838,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: bar
         body:  >
           {
@@ -870,7 +870,7 @@ setup:
 
   - do:
        catch: /RollupSearch currently only supports searching one rollup index at a time\./
-       xpack.rollup.rollup_search:
+       rollup.rollup_search:
          index: "rollup_alias"
          body:
            size: 0
@@ -886,7 +886,7 @@ setup:
 "Search with typed_keys":
 
   - do:
-      xpack.rollup.rollup_search:
+      rollup.rollup_search:
         index: "foo_rollup"
         typed_keys: true
         body:

+ 6 - 6
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/security_tests.yml

@@ -89,7 +89,7 @@ teardown:
   # This index pattern will match both indices, but we only have permission to read one
   - do:
       headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -115,7 +115,7 @@ teardown:
 
   - do:
       headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: foo
   - is_true: started
 
@@ -135,7 +135,7 @@ teardown:
 
   - do:
       headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
   - match:
         jobs.0.stats.documents_processed: 1
@@ -250,7 +250,7 @@ teardown:
   # Index contains two docs, but we should only be able to see one of them
   - do:
       headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -275,7 +275,7 @@ teardown:
 
   - do:
       headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: foo
   - is_true: started
 
@@ -295,7 +295,7 @@ teardown:
 
   - do:
       headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
-      xpack.rollup.get_jobs:
+      rollup.get_jobs:
         id: foo
   - match:
         jobs.0.stats.documents_processed: 1

+ 4 - 4
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/start_job.yml

@@ -15,7 +15,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -44,7 +44,7 @@ setup:
       catch: /Task for Rollup Job \[does_not_exist\] not found/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: does_not_exist
 
 
@@ -54,7 +54,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: foo
   - is_true: started
 
@@ -62,6 +62,6 @@ setup:
       catch: /Cannot start task for Rollup Job \[foo\] because state was/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: foo
 

+ 10 - 10
x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/stop_job.yml

@@ -15,7 +15,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.put_job:
+      rollup.put_job:
         id: foo
         body:  >
           {
@@ -44,7 +44,7 @@ setup:
       catch: /Task for Rollup Job \[does_not_exist\] not found/
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.stop_job:
+      rollup.stop_job:
         id: does_not_exist
 
 
@@ -54,21 +54,21 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: foo
   - is_true: started
 
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.stop_job:
+      rollup.stop_job:
         id: foo
   - is_true: stopped
 
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.stop_job:
+      rollup.stop_job:
         id: foo
   - is_true: stopped
 
@@ -78,7 +78,7 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.stop_job:
+      rollup.stop_job:
         id: foo
 
   - is_true: stopped
@@ -92,14 +92,14 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: foo
   - is_true: started
 
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.stop_job:
+      rollup.stop_job:
         id: foo
         wait_for_completion: true
   - is_true: stopped
@@ -113,14 +113,14 @@ setup:
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.start_job:
+      rollup.start_job:
         id: foo
   - is_true: started
 
   - do:
       headers:
         Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
-      xpack.rollup.stop_job:
+      rollup.stop_job:
         id: foo
         wait_for_completion: true
         timeout: "5s"

+ 7 - 7
x-pack/plugin/src/test/resources/rest-api-spec/test/sql/sql.yml

@@ -26,7 +26,7 @@ setup:
 ---
 "Execute some SQL":
   - do:
-      xpack.sql.query:
+      sql.query:
         format: json
         body:
           query: "SELECT * FROM test ORDER BY int asc"
@@ -42,7 +42,7 @@ setup:
 ---
 "Paging through results":
   - do:
-      xpack.sql.query:
+      sql.query:
         format: json
         body:
           query: "SELECT * FROM test ORDER BY int asc"
@@ -57,7 +57,7 @@ setup:
   - set: { cursor: cursor }
 
   - do:
-      xpack.sql.query:
+      sql.query:
         format: json
         body:
           cursor: "$cursor"
@@ -68,7 +68,7 @@ setup:
   - set: { cursor: cursor }
 
   - do:
-      xpack.sql.query:
+      sql.query:
         format: json
         body:
           cursor: "$cursor"
@@ -79,7 +79,7 @@ setup:
 ---
 "Getting textual representation":
   - do:
-      xpack.sql.query:
+      sql.query:
         format: txt
         body:
           query: "SELECT * FROM test ORDER BY int asc"
@@ -95,7 +95,7 @@ setup:
 ---
 "Clean cursor":
   - do:
-      xpack.sql.query:
+      sql.query:
         format: json
         body:
           query: "SELECT * FROM test ORDER BY int asc"
@@ -108,7 +108,7 @@ setup:
   - set: { cursor: cursor}
 
   - do:
-      xpack.sql.clear_cursor:
+      sql.clear_cursor:
         body:
           cursor: "$cursor"
   - match: { "succeeded": true }

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/test/sql/translate.yml

@@ -16,7 +16,7 @@
             int: 1
 
   - do:
-      xpack.sql.translate:
+      sql.translate:
         body:
           query: "SELECT * FROM test ORDER BY int asc"
   - match:

+ 4 - 4
x-pack/plugin/src/test/resources/rest-api-spec/test/upgrade/10_basic.yml

@@ -1,7 +1,7 @@
 ---
 setup:
   - do:
-      xpack.license.post:
+      license.post:
         body: >
           {
             "license": {
@@ -27,7 +27,7 @@ setup:
 ---
 "Upgrade info - all":
   - do:
-      xpack.migration.get_assistance: { index: _all }
+      migration.get_assistance: { index: _all }
 
   - length: { indices: 0 }
 
@@ -35,13 +35,13 @@ setup:
 "Upgrade test - should fail as index is already up to date":
   - do:
       catch: /illegal_state_exception/
-      xpack.migration.upgrade: { index: test1 }
+      migration.upgrade: { index: test1 }
 
 ---
 "Upgrade test - wait_for_completion:false":
 
   - do:
-      xpack.migration.upgrade:
+      migration.upgrade:
         index: test1
         wait_for_completion: false
 

+ 4 - 4
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml

@@ -5,7 +5,7 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -38,7 +38,7 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.ack_watch:
+      watcher.ack_watch:
         watch_id: "my_watch"
 
   - match: { "status.actions.test_index.ack.state" : "awaits_successful_execution" }
@@ -52,7 +52,7 @@
   - match: { hits.hits.0._source.status.actions.test_index.ack.state: "awaits_successful_execution" }
 
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
 
   - match: { found: true }
@@ -63,6 +63,6 @@
       cluster.health:
           wait_for_status: yellow
   - do:
-      xpack.watcher.ack_watch:
+      watcher.ack_watch:
         watch_id: "non-existent-watch"
       catch: missing

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yml

@@ -5,7 +5,7 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -38,14 +38,14 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.ack_watch:
+      watcher.ack_watch:
         watch_id: "my_watch"
         action_id: "test_index"
 
   - match: { "status.actions.test_index.ack.state" : "awaits_successful_execution" }
 
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
 
   - match: { found: true }

+ 9 - 9
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/30_reset_ack_after_unmet_condition.yml

@@ -7,7 +7,7 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
         ignore: 404
 
@@ -15,7 +15,7 @@ teardown:
 "Ensure that ack status is reset after unsuccessful execution":
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body: >
           {
@@ -45,7 +45,7 @@ teardown:
           }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body: >
           {
@@ -54,18 +54,18 @@ teardown:
   - match: { watch_record.status.actions.indexme.ack.state: "ackable" }
 
   - do:
-      xpack.watcher.ack_watch:
+      watcher.ack_watch:
         watch_id: "my_watch"
   - match: { "status.actions.indexme.ack.state" : "acked" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { "status.actions.indexme.ack.state" : "acked" }
 
   # having a false result will reset the ack state
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body: >
           {
@@ -80,12 +80,12 @@ teardown:
   - match: { watch_record.status.actions.indexme.ack.state: "awaits_successful_execution" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { "status.actions.indexme.ack.state" : "awaits_successful_execution" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body: >
           {
@@ -97,7 +97,7 @@ teardown:
   - match: { watch_record.status.actions.indexme.ack.state: "ackable" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { "status.actions.indexme.ack.state" : "ackable" }
 

+ 9 - 9
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/40_reset_ack_after_unmet_action_condition.yml

@@ -7,7 +7,7 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
         ignore: 404
 
@@ -15,7 +15,7 @@ teardown:
 "Ensure that ack status is reset after unmet action condition":
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body: >
           {
@@ -45,7 +45,7 @@ teardown:
           }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body: >
           {
@@ -54,18 +54,18 @@ teardown:
   - match: { watch_record.status.actions.indexme.ack.state: "ackable" }
 
   - do:
-      xpack.watcher.ack_watch:
+      watcher.ack_watch:
         watch_id: "my_watch"
   - match: { "status.actions.indexme.ack.state" : "acked" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { "status.actions.indexme.ack.state" : "acked" }
 
   # having a false result will reset the ack state
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body: >
           {
@@ -80,12 +80,12 @@ teardown:
   - match: { watch_record.status.actions.indexme.ack.state: "awaits_successful_execution" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { "status.actions.indexme.ack.state" : "awaits_successful_execution" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body: >
           {
@@ -97,7 +97,7 @@ teardown:
   - match: { watch_record.status.actions.indexme.ack.state: "ackable" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { "status.actions.indexme.ack.state" : "ackable" }
 

+ 9 - 9
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml

@@ -5,7 +5,7 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -34,7 +34,7 @@
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
 
   - match: { found : true}
@@ -42,7 +42,7 @@
   - match: { status.state.active: true }
 
   - do:
-      xpack.watcher.deactivate_watch:
+      watcher.deactivate_watch:
         watch_id: "my_watch"
 
   - match: { status.state.active : false }
@@ -56,14 +56,14 @@
   - match: { hits.hits.0._source.status.state.active: false }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
   - match: { status.state.active: false }
 
   - do:
-      xpack.watcher.activate_watch:
+      watcher.activate_watch:
         watch_id: "my_watch"
 
   - match: { status.state.active : true }
@@ -77,7 +77,7 @@
   - match: { hits.hits.0._source.status.state.active: true }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
 
   - match: { found : true}
@@ -85,7 +85,7 @@
   - match: { status.state.active: true }
 
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
 
   - match: { found: true }
@@ -97,11 +97,11 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.activate_watch:
+      watcher.activate_watch:
         watch_id: "non-existent-watch"
       catch: missing
 
   - do:
-      xpack.watcher.deactivate_watch:
+      watcher.deactivate_watch:
         watch_id: "non-existent-watch"
       catch: missing

+ 4 - 4
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
         ignore: 404
 
 ---
 "Test delete watch api":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  > 
           {
@@ -47,7 +47,7 @@ teardown:
   - match: { created: true }
 
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
   - match: { found: true }
 
@@ -61,6 +61,6 @@ teardown:
 ---
 "Non existent watch returns 404":
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "non-existent-watch"
       catch: missing

+ 7 - 7
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "test_watch"
         ignore: 404
 
 ---
 "Test execute watch api with configured trigger data timestamps":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "test_watch"
         body:  >
           {
@@ -42,7 +42,7 @@ teardown:
   - match: { created: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "test_watch"
         body: >
           {
@@ -67,7 +67,7 @@ teardown:
 "Test execute watch API with user supplied watch":
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "watch" : {
@@ -104,7 +104,7 @@ teardown:
 "Execute unknown watch results in 404":
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "non-existent-watch"
       catch: missing
 
@@ -112,7 +112,7 @@ teardown:
 "Test execute watch with alternative input":
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "test_watch"
         body:  >
           {
@@ -138,7 +138,7 @@ teardown:
   - match: { created: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "test_watch"
         body: >
           {

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/20_transform.yml

@@ -17,7 +17,7 @@ setup:
           }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "watch" : {
@@ -87,7 +87,7 @@ setup:
           }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "watch" : {
@@ -146,7 +146,7 @@ setup:
         index: my_test_index
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "watch" : {

+ 6 - 6
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/30_throttled.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "test_watch"
         ignore: 404
 
 ---
 "Test execute watch api works with throttling":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "test_watch"
         body:  >
           {
@@ -41,7 +41,7 @@ teardown:
   - match: { created: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "test_watch"
         body: >
           {
@@ -60,7 +60,7 @@ teardown:
   - match: { watch_record.status.state.active: true }
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "test_watch"
         body:  >
           {
@@ -87,7 +87,7 @@ teardown:
   - match: { _id: "test_watch" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "test_watch"
         body: >
           {
@@ -103,7 +103,7 @@ teardown:
   - match: { watch_record.status.execution_state: "executed" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "test_watch"
         body: >
           {

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/40_ignore_condition.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "test_watch"
         ignore: 404
 
 ---
 "Test execute watch api can ignore conditions":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "test_watch"
         body:  >
           {
@@ -41,7 +41,7 @@ teardown:
   - match: { created: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "test_watch"
         body: >
           {

+ 4 - 4
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/50_action_mode.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "test_watch"
         ignore: 404
 
 ---
 "Test execute watch api supports action modes":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "test_watch"
         body:  >
           {
@@ -38,7 +38,7 @@ teardown:
   - match: { created: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "test_watch"
         body: >
           {
@@ -55,7 +55,7 @@ teardown:
   - match: { watch_record.result.actions.0.status: "simulated" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "test_watch"
         body: >
           {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/60_http_input.yml

@@ -17,7 +17,7 @@ setup:
   - set: { nodes.$master.http.publish_address: http_host }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "watch" : {

+ 4 - 4
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/70_invalid.yml

@@ -2,7 +2,7 @@
 "Test execute watch api returns proper error message with watch directly in the body":
   - do:
       catch: /please wrap watch including field \[trigger\] inside a \"watch\" field/
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "trigger": {
@@ -11,7 +11,7 @@
           }
   - do:
       catch: /please wrap watch including field \[input\] inside a \"watch\" field/
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "input": {
@@ -22,7 +22,7 @@
           }
   - do:
       catch: /please wrap watch including field \[condition\] inside a \"watch\" field/
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "condition": {
@@ -31,7 +31,7 @@
           }
   - do:
       catch: /please wrap watch including field \[actions\] inside a \"watch\" field/
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "actions": {

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
         ignore: 404
 
 ---
 "Test get watch api":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -54,7 +54,7 @@ teardown:
   - match: { hits.total: 1 }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yml

@@ -6,7 +6,7 @@
 
   # ensure index exists by creating a different watch
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "other"
         body:  >
           {
@@ -38,7 +38,7 @@
 
   - do:
       catch: missing
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "missing_watch"
   - match: { found : false}
   - match: { _id: "missing_watch" }
@@ -56,7 +56,7 @@
 
   - do:
       catch: missing
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "missing_watch"
   - match: { found : false}
   - match: { _id: "missing_watch" }

+ 2 - 2
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/30_with_chain_input.yml

@@ -5,7 +5,7 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -45,7 +45,7 @@
           }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }

+ 2 - 2
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yml

@@ -5,7 +5,7 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  > 
           {
@@ -44,7 +44,7 @@
 
   - do:
       catch: bad_request
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
   - match: { error.root_cause.0.type: "action_request_validation_exception" }
   - match: { error.root_cause.0.reason: "Validation Failed: 1: request body is missing;" }

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch1"
         ignore: 404
 
 ---
 "Test put watch api with watch level throttle":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch1"
         body:  >
           {
@@ -47,7 +47,7 @@ teardown:
   - match: { _id: "my_watch1" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch1"
   - match: { found : true}
   - match: { _id: "my_watch1" }

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch1"
         ignore: 404
 
 ---
 "Test put watch api with action level throttle period":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch1"
         body:  >
           {
@@ -47,7 +47,7 @@ teardown:
   - match: { _id: "my_watch1" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch1"
   - match: { found : true}
   - match: { _id: "my_watch1" }

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
         ignore: 404
 
 ---
 "Test put inactive watch":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         active: false
         body:  >
@@ -47,7 +47,7 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
 
   - match: { found : true }

+ 2 - 2
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yml

@@ -6,7 +6,7 @@
 
   - do:
       catch: /Configured URL is empty/
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -45,7 +45,7 @@
 
   - do:
       catch: /Malformed URL/
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch1"
         ignore: 404
 
 ---
 "Test put watch api with action level condition":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch1"
         body:  >
           {
@@ -51,7 +51,7 @@ teardown:
   - match: { _id: "my_watch1" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch1"
   - match: { found : true }
   - match: { _id: "my_watch1" }

+ 13 - 13
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yml

@@ -7,14 +7,14 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
         ignore: 404
 
 ---
 "Test put watch api with index action using doc_id":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -45,7 +45,7 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true }
   - match: { _id: "my_watch" }
@@ -53,7 +53,7 @@ teardown:
   - match: { watch.actions.test_index.index.doc_id: "test_id1" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.state: "executed" }
   - match: { watch_record.status.execution_state: "executed" }
@@ -62,7 +62,7 @@ teardown:
 ---
 "Test put watch api with index action using _id field":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -93,7 +93,7 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true }
   - match: { _id: "my_watch" }
@@ -101,7 +101,7 @@ teardown:
   - match: { watch.input.simple.value: 20 }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.state: "executed" }
   - match: { watch_record.status.execution_state: "executed" }
@@ -110,7 +110,7 @@ teardown:
 ---
 "Test put watch api with bulk index action using _id field":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -149,7 +149,7 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true }
   - match: { _id: "my_watch" }
@@ -159,7 +159,7 @@ teardown:
   - match: { watch.input.simple._doc.1.value: 40 }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.state: "executed" }
   - match: { watch_record.status.execution_state: "executed" }
@@ -169,7 +169,7 @@ teardown:
 ---
 "Test put watch api with bulk index action using _id field in one document":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -207,7 +207,7 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true }
   - match: { _id: "my_watch" }
@@ -216,7 +216,7 @@ teardown:
   - match: { watch.input.simple._doc.1.value: 60 }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.state: "executed" }
   - match: { watch_record.status.execution_state: "executed" }

+ 8 - 8
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml

@@ -8,7 +8,7 @@ setup:
 "Test getting a watch does not contain the original password":
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "watch_with_password"
         body:  >
           {
@@ -40,7 +40,7 @@ setup:
           }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "watch_with_password"
   - match: { _id: "watch_with_password" }
   - match: { watch.input.http.request.auth.basic.password: "::es_redacted::" }
@@ -50,7 +50,7 @@ setup:
 
   # version 1
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "watch_without_version_test"
         body:  >
           {
@@ -83,7 +83,7 @@ setup:
 
   - do:
       catch: bad_request
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "watch_without_version_test"
         body:  >
           {
@@ -123,7 +123,7 @@ setup:
 
   # version 1
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "watch_with_seq_no"
         body:  >
           {
@@ -161,7 +161,7 @@ setup:
   # as if two users in the watch UI tried to update the same watch
   - do:
       catch: conflict
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "watch_with_seq_no"
         if_seq_no: 123034
         if_primary_term: $primaryTerm
@@ -196,7 +196,7 @@ setup:
 
   - do:
       catch: conflict
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "watch_with_seq_no"
         if_seq_no: $seqNo
         if_primary_term: 234242423
@@ -230,7 +230,7 @@ setup:
           }
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "watch_with_seq_no"
         if_seq_no: $seqNo
         if_primary_term: $primaryTerm

+ 4 - 4
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/90_ensure_watch_gets_overwritten_without_version.yml

@@ -5,7 +5,7 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  > 
           {
@@ -32,14 +32,14 @@
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { watch.input.simple.foo: "bar" } 
 
   # change the simple input fields, then ensure the old
   # field does not exist on get
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  > 
           {
@@ -66,7 +66,7 @@
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { watch.input.simple.spam: "eggs" } 
   - is_false: watch.input.simple.foo

+ 2 - 2
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/91_search_total_hits_as_int.yml

@@ -18,7 +18,7 @@ setup:
 "Test search input includes hits by default":
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "watch" : {
@@ -61,7 +61,7 @@ setup:
 "Test search transform includes hits by default":
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "watch" : {

+ 1 - 1
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yml

@@ -4,5 +4,5 @@
       cluster.health:
           wait_for_status: yellow
 
-  - do: {xpack.watcher.start: {}}
+  - do: {watcher.start: {}}
   - match: { acknowledged: true }

+ 6 - 6
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yml

@@ -1,13 +1,13 @@
 ---
 "Test watcher stats output":
-  - do: {xpack.watcher.stats: {}}
+  - do: {watcher.stats: {}}
   - match: { "manually_stopped": false }
   - match: { "stats.0.watcher_state": "started" }
 
 ---
 "Test watcher stats supports emit_stacktraces parameter":
   - do:
-      xpack.watcher.stats:
+      watcher.stats:
         metric: "all"
         emit_stacktraces: "true"
   - match: { "manually_stopped": false }
@@ -20,7 +20,7 @@
       reason:  metrics were fixed in 7.0.0
 
   - do:
-      xpack.watcher.stats:
+      watcher.stats:
         metric: "current_watches"
 
   - is_false: stats.0.queued_watches
@@ -33,7 +33,7 @@
       reason:  metrics were fixed in 7.0.0
 
   - do:
-      xpack.watcher.stats:
+      watcher.stats:
         metric: "queued_watches"
 
   - is_false: stats.0.current_watches
@@ -50,7 +50,7 @@
       warnings:
         - 'The pending_watches parameter is deprecated, use queued_watches instead'
 
-      xpack.watcher.stats:
+      watcher.stats:
         metric: "pending_watches"
 
   - is_false: stats.0.current_watches
@@ -59,7 +59,7 @@
 ---
 "Test watcher stats all watches":
   - do:
-      xpack.watcher.stats:
+      watcher.stats:
         metric: "_all"
 
   - is_true: stats.0.current_watches

+ 2 - 2
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yml

@@ -4,8 +4,8 @@
       cluster.health:
           wait_for_status: yellow
 
-  - do: {xpack.watcher.stop: {}}
+  - do: {watcher.stop: {}}
   - match: { acknowledged: true }
 
-  - do: {xpack.watcher.start: {}}
+  - do: {watcher.start: {}}
   - match: { acknowledged: true }

+ 2 - 2
x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/usage/10_basic.yml

@@ -2,7 +2,7 @@
 "Test watcher usage stats output":
   - do:
       catch: missing
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "usage_stats_watch"
 
   - do: {xpack.usage: {}}
@@ -10,7 +10,7 @@
   - set: { "watcher.count.total": watch_count_total }
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "usage_stats_watch"
         body:  >
           {

+ 3 - 3
x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/15_basic.yml

@@ -7,7 +7,7 @@
         wait_for_status: yellow
 
   - do:
-      xpack.license.delete: {}
+      license.delete: {}
   - match: { acknowledged: true }
 
   # we don't have a license now
@@ -30,7 +30,7 @@
 #  - is_false:   features.monitoring.available  TODO fix once licensing is fixed
 
   - do:
-      xpack.license.post:
+      license.post:
         body: >
           {
             "license": {
@@ -49,7 +49,7 @@
   - match: { license_status:  "valid" }
 
   - do:
-      xpack.license.get: {}
+      license.get: {}
   - match: { license.uid: "893361dc-9749-4997-93cb-802e3dofh7aa" }
   - match: { license.type: "internal" }
   - match: { license.status: "active" }

+ 7 - 7
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_watcher.yml

@@ -3,7 +3,7 @@
 
   # no need to put watch, exists already
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -11,7 +11,7 @@
 
   # execute watch
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body:  >
           {
@@ -41,12 +41,12 @@
 
   # deactivate watch, check with GET API as well
   - do:
-      xpack.watcher.deactivate_watch:
+      watcher.deactivate_watch:
         watch_id: "my_watch"
   - match: { status.state.active : false }
   
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -55,12 +55,12 @@
 
   # activate watch again, check with GET API as well
   - do:
-      xpack.watcher.activate_watch:
+      watcher.activate_watch:
         watch_id: "my_watch"
   - match: { status.state.active : true }
   
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -70,6 +70,6 @@
 ---
 "Test watcher stats output":
   - do:
-      xpack.watcher.stats: {}
+      watcher.stats: {}
   - match: { "manually_stopped": false }
   - match: { "stats.0.watcher_state": "started" }

+ 8 - 8
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_watcher.yml

@@ -2,7 +2,7 @@
 "CRUD watch APIs":
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -23,7 +23,7 @@
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -31,7 +31,7 @@
 
   # execute watch
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body:  >
           {
@@ -61,12 +61,12 @@
 
   # deactivate watch, check with GET API as well
   - do:
-      xpack.watcher.deactivate_watch:
+      watcher.deactivate_watch:
         watch_id: "my_watch"
   - match: { status.state.active : false }
   
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -75,12 +75,12 @@
 
   # activate watch again, check with GET API as well
   - do:
-      xpack.watcher.activate_watch:
+      watcher.activate_watch:
         watch_id: "my_watch"
   - match: { status.state.active : true }
   
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -90,6 +90,6 @@
 ---
 "Test watcher stats output":
   - do:
-      xpack.watcher.stats: {}
+      watcher.stats: {}
   - match: { "manually_stopped": false }
   - match: { "stats.0.watcher_state": "started" }

+ 7 - 7
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_watcher.yml

@@ -3,7 +3,7 @@
 
   # no need to put watch, exists already
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -11,7 +11,7 @@
 
   # execute watch
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
         body:  >
           {
@@ -41,12 +41,12 @@
 
   # deactivate watch, check with GET API as well
   - do:
-      xpack.watcher.deactivate_watch:
+      watcher.deactivate_watch:
         watch_id: "my_watch"
   - match: { status.state.active : false }
   
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -55,12 +55,12 @@
 
   # activate watch again, check with GET API as well
   - do:
-      xpack.watcher.activate_watch:
+      watcher.activate_watch:
         watch_id: "my_watch"
   - match: { status.state.active : true }
   
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { found : true}
   - match: { _id: "my_watch" }
@@ -69,6 +69,6 @@
 ---
 "Test watcher stats output":
   - do:
-      xpack.watcher.stats: {}
+      watcher.stats: {}
   - match: { "manually_stopped": false }
   - match: { "stats.0.watcher_state": "started" }

+ 4 - 4
x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java

@@ -53,13 +53,13 @@ public class SmokeTestWatcherWithSecurityClientYamlTestSuiteIT extends ESClientY
 
         assertBusy(() -> {
             ClientYamlTestResponse response =
-                    getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap());
+                    getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap());
             String state = (String) response.evaluate("stats.0.watcher_state");
 
             switch (state) {
                 case "stopped":
                     ClientYamlTestResponse startResponse =
-                            getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap());
+                            getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap());
                     boolean isAcknowledged = (boolean) startResponse.evaluate("acknowledged");
                     assertThat(isAcknowledged, is(true));
                     throw new AssertionError("waiting until stopped state reached started state");
@@ -88,7 +88,7 @@ public class SmokeTestWatcherWithSecurityClientYamlTestSuiteIT extends ESClientY
     public void stopWatcher() throws Exception {
         assertBusy(() -> {
             ClientYamlTestResponse response =
-                    getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap());
+                    getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap());
             String state = (String) response.evaluate("stats.0.watcher_state");
 
             switch (state) {
@@ -101,7 +101,7 @@ public class SmokeTestWatcherWithSecurityClientYamlTestSuiteIT extends ESClientY
                     throw new AssertionError("waiting until starting state reached started state to stop");
                 case "started":
                     ClientYamlTestResponse stopResponse =
-                            getAdminExecutionContext().callApi("xpack.watcher.stop", emptyMap(), emptyList(), emptyMap());
+                            getAdminExecutionContext().callApi("watcher.stop", emptyMap(), emptyList(), emptyMap());
                     boolean isAcknowledged = (boolean) stopResponse.evaluate("acknowledged");
                     assertThat(isAcknowledged, is(true));
                     throw new AssertionError("waiting until started state reached stopped state");

+ 2 - 2
x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/10_insufficient_privs.yml

@@ -5,10 +5,10 @@
   - do:
       headers: { es-security-runas-user: powerless_user }
       catch: forbidden
-      xpack.watcher.stats: {}
+      watcher.stats: {}
   # there seems to be a bug in the yaml parser we use, where a single element list
   # has the END_LIST token skipped...so here we just rerun the same request without
   # the impersonation to show it works
   - do:
-      xpack.watcher.stats: {}
+      watcher.stats: {}
   - match: { stats.0.watcher_state: started }

+ 20 - 20
x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/20_test_run_as_execute_watch.yml

@@ -18,7 +18,7 @@ setup:
 ---
 teardown:
   - do:
-      xpack.watcher.delete_watch:
+      watcher.delete_watch:
         id: "my_watch"
         ignore: 404
 
@@ -27,7 +27,7 @@ teardown:
   - skip:
       features: headers
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -63,13 +63,13 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { _id: "my_watch" }
   - is_false: watch.status.headers
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.watch_id: "my_watch" }
   - match: { watch_record.state: "executed" }
@@ -83,7 +83,7 @@ teardown:
   - skip:
       features: headers
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -119,14 +119,14 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { _id: "my_watch" }
   - is_false: watch.status.headers
 
   - do:
       headers: { es-security-runas-user: x_pack_rest_user }
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.watch_id: "my_watch" }
   - match: { watch_record.state: "executed" }
@@ -140,7 +140,7 @@ teardown:
   - do:
       # by impersonating this request as powerless user we cannot query the my_test_index
       # headers: { es-security-runas-user: powerless_user }
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -176,13 +176,13 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { _id: "my_watch" }
   - is_false: watch.status.headers
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.watch_id: "my_watch" }
   # because we are not allowed to read the index, there wont be any data
@@ -193,7 +193,7 @@ teardown:
 ---
 "Test watch search transform is run as user who added the watch":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -227,7 +227,7 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.watch_id: "my_watch" }
 
@@ -242,7 +242,7 @@ teardown:
 ---
 "Test watch search transform does not work without permissions":
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -277,7 +277,7 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.watch_id: "my_watch" }
 
@@ -294,7 +294,7 @@ teardown:
   - skip:
       features: headers
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -318,13 +318,13 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { _id: "my_watch" }
   - is_false: watch.status.headers
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.watch_id: "my_watch" }
   - match: { watch_record.state: "executed" }
@@ -343,7 +343,7 @@ teardown:
   - skip:
       features: headers
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_watch"
         body:  >
           {
@@ -367,13 +367,13 @@ teardown:
   - match: { _id: "my_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_watch"
   - match: { _id: "my_watch" }
   - is_false: watch.status.headers
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_watch"
   - match: { watch_record.watch_id: "my_watch" }
   - match: { watch_record.state: "executed" }

+ 4 - 4
x-pack/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/WatcherRestIT.java

@@ -35,13 +35,13 @@ public class WatcherRestIT extends ESClientYamlSuiteTestCase {
     public void startWatcher() throws Exception {
         assertBusy(() -> {
             ClientYamlTestResponse response =
-                getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap());
+                getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap());
             String state = (String) response.evaluate("stats.0.watcher_state");
 
             switch (state) {
                 case "stopped":
                     ClientYamlTestResponse startResponse =
-                        getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap());
+                        getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap());
                     boolean isAcknowledged = (boolean) startResponse.evaluate("acknowledged");
                     assertThat(isAcknowledged, is(true));
                     throw new AssertionError("waiting until stopped state reached started state");
@@ -70,7 +70,7 @@ public class WatcherRestIT extends ESClientYamlSuiteTestCase {
     public void stopWatcher() throws Exception {
         assertBusy(() -> {
             ClientYamlTestResponse response =
-                getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap());
+                getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap());
             String state = (String) response.evaluate("stats.0.watcher_state");
 
             switch (state) {
@@ -83,7 +83,7 @@ public class WatcherRestIT extends ESClientYamlSuiteTestCase {
                     throw new AssertionError("waiting until starting state reached started state to stop");
                 case "started":
                     ClientYamlTestResponse stopResponse =
-                        getAdminExecutionContext().callApi("xpack.watcher.stop", emptyMap(), emptyList(), emptyMap());
+                        getAdminExecutionContext().callApi("watcher.stop", emptyMap(), emptyList(), emptyMap());
                     boolean isAcknowledged = (boolean) stopResponse.evaluate("acknowledged");
                     assertThat(isAcknowledged, is(true));
                     throw new AssertionError("waiting until started state reached stopped state");

+ 2 - 2
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/10_webhook.yml

@@ -26,7 +26,7 @@
   - set: { docs.0.doc._source.port: port }
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "test_watch"
         body:
           trigger:
@@ -53,7 +53,7 @@
   - match: { created: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: test_watch
         body:
           record_execution: true

+ 1 - 1
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/20_array_access.yml

@@ -5,7 +5,7 @@
           wait_for_status: yellow
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "watch": {

+ 1 - 1
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/25_array_compare.yml

@@ -36,7 +36,7 @@
       indices.refresh: {}
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "watch" : {

+ 5 - 5
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/30_search_input.yml

@@ -3,7 +3,7 @@ setup:
   - do:
       cluster.health:
           wait_for_status: yellow
-  - do: {xpack.watcher.stats:{}}
+  - do: {watcher.stats:{}}
   - do:
       index:
         index: idx
@@ -51,7 +51,7 @@ setup:
 ---
 "Test search input mustache integration (using request body)":
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "trigger_data" : {
@@ -126,7 +126,7 @@ setup:
   - match: { acknowledged: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "trigger_data" : {
@@ -172,7 +172,7 @@ setup:
       version: " - 6.99.99"
       reason: "rest_total_hits_as_int support was added in 7.0"
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "trigger_data" : {
@@ -250,7 +250,7 @@ setup:
   - match: { acknowledged: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "trigger_data" : {

+ 3 - 3
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/40_search_transform.yml

@@ -3,7 +3,7 @@ setup:
   - do:
       cluster.health:
           wait_for_status: yellow
-  - do: {xpack.watcher.stats:{}}
+  - do: {watcher.stats:{}}
   - do:
       index:
         index: idx
@@ -51,7 +51,7 @@ setup:
 ---
 "Test search transform mustache integration (using request body)":
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "trigger_data" : {
@@ -110,7 +110,7 @@ setup:
 ---
 "Test search transform mustache integration (using request template)":
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "trigger_data" : {

+ 3 - 3
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/50_webhook_url_escaping.yml

@@ -12,7 +12,7 @@
         refresh: true
         body:    { foo: bar }
 
-  - do: {xpack.watcher.stats:{}}
+  - do: {watcher.stats:{}}
   - match: { "stats.0.watcher_state": "started" }
   - match: { "stats.0.watch_count": 0 }
 
@@ -38,7 +38,7 @@
   - set: { docs.0.doc._source.port: port }
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
           id: "test_watch"
           body:
             metadata:
@@ -73,7 +73,7 @@
   - match: { created: true }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
           id: "test_watch"
 
   - do:

+ 6 - 6
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/10_basic.yml

@@ -5,7 +5,7 @@
           wait_for_status: green
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_exe_watch"
         body:  >
           {
@@ -80,7 +80,7 @@
   - match: { _id: "my_exe_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_exe_watch"
 
   - match: { _id: "my_exe_watch" }
@@ -88,7 +88,7 @@
   - match: { watch.input.chain.inputs.1.second.transform.script.source: "return [ 'hits' : [ 'total' : ctx.payload.first.hits.total ]]" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_exe_watch"
         body: >
           {
@@ -132,7 +132,7 @@
         wait_for_status: green
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_exe_watch"
         body:  >
           {
@@ -207,7 +207,7 @@
   - match: { _id: "my_exe_watch" }
 
   - do:
-      xpack.watcher.get_watch:
+      watcher.get_watch:
         id: "my_exe_watch"
 
   - match: { _id: "my_exe_watch" }
@@ -215,7 +215,7 @@
   - match: { watch.input.chain.inputs.1.second.transform.script.source: "return [ 'hits' : [ 'total' : ctx.payload.first.hits.total ]]" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_exe_watch"
         body: >
           {

+ 2 - 2
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/20_minimal_body.yml

@@ -5,7 +5,7 @@
           wait_for_status: green
 
   - do:
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_logging_watch"
         body:  >
           {
@@ -34,7 +34,7 @@
   - match: { _id: "my_logging_watch" }
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         id: "my_logging_watch"
 
   - match: { "watch_record.watch_id": "my_logging_watch" }

+ 1 - 1
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/30_inline_watch.yml

@@ -5,7 +5,7 @@
           wait_for_status: green
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "trigger_data" : {

+ 3 - 3
x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml

@@ -6,7 +6,7 @@
 
   - do:
       catch: bad_request
-      xpack.watcher.put_watch:
+      watcher.put_watch:
         id: "my_exe_watch"
         body:  >
           {
@@ -42,7 +42,7 @@
           wait_for_status: green
 
   - do:
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body:  >
           {
             "watch" : {
@@ -80,7 +80,7 @@
 
   - do:
       catch: bad_request
-      xpack.watcher.execute_watch:
+      watcher.execute_watch:
         body: >
           {
             "watch": {

部分文件因文件數量過多而無法顯示