Get a watch Added in 5.6.0

GET /_watcher/watch/{id}

Path parameters

  • id string Required

    Watch ID

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • found boolean Required
    • _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
        • * object Additional properties

          Additional properties are allowed.

          Hide * attributes Show * attributes object
          • Values are email, webhook, index, logging, slack, or pagerduty.

          • 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
          • foreach string
          • name 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.

          • 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
          • index object

            Additional properties are allowed.

            Hide index attributes Show index attributes object
            • index string Required
            • doc_id string
            • refresh string

              Values are true, false, or wait_for.

            • op_type string

              Values are index or create.

            • timeout 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.

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

          • logging object

            Additional properties are allowed.

            Hide logging attributes Show logging attributes object
          • email object

            Additional properties are allowed.

            Hide email attributes Show email attributes object
          • Additional properties are allowed.

            Hide pagerduty attributes Show pagerduty attributes object
          • slack object

            Additional properties are allowed.

            Hide slack attributes Show slack attributes object
          • webhook object

            Additional properties are allowed.

            Hide webhook attributes Show webhook attributes object
            • auth object

              Additional properties are allowed.

            • body 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.

            • headers object
            • host string
            • method string

              Values are head, get, post, put, or delete.

            • params object
            • path string
            • port number
            • proxy object

              Additional properties are allowed.

            • 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.

            • scheme string

              Values are http or https.

            • url string
      • 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.

            Hide * attribute Show * attribute object
        • 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
          • lang string
          • params object
            Hide params attribute Show params attribute object
            • * object Additional properties

              Additional properties are allowed.

          • source string
          • id string
      • 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
          • inputs array[object] Required
            Hide inputs attribute Show inputs attribute object
            • * object

              Additional properties are allowed.

        • http object

          Additional properties are allowed.

          Hide http attributes Show http attributes object
          • extract array[string]
          • request object

            Additional properties are allowed.

            Hide request attributes Show request attributes object
            • auth object

              Additional properties are allowed.

              Hide auth attribute Show auth attribute object
              • basic object Required

                Additional properties are allowed.

            • body 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.

            • headers object
              Hide headers attribute Show headers attribute object
              • * string Additional properties
            • host string
            • method string

              Values are head, get, post, put, or delete.

            • params object
              Hide params attribute Show params attribute object
              • * string Additional properties
            • path string
            • port number
            • proxy object

              Additional properties are allowed.

              Hide proxy attributes Show proxy 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.

            • scheme string

              Values are http or https.

            • url string
          • Values are json, yaml, or text.

        • 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
          • lang string
          • params object
            Hide params attribute Show params attribute object
            • * object Additional properties

              Additional properties are allowed.

          • source string
          • id string
      • 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
    • _seq_no number
    • _version number
GET /_watcher/watch/{id}
curl \
 -X GET http://api.example.com/_watcher/watch/{id}
