GuidesWebhooks

Overview

You can configure webhooks to get real-time notifications as events happen across your Juniper Mist organization or within a particular Juniper Mist site.

You may know webhooks as user-defined HTTP callbacks, HTTP posts, or HTTP notifications. These notifications include event details that you can use in your own applications or third-party software.

Webhook Vs. API Calls

As you begin working with webhooks, it can be helpful to compare them with APIs. APIs work on a pull or polling model. You create an API call, and Juniper Mist responds with the requested data. In contrast, webhooks work on a push model. After you configure a webhook, you receive data as events occur.

REST APIsWebhooks
ModelPull or polling modelPush model
Limit5000 per organization per hourNo limit
OperationsPull statistics, create configuration, update configurationPush alerts and key statistics
Coverage100 percentAlerts, key events, or location
Recommended use casesAutomation, configurationIntegration with third-party monitoring tools or business applications

NOTE: The concepts of alerts and alarms are considered interchangeable. However, when configuring an alert, you should make note of the alert or alarm syntax and use what is displayed.

NOTE 2: The Push Model of the webhook means the Mist Cloud must be able to directly send the messages to the Webhook collector (the Webhook Collector must be exposed to Internet). Information to secure the Webhook collector are available in the Webhook Security Chapter.

Generic description of the webhooks can be found in the Juniper Documentation portal

Webhook Flow

As opposed to clients polling and pulling information from the API, Juniper Mist pushes webhooks to a target webhook URL. There, underlying services can collect, store, or parse the message for specific data and then perform actions on the infrastructure automatically.

This image shows the stages of data flow for webhooks.

Webhooks Message Flow

  1. An event occurs on a network device that Juniper Mist manages.
  2. Juniper Mist processes the event and checks the current webhook configuration for a match.
  3. If Juniper Mist finds a match, it sends the webhook to the endpoint URL as configured.
  4. If multiple events for a specific topic occur within a certain timeframe, Juniper Mist aggregates the events and sends them in a single message.

On this page