Target - Webhook 🆕
Configuration​
The name of this target is WebhookTarget
To configure the webhook, you need to provide the following:
- url
The URL of the webhook to post the data to
- template
The name of a mustache template to transform the input data to be displayed
Adding a webhook target​
To add a webhook target to an existing subscription:
- Web Portal
- OpenDataDSL
- REST API
- Select Subscriptions
- Find the subscription you want to add the target to.
- Click the + button next to targets
- Select WebhookTarget
- Fill out the url field appropriately
- Select the template you want to use to format your data
- Click the save button
// Adding a webhook run target to an existing subscription
sub = ${subscription:"MySubscription"}
sub.addWebhookTarget("https://webhook.opendatadsl.com/data", "template")
save sub
POST https://api.opendatadsl.com/service/subscription/v1
Authorization: Bearer {{token}}
{
"name": "MySubscription",
"targets":[{
"name": "WebhookTarget",
"url": "https://webhook.opendatadsl.com/data",
"template": "template"
}]
}