GuidesWebhooks

Create Webhook Configuration

You can create a Webhook to subscribe to specific Webhook topics to get notified about the events occuring in your Mist Organization or Site. This can either be done from the Mist UI with an API Call.

It is also possible to create multiple Webhook configuration at the org level and/or at the site level. This can be leveraged to send the notifications to different webhook collectors based on their topic.

Depending on the scope (organization or site) where the webhook is configured, different topics can be supported. For more information about the list of supported topics on each scope, see List Webhook Topics.

Configure a Webhook at the Organization level

When configuring a webhook at the organization level, you be notified for all the events (based on the selected topics) on any of the sites belonging to the Mist Organization. If you want to only receive notification for some sites, it is required to configure the webhooks at the site level.

Configure the Org Webhook from the API

It is possible to use the APIs to create, update, delete, list or get webhooks:

To create a new Webhook Configuration, send a POST /api/v1/orgs/{org_id}/webhooks with the following body:

  • the Webhook name
  • the Webhook URL (where the webhooks are sent to)
  • the list of Webhooks topics from this list
{
    "name": "Webhook One",
    "url": "https://myserver.com:3000/webhook",
    "topics": [
        "audits"
    ]    
}

However, even if this minimum configuration may be enough, we are recommanding to read the Webhook Security page to have a better understanding on how to secure the webhook communications and how you can secure your server by filtering and validating the received HTTP POST messages.

Configure the Org Webhook from the UI

See Add a Webhook in the Juniper Mist Portal from the Juniper documentation.

Configure a Webhook at the Site level

When configuring a webhook at the site level, you be notified for all the events (based on the selected topics) related to the site where the webhook has been configured. The site level webhooks also offer more topics, like the location related notifications.

Configure the Org Webhook from the API

It is possible to use the APIs to create, update, delete, list or get webhooks:

To create a new Webhook Configuration, send a POST /api/v1/sites/{site_id}/webhooks with the following body:

  • the Webhook name
  • the Webhook URL (where the webhooks are sent to)
  • the list of Webhooks topics from this list
{
    "name": "Webhook One",
    "url": "https://myserver.com:3000/webhook",
    "topics": [
        "audits"
    ]    
}

However, even if this minimum configuration may be enough, we are recommanding to read the Webhook Security page to have a better understanding on how to secure the webhook communications and how you can secure your server by filtering and validating the received HTTP POST messages.

Configure the Site Webhook from the UI

See Add a Webhook in the Juniper Mist Portal from the Juniper documentation.

On this page