{
  "watcher.put_watch": {
    "documentation": {
      "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch",
      "description": "Create or update a watch"
    },
    "stability": "stable",
    "visibility": "public",
    "headers": {
      "accept": [
        "application/json"
      ],
      "content_type": [
        "application/json"
      ]
    },
    "url": {
      "paths": [
        {
          "path": "/_watcher/watch/{id}",
          "methods": [
            "PUT",
            "POST"
          ],
          "parts": {
            "id": {
              "type": "string",
              "description": "Watch ID"
            }
          }
        }
      ]
    },
    "params": {
      "active": {
        "type": "boolean",
        "default": true,
        "description": "Specify whether the watch is in/active by default"
      },
      "version": {
        "type": "long",
        "description": "Explicit version number for concurrency control"
      },
      "if_seq_no": {
        "type": "long",
        "description": "only update the watch if the last operation that has changed the watch has the specified sequence number"
      },
      "if_primary_term": {
        "type": "long",
        "description": "only update the watch if the last operation that has changed the watch has the specified primary term"
      }
    },
    "body": {
      "description": "The watch",
      "required": true
    }
  }
}
