Query watches Added in 7.11.0
Get all registered watches in a paginated manner and optionally filter watches by a query.
Body
-
from number
The offset from the first result to fetch. Needs to be non-negative.
-
size number
The number of hits to return. Needs to be non-negative.
-
query object
Additional properties are allowed.
-
search_after array[number | string | boolean | null | object]
A field value.
One of: Additional properties are allowed.
POST
/_watcher/_query/watches
curl \
-X POST http://api.example.com/_watcher/_query/watches \
-H "Content-Type: application/json" \
-d '{"from":42.0,"size":42.0,"query":{},"":"string","search_after":[42.0]}'
Request examples
{
"from": 42.0,
"size": 42.0,
"query": {},
"": "string",
"search_after": [
42.0
]
}
Response examples (200)
{
"count": 42.0,
"watches": [
{
"_id": "string",
"status": {
"actions": {
"additionalProperty1": {
"ack": {},
"last_execution": {},
"last_successful_execution": {},
"last_throttle": {}
},
"additionalProperty2": {
"ack": {},
"last_execution": {},
"last_successful_execution": {},
"last_throttle": {}
}
},
"": "string",
"state": {
"active": true,
"": "string"
},
"version": 42.0,
"execution_state": "string"
},
"watch": {
"actions": {
"additionalProperty1": {
"action_type": "email",
"condition": {},
"foreach": "string",
"max_iterations": 42.0,
"name": "string",
"throttle_period": "string",
"transform": {},
"index": {},
"logging": {},
"slack": {}
},
"additionalProperty2": {
"action_type": "email",
"condition": {},
"foreach": "string",
"max_iterations": 42.0,
"name": "string",
"throttle_period": "string",
"transform": {},
"index": {},
"logging": {},
"slack": {}
}
},
"condition": {
"always": {},
"array_compare": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"compare": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"never": {},
"script": {
"lang": "string",
"params": {},
"source": "string",
"id": "string"
}
},
"input": {
"chain": {
"inputs": [
{}
]
},
"http": {
"extract": [
"string"
],
"request": {},
"response_content_type": "json"
},
"search": {
"extract": [
"string"
],
"request": {},
"timeout": "string"
},
"simple": {
"additionalProperty1": {},
"additionalProperty2": {}
}
},
"metadata": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"status": {
"actions": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"": "string",
"state": {
"active": true
},
"version": 42.0,
"execution_state": "string"
},
"throttle_period": "string",
"": 42.0,
"transform": {
"chain": [
{}
],
"script": {
"lang": "string",
"params": {},
"source": "string",
"id": "string"
},
"search": {
"request": {},
"timeout": "string"
}
},
"trigger": {
"schedule": {
"cron": "string",
"daily": {},
"hourly": {},
"interval": "string"
}
}
},
"_primary_term": 42.0,
"_seq_no": 42.0
}
]
}