Xpack PUT Watcher API

Is there a query param or other method of giving the watcher a name via the API?
I know the ID is set by path/resource reference and I can see we can set active=true|false can be set by a query param but can't see a way of setting the watcher name.

Cheers!

RE: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/watcher-api-put-watch.html

the ID is the unique identifier, nothing more is needed.

What else are you referring to by name here?

This page is the watcher list. When manually creating a watcher via the gui interface you can enter an ID and a more human "name" (2nd column).

Thanks

ooooooh, now I get it (backend person speaking here) - this is a special field in the metadata of a watch that is being used here.

--Alex

Ah Brilliant, that's the one

{
"metadata" : {
"name" : "whatever"
},
"input" : ... , "action" : ...
}

1 Like

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