NAME
    Search::Elasticsearch::Plugin::Watcher - Plugin providing Watcher API
    for Search::Elasticsearch

VERSION
    version 2.00

SYNOPSIS
        use Search::Elasticsearch();

        my $es = Search::Elasticsearch->new(
            nodes   => \@nodes,
            plugins => ['Watcher']
        );

        my $response = $es->watcher->info();

  DESCRIPTION
    This class extends the Search::Elasticsearch client with a "watcher"
    namespace, to support the API for the Watcher
    <https://www.elastic.co/products/watcher> plugin for Elasticsearch. In
    other words, it can be used as follows:

        use Search::Elasticsearch();
        my $es = Search::Elasticsearch->new(
            nodes   => \@nodes,
            plugins => ['Watcher']
        );

        my $response = $es->watcher->info();

    It works with the version 1.x and version 2.x clients, and can be used
    both in Search::Elasticsearch and in Search::Elasticsearch::Async.

METHODS
    The full documentation for the Watcher plugin is available here:
    <http://www.elastic.co/guide/en/watcher/current/>

  "put_watch()"
        $response = $es->watcher->put_watch(
            id    => $watch_id,     # required
            body  => {...}          # required
        );

    The "put_watch()" method is used to register a new watcher or to update
    an existing watcher.

    See the put_watch docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-p
    ut-watch> for more information.

    Query string parameters: "active", "master_timeout"

  "get_watch()"
        $response = $es->watcher->get_watch(
            id    => $watch_id,     # required
        );

    The "get_watch()" method is used to retrieve a watch by ID.

    See the get_watch docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-g
    et-watch> for more information.

  "delete_watch()"
        $response = $es->watcher->delete_watch(
            id    => $watch_id,     # required
        );

    The "delete_watch()" method is used to delete a watch by ID.

    Query string parameters: "force", "master_timeout"

    See the delete_watch docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-d
    elete-watch> for more information.

  "execute_watch()"
        $response = $es->watcher->execute_watch(
            id    => $watch_id,     # optional
            body  => {...}          # optional
        );

    The "execute_watch()" method forces the execution of a previously
    registered watch. Optional parameters may be passed in the "body".

    Query string parameters: "debug", "master_timeout"

    See the execute_watch docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-e
    xecute-watch> for more information.

  "ack_watch()"
        $response = $es->watcher->ack_watch(
            watch_id => $watch_id,                  # required
            action_id => $action_id | \@action_ids  # optional
        );

    The "ack_watch()" method is used to manually throttle the execution of a
    watch.

    Query string parameters: "master_timeout"

    See the ack_watch docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-a
    ck-watch> for more information.

  "activate_watch()"
        $response = $es->watcher->activate_watch(
            watch_id => $watch_id,                  # required
        );

    The "activate_watch()" method is used to activate a deactive watch.

    Query string parameters: "master_timeout"

    See the activate_watch docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-a
    ctivate-watch> for more information.

  "deactivate_watch()"
        $response = $es->watcher->deactivate_watch(
            watch_id => $watch_id,                  # required
        );

    The "deactivate_watch()" method is used to deactivate an active watch.

    Query string parameters: "master_timeout"

    See the deactivate_watch docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-d
    eactivate-watch> for more information.

  "info()"
        $response = $es->watcher->info();

    The "info()" method returns basic information about the watcher plugin
    that is installed.

    See the info docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-i
    nfo> for more information.

  "stats()"
        $response = $es->watcher->stats(
            metric => $metric       # optional
        );

    The "stats()" method returns information about the status of the watcher
    plugin.

    See the stats docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-s
    tats> for more information.

  "stop()"
        $response = $es->watcher->stop();

    The "stop()" method stops the watcher service if it is running.

    See the stop docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-s
    top> for more information.

  "start()"
        $response = $es->watcher->start();

    The "start()" method starts the watcher service if it is not already
    running.

    See the start docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-s
    tart> for more information.

  "restart()"
        $response = $es->watcher->restart();

    The "restart()" method stops then starts the watcher service.

    See the restart docs
    <http://www.elastic.co/guide/en/watcher/current/api-rest.html#api-rest-r
    estart> for more information.

AUTHOR
    Clinton Gormley <drtech@cpan.org>

COPYRIGHT AND LICENSE
    This software is Copyright (c) 2015 by Elasticsearch BV.

    This is free software, licensed under:

      The Apache License, Version 2.0, January 2004

