Query watches Added in 7.11.0

POST /_watcher/_query/watches

Get all registered watches in a paginated manner and optionally filter watches by a query.

application/json

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.

  • sort string | object | array[string | object]

    One of:

    Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

    One of:

    Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

  • search_after array[number | string | boolean | null | object]

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • count number Required
    • watches array[object] Required
      Hide watches attributes Show watches attributes object
      • _id string Required
      • status object

        Additional properties are allowed.

        Hide status attributes Show status attributes object
      • watch object

        Additional properties are allowed.

        Hide watch attributes Show watch attributes object
        • actions object Required
          Hide actions attribute Show actions attribute object
        • condition object Required

          Additional properties are allowed.

          Hide condition attributes Show condition attributes object
          • always object

            Additional properties are allowed.

          • Hide array_compare attribute Show array_compare attribute object
            • * object Additional properties

              Additional properties are allowed.

          • compare object
            Hide compare attribute Show compare attribute object
            • * object Additional properties
          • never object

            Additional properties are allowed.

          • script object

            Additional properties are allowed.

            Hide script attributes Show script attributes object
        • input object Required

          Additional properties are allowed.

          Hide input attributes Show input attributes object
          • chain object

            Additional properties are allowed.

            Hide chain attribute Show chain attribute object
          • http object

            Additional properties are allowed.

            Hide http attributes Show http attributes object
          • simple object
            Hide simple attribute Show simple attribute object
            • * object Additional properties

              Additional properties are allowed.

        • metadata object
          Hide metadata attribute Show metadata attribute object
          • * object Additional properties

            Additional properties are allowed.

        • status object

          Additional properties are allowed.

          Hide status attributes Show status attributes object
        • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

        • Time unit for milliseconds

        • Additional properties are allowed.

          Hide transform attributes Show transform attributes object
          • chain array[object]

            Additional properties are allowed.

          • script object

            Additional properties are allowed.

            Hide script attributes Show script attributes object
        • trigger object Required

          Additional properties are allowed.

          Hide trigger attribute Show trigger attribute object
          • schedule object

            Additional properties are allowed.

            Hide schedule attributes Show schedule attributes object
            • cron string
            • daily object

              Additional properties are allowed.

            • hourly object

              Additional properties are allowed.

            • interval string

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

      • _seq_no number
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
    }
  ]
}