I try to create Watcher , when i save it error
could not parse [webhook] action [42407423-32c4-4a72-aedf-03e31c4d6856/xxxx_webhook]. failed parsing http request template
"actions": {
"gosd_webhook": {
"transform": {
"script": {
"source": """
ctx.payload.xxxx= ctx.payload.aggregations.xxxx.buckets.stream().map(p -> '{"Store_id": "B'+p.key[0]+'", "Terminal_No" : "'+p.key[1]+'" , "Type" : "'+p.key[2]+'" , "Event" : "'+p.key[3]+'" , "Description" : "'+p.key[4]+'"}').collect(Collectors.toList())
""",
"lang": "painless"
}
},
"foreach": "ctx.payload.xxxx",
"max_iterations": 300,
"webhook": {
"scheme": "https",
"host": "yyyyyyyy.xxxxxx.aa.bb",
"port": 443,
"method": "POST",
"path": "/API/ticket/CreateTicketgo",
"headers":
{
"Content-Type": "application/json"
},
"auth": {
"basic": {
"username": "Ticket",
"password": "::es_redacted::"
}
},
"body": "{{ctx.payload._value}}"
}
}
}