# Watcher API Not Available

**URL:** <https://discuss.elastic.co/t/watcher-api-not-available/271664>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [April 29, 2021, 2:29pm UTC](https://discuss.elastic.co/t/watcher-api-not-available/271664 "2021-04-29T14:29:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Munavir\_Chavody](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/munavir_chavody/32/87951_2.png) [@Munavir\_Chavody](https://discuss.elastic.co/u/Munavir_Chavody)\
**Post date:** [April 29, 2021, 2:29pm UTC](https://discuss.elastic.co/t/watcher-api-not-available/271664/1 "2021-04-29T14:29:23Z")

</div>

I'm trying to access Watcher API via my ES endpoint. I have 2 versions of the ES: 7.11 and 7.10, but both of the shouldn't have any differences as per the documentation.

Now, the endpoint `/_watcher/_query/watches` works fine with 7.11 and error is thrown with 7.10.

Below is the error:

```
{

    "error": {

        "root_cause": [

            {

                "type": "invalid_index_name_exception",

                "reason": "Invalid index name [_watcher], must not start with '_', '-', or '+'",

                "index_uuid": "_na_",

                "index": "_watcher"

            }

        ],

        "type": "invalid_index_name_exception",

        "reason": "Invalid index name [_watcher], must not start with '_', '-', or '+'",

        "index_uuid": "_na_",

        "index": "_watcher"

    },

    "status": 400

}
```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 29, 2021, 4:35pm UTC](https://discuss.elastic.co/t/watcher-api-not-available/271664/2 "2021-04-29T16:35:38Z")

</div>

Hi @Munavir_Chavody Welcome to the community

The watcher API added the [\_query](https://www.elastic.co/guide/en/elasticsearch/reference/7.11/watcher-api-query-watches.html) API in 7.11 it did not exist in 7.10.

Elasticsearch is progress of moving away from direct access to the underlying system indices so the query API was added

Previous 7.10 and before you would need to query the underlying `.watches` system indices which is not desirable.

in 7.10 to get a list of the watches via API

`GET .watches/_search`

Or you will need to know the ID of the watch ahead of time (via Kibana / Management / Watcher) and use the [GET watches](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/watcher-api-get-watch.html) API

`GET _watcher/watch/<watch_id>`

Also just to point out the new [Kibana Alerting Framework](https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html) is very nice and supports DSL queries as well. It is generally a bit easier to use then watcher. You might want to check it out.

---

<div class="post-metadata">

**Author:** ![Munavir\_Chavody](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/munavir_chavody/32/87951_2.png) [@Munavir\_Chavody](https://discuss.elastic.co/u/Munavir_Chavody)\
**Post date:** [April 30, 2021, 6:09am UTC](https://discuss.elastic.co/t/watcher-api-not-available/271664/3 "2021-04-30T06:09:28Z")

</div>

Hello @stephenb

Thank you so much for the answer. It works now. However I have another question: I just skimmed through the alerting framework that you've provided. Apart from making things user friendly, is there any changes to the alerting framework than the watchers? Also, from which version of Kibana does it support this feature.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 30, 2021, 1:39pm UTC](https://discuss.elastic.co/t/watcher-api-not-available/271664/4 "2021-04-30T13:39:06Z")

</div>

Watcher and Kibana Alerting are completely separate implementations. They have nothing in common with respect to implementation, are not integrated or use any common components.

Think of watcher as legacy (although we will support for quite some time)

The of the Kibana Alerting framework as the future of alerting with the elastic stack.

Alerting framework started / beta I think in 7.7 but has matured significantly since then, and went GA in 7.11

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 28, 2021, 1:39pm UTC](https://discuss.elastic.co/t/watcher-api-not-available/271664/5 "2021-05-28T13:39:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
