OpenSearch/watcher/docs/reference/input.asciidoc
Alexander Reelsen 04a8fb3202 Watcher: Add chained input
```
Chained input for now works like this
{
"chain" : [
  { "first" : { "simple" : { "foo" : "bar" } } },
  { "second" : { "simple" : { "spam" : "eggs" } } }
]
```

This allows to access the payload via ctx.payload.first.foo for example

The array notation is needed to guarantee order, as JSON itself does not guarantee
order of objects.

Closes elastic/elasticsearch#353

Original commit: elastic/x-pack-elasticsearch@7ab32c43a8
2015-10-30 10:22:26 +01:00

19 lines
497 B
Plaintext

[[input]]
=== Input
A watch _input_ loads data into a watch's execution context as the initial payload.
Watcher supports four input types: <<input-simple, `simple`>> , <<input-search, `search`>>,
<<input-http, `http`>> and <<input-chain, `chain`>>
NOTE: If you don't define an input for a watch, an empty payload is loaded into the
execution context.
include::input/simple.asciidoc[]
include::input/search.asciidoc[]
include::input/http.asciidoc[]
include::input/chain.asciidoc[]