- Painless Scripting Language: other versions:
- Getting Started with Painless
- Painless Language Specification
- Painless contexts
- Context examples
- Ingest processor context
- Update context
- Update by query context
- Reindex context
- Sort context
- Similarity context
- Weight context
- Score context
- Field context
- Filter context
- Minimum should match context
- Metric aggregation initialization context
- Metric aggregation map context
- Metric aggregation combine context
- Metric aggregation reduce context
- Bucket script aggregation context
- Bucket selector aggregation context
- Analysis Predicate Context
- Watcher condition context
- Watcher transform context
- Painless API Reference
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Watcher transform context
editWatcher transform context
editUse a Painless script to transform watch data into a new payload for use in a response to a condition.
Variables
-
params
(Map
, read-only) - User-defined parameters passed in as part of the query.
-
ctx['watch_id']
(String
, read-only) - The id of the watch.
-
ctx['execution_time']
(DateTime
, read-only) - The start time for the watch.
-
ctx['trigger']['scheduled_time']
(DateTime
, read-only) - The scheduled trigger time for the watch.
-
ctx['trigger']['triggered_time']
(DateTime
, read-only) - The actual trigger time for the watch.
-
ctx['metadata']
(Map
, read-only) - Any metadata associated with the watch.
-
ctx['payload']
(Map
, read-only) - The accessible watch data based upon the watch input.
Return
-
Object
- The new payload.
API
The standard Painless API is available.
Was this helpful?
Thank you for your feedback.