Aruba Central Online Help

Webhooks

Webhooks allow you to implement event reactions by providing real-time information or notifications to other applications. Aruba Central allows you to create Webhooks and select Webhooks as the notification delivery option for all alerts. For a complete list of alerts, see Alerts & Events.

Using Aruba Central, you can integrate Webhooks with other third-party applications such as ServiceNow, Zapier, IFTTT, and so on. For more information about integrating Aruba Central with ServiceNow, see Integrating Aruba Central with ServiceNow.

You can access the Webhooks service either through the Aruba Central UI or APIApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software. Gateway. Aruba Central supports creating up to 10 Webhooks. To enable redundancy, Aruba Central allows you to add up to three URLsUniform Resource Locator. URL is a global address used for locating web resources on the Internet. per Webhook.

From Aruba Central, you can add, list, or delete Webhooks; get or refresh Webhooks token; get or update Webhooks settings for a specific item; and test Webhooks notification.

This section includes the following topics:

In the Alerts & Events page, click the Configuration icon to configure and enable an alert. In the Notification Options, select Webhooks as the notification delivery option. For more information, see the following sections:

The following figure illustrates how Aruba Central integrates with third-party applications using Webhooks.

Figure 1  Webhooks Integration

Creating and Updating Webhooks Through the UI

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 window is displayed.

    Figure 2  Webhooks Page

    Figure 3  Add Webhooks Page

  3. To create webhooks, enter the following details:
    1. Name—Enter a name for the Webhook.
    1. Retry Policy—Select one of the following options:
      • None—No retries.
      • Important—Up to 5 retries over 6 minutes.
      • Critical—Up to 5 retries over 27 hours.
    2. URLs—Enter the URL. 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:

  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 4  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.

Creating and Updating Webhooks Through the API Gateway

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 Webhooks resource:

  • GET
  • POST
  • PUT
  • DELETE

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

A shared secret token is generated for the Webhooks 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 Webhooks configuration. You can choose the frequency at which you want to refresh the secret token.

To access and use the API Webhooks service:

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

For more information on Webhooks APIs, see:
https://app1-apigw.central.arubanetworks.com/swagger/central.

List of Webhooks APIs

Aruba Central supports the following Webhooks APIs:

  • GET /central/v1/webhooks—Gets a list of Webhooks.

The following is a sample response:

{ "count": 1, "settings": [ { "wid": "e26450be-4dac-435b-ac01-15d8f9667eb8", "name": "AAAAuthentication, Authorization, and Accounting. AAA is a security framework to authenticate users, authorize the type of access based on user credentials, and record authentication events and information about the network access and network resource consumption.", "updated_ts": 1523956927, "urls": [ "https://example.org/webhook1", "https://example.org/webhook1" ], "secure_token": "KEu5ZPTi44UO4MnMiOqz" } ] }
  • POST /central/v1/webhooks—Creates Webhooks.

The following is a sample response:

{ "name": "AAA", "wid": "e829a0f6-1e36-42fe-bafd-631443cbd581" }
  • DELETE /central/v1/webhooks/{wid}—Deletes Webhooks.

The following is a sample response:

{ "wid": "e26450be-4dac-435b-ac01-15d8f9667eb8" }
  • GET /central/v1/webhooks/{wid}—Gets Webhooks settings for a specific item.

The following is a sample response:

{ "wid": "e26450be-4dac-435b-ac01-15d8f9667eb8", "name": "AAA", "updated_ts": 1523956927, "urls": [ "https://example.org/webhook1", "https://example.org/webhook1" ], "secure_token": "KEu5ZPTi44UO4MnMiOqz" }
  • PUT /central/v1/webhooks/{wid}—Updates Webhooks settings for a specific item.

The following is a sample response:

{ "name": "AAA", "wid": "e829a0f6-1e36-42fe-bafd-631443cbd581" }
  • GET /central/v1/webhooks/{wid}/token—Gets the Webhooks token for the Webhooks ID.

The following is a sample response:

{ "name": "AAA", "secure_token": "[{\"token\": \"zSMrzuYrblgBfByy2JrM\", \"ts\": 1523957233}]" }
  • PUT /central/v1/webhooks/{wid}/token—Refreshes the Webhooks token for the Webhooks ID.

The following is a sample response:

{ "name": "AAA", "secure_token": "[{\"token\": \"zSMrzuYrblgBfByy2JrM\", \"ts\": 1523957233}]" }
  • GET /central/v1/webhooks/{wid}/ping—Tests the Webhooks notification and returns whether success or failure.

The following is a sample response:

"Ping Response [{'url': 'https://example.org', 'status': 404}]"

Sample Webhooks Payload Format for Alerts

URL POST <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: <########>

Refer to the following topics to view sample JSONJavaScript Object Notation. JSON is an open-standard, language-independent, lightweight data-interchange format used to transmit data objects consisting of attribute–value pairs. JSON uses a "self-describing" text format that is easy for humans to read and write, and that can be used as a data format by any programming language. content: