lib/elasticsearch/xpack/api/actions/watcher/start.rb in elasticsearch-xpack-7.6.0 vs lib/elasticsearch/xpack/api/actions/watcher/start.rb in elasticsearch-xpack-7.7.0.pre
- old
+ new
@@ -5,23 +5,26 @@
module Elasticsearch
module XPack
module API
module Watcher
module Actions
- # TODO: Description
-
+ # Starts Watcher if it is not already running.
#
- # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html
+ # @option arguments [Hash] :headers Custom HTTP headers
#
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html
+ #
def start(arguments = {})
+ headers = arguments.delete(:headers) || {}
+
arguments = arguments.clone
method = Elasticsearch::API::HTTP_POST
path = "_watcher/_start"
params = {}
body = nil
- perform_request(method, path, params, body).body
+ perform_request(method, path, params, body, headers).body
end
end
end
end
end