Aruba Central Online Help
You are here: Home > Aruba Central APIs > Webhook

Webhook

An application can provide real-time information or notifications to other applications using the Webhook service. You can access the Webhook service through the Account Home or APIApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software. Gateway. Using the Webhook service, you can list, add, or delete Webhooks; get Webhook token; refresh Webhook token; update Webhook settings; do Webhook settings for a specific item; and test for Webhook notification.

Aruba Central allows you to integrate Webhook with other third-party applications such as ServiceNOW, Zapier, IFTTT, and so on.

Configuring and Modifying Webhook Through the User Interface

To access the Webhooks service from the UI:

  1. In the Account Home page, under Global Settings, click Webhooks.

    The Webhooks page is displayed.

  2. In the Webhook tab, click + sign. The Add Webhook pop-up box opens.

    Figure 1  Webhooks Page

    Figure 2  Add Webhooks Page

  3. To create webhooks, enter the following details:
    1. Name—Enter a name for the Webhook
    2. Retry Policy— Select any one of the following options:
      • None—Select this to have no retry.
      • Important—Select this to have up to 5 retries over 6 minutes.
      • Critical—Select this to have up to 5 retries over 27 hours.
    3. URLs—Enter the URLUniform Resource Locator. URL is a global address used for locating web resources on the Internet.. Click + to enter another URL. You can add up to three URLs.
  4. Click Save. The Webhooks is created and listed in the Webhook table.

Viewing Webhooks

To view the Webhooks, complete the following steps:

The Webhook table displays the following information and also allows you to edit or delete Webhooks:

  1. In the Account Home page, under Global Settings, click Webhooks.
  2. The Webhooks page with Webhook table is displayed.
    The Webhook table allows you to edit or delete Webhooks and also displays the following information:
    • Name—Name of the Webhooks.
    • Number of URL Entries—Number of URLs in Webhooks. Click the number to view the list of URLs.
    • Updated At—Date and time at which Webhooks was updated.
    • Webhook ID—Webhooks ID.
    • Token—Webhooks token. Webhooks token enables header authentication and the third-party receiving service must validate the token to ensure authenticity.
    • Edit—Select the Webhook from the list and click the Edit icon to edit the Webhook. You can refresh the token and add URLs. Click Save to save the changes.
    • Delete—Select the Webhook from the list and click the Delete icon and click Yes to delete the Webhook.
    • Test Webhooks—Select the Webhook from the list and click the Test Webhooks icon to test the Webhook by posting sample webhook payload to the configured URL. The Test Webhooks table provides the URL and Status of the selected Webhook.
    • View Dispatch Logs—Select the Webhook from the list and click the View Dispatch Log icon to view the Dispatch Logs for the selected Webhook. The Dispatch Logs table provides the URL, Status, and Dispatched Time. Click the arrow against each row to view the Log Details and Attempts in the drop-down for the respective URL.

    Figure 3  Dispatch Logs Details Page

Refreshing Webhooks Token Through the UI

To refresh Webhooks token through the UI:

  1. In the Account Home page, under Global Settings, click Webhooks.

    The Webhooks page is displayed.

  2. In the Webhook table, select the Webhook from the list and click Edit icon to edit.
  3. In the pop-up window, click the Refresh icon next to the token. The token is refreshed.

Configuring and Modifying Webhook Through the API Gateway

To access and use the API Webhook service

  1. Log in to Account Home.
  2. Under Global Settings, click API Gateway.
  3. In the APIs tab, click the Swagger link under the Documentation header. The Swagger website opens.
  4. In the Swagger website, select Webhook from the URL drop-down list. All available Webhooks APIs are listed under API Reference.

For further help on API Webhook Service and creating a Webhook ID (WID), refer to https://apigw-<fqdn of the Aruba Central Instance>/swagger/apps/nms/.

The following HTTPHypertext Transfer Protocol. The HTTP is an application protocol to transfer data over the web. The HTTP protocol defines how messages are formatted and transmitted, and the actions that the w servers and browsers should take in response to various commands. methods are defined for Aruba Central API Webhook resource:

  • GET 
  • POST
  • PUT
  • DELETE

You can perform CRUD operation on the Webhook URL configuration. The key configuration elements that are required to use API Webhook service are Webhook URL and a shared secret.

A shared secret token is generated for a Webhook URL when you register for Webhooks. A hash key is generated using SHA256 algorithm by using the payload and the shared secret token. The API required to refresh the shared secret token is provided for a specific Webhook configuration. You can choose the frequency at which you want to refresh the secret token.

Sample Webhook Format for a New Alert Generation

URL POSTThe HTTP POST method is used for transferring data from a client (browser) to a server using the HTTP protocol. The POST method is considered a secure way of transferring data from a client as it carries the request parameter in the message body and does not append it in the URL string. <webhook-url>

Custom Headers

Content-Type: application/json

X-Central-Service: Alerts

X-Central-Event: Radio-Channel-Utilization

X-Central-Delivery-ID: 72d3162e-cc78-11e3-81ab-4c9367dc0958

X-Central-Delivery-Timestamp: 2016-07-12T13:14:19-07:00

X-Central-Customer-ID: <########>

Body

{ "alert_type": "AP_RADIO_NOISE_FLOOR", "description": "Noise floor on AP iap-303-iphone456-offline operating on Channel 10 and serving 0 clients has been above -110 dBmDecibel-Milliwatts. dBm is a logarithmic measurement (integer) that is typically used in place of mW to represent receive-power level. AMP normalizes all signals to dBm, so that it is easy to evaluate performance between various vendors. for about 10 minutes since 2019-07-24 07:06:00 UTCCoordinated Universal Time. UTC is the primary time standard by which the world regulates clocks and time..", "timestamp": 1563952560, "webhook": "780c65a0-10b6-4eb1-b725-21b0d52aa432", "setting_id": "201804170291-1253", "state": "Open", "nid": 1253, "details": { "_rule_number": "0", "group": "3", "name": "iap-303-iphone456-offline", "_radio_num": "1", "client_count": "0", "labels": "3,118", "_bandBand refers to a specified range of frequencies of electromagnetic radiation.": "0", "duration": "10", "time": "2019-07-24 07:06:00 UTC", "threshold": "110", "ds_key": "201804170291.CNGHKGX004.radio.noisefloor", "serial": "CNGHKGX004", "channel": "10" }, "operation": "create", "device_id": "CNGHKGX004", "id": "AWwi1jjgVQO1ZtiGThDB", "severity": "Critical" }