Response examples (200)
{
  "found": true,
  "_id": "string",
  "status": {
    "actions": {
      "additionalProperty1": {
        "ack": {
          "state": "awaits_successful_execution",
          "": "string"
        },
        "last_execution": {
          "successful": true,
          "": "string",
          "reason": "string"
        },
        "last_successful_execution": {
          "successful": true,
          "": "string",
          "reason": "string"
        },
        "last_throttle": {
          "reason": "string",
          "": "string"
        }
      },
      "additionalProperty2": {
        "ack": {
          "state": "awaits_successful_execution",
          "": "string"
        },
        "last_execution": {
          "successful": true,
          "": "string",
          "reason": "string"
        },
        "last_successful_execution": {
          "successful": true,
          "": "string",
          "reason": "string"
        },
        "last_throttle": {
          "reason": "string",
          "": "string"
        }
      }
    },
    "": "string",
    "state": {
      "active": true,
      "": "string"
    },
    "version": 42.0,
    "execution_state": "string"
  },
  "watch": {
    "actions": {
      "additionalProperty1": {
        "action_type": "email",
        "condition": {
          "always": {},
          "array_compare": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "compare": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "never": {},
          "script": {
            "lang": "string",
            "params": {},
            "source": "string",
            "id": "string"
          }
        },
        "foreach": "string",
        "max_iterations": 42.0,
        "name": "string",
        "throttle_period": "string",
        "": {
          "auth": {},
          "body": "string",
          "connection_timeout": "string",
          "headers": {},
          "host": "string",
          "method": "head",
          "params": {},
          "path": "string",
          "port": 42.0,
          "proxy": {},
          "read_timeout": "string",
          "scheme": "http",
          "url": "string"
        },
        "transform": {
          "chain": [
            {}
          ],
          "script": {
            "lang": "string",
            "params": {},
            "source": "string",
            "id": "string"
          },
          "search": {
            "request": {},
            "timeout": "string"
          }
        },
        "index": {
          "index": "string",
          "doc_id": "string",
          "refresh": "true",
          "op_type": "index",
          "timeout": "string",
          "execution_time_field": "string"
        },
        "logging": {
          "level": "string",
          "text": "string",
          "category": "string"
        },
        "slack": {
          "account": "string",
          "message": {
            "attachments": [
              {}
            ],
            "dynamic_attachments": {},
            "from": "string",
            "icon": "string",
            "text": "string",
            "to": [
              "string"
            ]
          }
        }
      },
      "additionalProperty2": {
        "action_type": "email",
        "condition": {
          "always": {},
          "array_compare": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "compare": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "never": {},
          "script": {
            "lang": "string",
            "params": {},
            "source": "string",
            "id": "string"
          }
        },
        "foreach": "string",
        "max_iterations": 42.0,
        "name": "string",
        "throttle_period": "string",
        "": {
          "auth": {},
          "body": "string",
          "connection_timeout": "string",
          "headers": {},
          "host": "string",
          "method": "head",
          "params": {},
          "path": "string",
          "port": 42.0,
          "proxy": {},
          "read_timeout": "string",
          "scheme": "http",
          "url": "string"
        },
        "transform": {
          "chain": [
            {}
          ],
          "script": {
            "lang": "string",
            "params": {},
            "source": "string",
            "id": "string"
          },
          "search": {
            "request": {},
            "timeout": "string"
          }
        },
        "index": {
          "index": "string",
          "doc_id": "string",
          "refresh": "true",
          "op_type": "index",
          "timeout": "string",
          "execution_time_field": "string"
        },
        "logging": {
          "level": "string",
          "text": "string",
          "category": "string"
        },
        "slack": {
          "account": "string",
          "message": {
            "attachments": [
              {}
            ],
            "dynamic_attachments": {},
            "from": "string",
            "icon": "string",
            "text": "string",
            "to": [
              "string"
            ]
          }
        }
      }
    },
    "condition": {
      "always": {},
      "array_compare": {
        "additionalProperty1": {
          "path": "string"
        },
        "additionalProperty2": {
          "path": "string"
        }
      },
      "compare": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "never": {},
      "script": {
        "lang": "string",
        "params": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        },
        "source": "string",
        "id": "string"
      }
    },
    "input": {
      "chain": {
        "inputs": [
          {
            "*": {}
          }
        ]
      },
      "http": {
        "extract": [
          "string"
        ],
        "request": {
          "auth": {
            "basic": {}
          },
          "body": "string",
          "connection_timeout": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "host": "string",
          "method": "head",
          "params": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "path": "string",
          "port": 42.0,
          "proxy": {
            "host": "string",
            "port": 42.0
          },
          "read_timeout": "string",
          "scheme": "http",
          "url": "string"
        },
        "response_content_type": "json"
      },
      "search": {
        "extract": [
          "string"
        ],
        "request": {
          "body": {
            "query": {}
          },
          "indices": [
            "string"
          ],
          "indices_options": {
            "allow_no_indices": true,
            "expand_wildcards": "string",
            "ignore_unavailable": true,
            "ignore_throttled": true
          },
          "search_type": "query_then_fetch",
          "template": {
            "explain": true,
            "id": "string",
            "params": {},
            "profile": true,
            "source": "string"
          },
          "rest_total_hits_as_int": true
        },
        "timeout": "string"
      },
      "simple": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    },
    "metadata": {
      "additionalProperty1": {},
      "additionalProperty2": {}
    },
    "status": {
      "actions": {
        "additionalProperty1": {
          "ack": {
            "state": "awaits_successful_execution"
          },
          "last_execution": {
            "successful": true,
            "reason": "string"
          },
          "last_successful_execution": {
            "successful": true,
            "reason": "string"
          },
          "last_throttle": {
            "reason": "string"
          }
        },
        "additionalProperty2": {
          "ack": {
            "state": "awaits_successful_execution"
          },
          "last_execution": {
            "successful": true,
            "reason": "string"
          },
          "last_successful_execution": {
            "successful": true,
            "reason": "string"
          },
          "last_throttle": {
            "reason": "string"
          }
        }
      },
      "": "string",
      "state": {
        "active": true,
        "": "string"
      },
      "version": 42.0,
      "execution_state": "string"
    },
    "throttle_period": "string",
    "": 42.0,
    "transform": {
      "chain": [
        {}
      ],
      "script": {
        "lang": "string",
        "params": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        },
        "source": "string",
        "id": "string"
      },
      "search": {
        "request": {
          "body": {
            "query": {}
          },
          "indices": [
            "string"
          ],
          "indices_options": {
            "allow_no_indices": true,
            "expand_wildcards": "string",
            "ignore_unavailable": true,
            "ignore_throttled": true
          },
          "search_type": "query_then_fetch",
          "template": {
            "explain": true,
            "id": "string",
            "params": {},
            "profile": true,
            "source": "string"
          },
          "rest_total_hits_as_int": true
        },
        "timeout": "string"
      }
    },
    "trigger": {
      "schedule": {
        "cron": "string",
        "daily": {
          "at": [
            {}
          ]
        },
        "hourly": {
          "minute": [
            42.0
          ]
        },
        "interval": "string",
        "monthly": {
          "at": [
            "string"
          ],
          "on": [
            42.0
          ]
        },
        "weekly": {
          "at": [
            "string"
          ],
          "on": [
            "sunday"
          ]
        },
        "yearly": {
          "at": [
            "string"
          ],
          "int": [
            "january"
          ],
          "on": [
            42.0
          ]
        }
      }
    }
  },
  "_primary_term": 42.0,
  "_seq_no": 42.0,
  "_version": 42.0
}