Trying to get a very simple watcher to execute as a "hello world" test to an external REST API and it does not working. Tried a CURL from the underlying elastic linux host and it works perfectly. Note: Destination REST API is using a self-signed cert so with CURL I use the -k option. Don't know if this is a problem for elastic/watcher or not.
My code is as follows (note you'll see I've brute forced the entry for BODY to test, but long term I want the JSON from input section):
{ "trigger": { "schedule": { "interval": "1m" } }, "input": { "simple": { "severity": 0, "owner": "admin", "name": "Hello World", "type": "Unclassified", "createInvestigation": true } }, "condition": { "always": {} }, "actions": { "postincident": { "webhook": { "scheme": "https", "host": "REDACTED_HOSTNAME", "port": 443, "method": "post", "path": "/incident", "params": {}, "headers": { "Authorization": "REDACTED_API_KEY", "content-type": "application/json", "accept": "application/json" }, "body": "{\"name\" : \"Hello World\",\"type\" : \"Unclassified\",\"severity\" : 0,\"owner\" : \"admin\",\"createInvestigation\" : true}" } } } }