actinia-org / actinia-core

Actinia Core is an open source REST API for scalable, distributed, high performance processing of geographical data that uses mainly GRASS GIS for computational tasks (DOI: https://doi.org/10.5281/zenodo.5879231) | Tutorial: https://actinia-org.github.io/actinia-core/ | Docker: https://hub.docker.com/r/mundialis/actinia-core
https://actinia.mundialis.de/
GNU General Public License v3.0
78 stars 23 forks source link

Webhooks: support multiple webhooks and different json payloads #412

Open ninsbl opened 1 year ago

ninsbl commented 1 year ago

The webhooks in the processing chain are a very useful feature. It would be even more useful if several webhooks could be called and if not only the final actinia response, but a custom json payload could be send to the POST webhook. In a custom json body, the actinia response would be ideally included if needed with help of a fixe "variable" name.

Here I think in general of modifying webhooks to look like e.g. here:

"webhooks": {
    "finished": [{"auth": "username:password",
                  "url": "http://business-logic.company.com/api/v3/actinia-finished-webhook_1",
                  "json": "{'post-body': 'json'}"
                 },
                  {"auth": "username:password",
                   "url": "http://business-logic.company.com/api/v3/actinia-finished-webhook_2",
                   "json": "{'post-body': 'json'}"
                  }
                  ]

},