You are here: Home > Webhooks

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:

Creating and Updating Webhooks Through the UI

Refreshing Webhooks Token Through the UI

Creating and Updating Webhooks Through the API Gateway

List of Webhooks APIs

Sample Webhooks Payload Format for Alerts

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:

Alerts & Events

MSP Alerts

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 +Webhook.

a. Webhook Name—Enter a name for the Webhook

b. URLs—Enter the URLUniform Resource Locator. URL is a global address used for locating web resources on the Internet.. Click + to enter another URLUniform Resource Locator. URL is a global address used for locating web resources on the Internet.. You can add up to three URLsUniform Resource Locator. URL is a global address used for locating web resources on the Internet..

3. Click Save. The Webhooks is created and listed in the Webhook table.

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

Name—Name of the Webhooks.

Number of URL Entries—Number of URLsUniform Resource Locator. URL is a global address used for locating web resources on the Internet. in Webhooks. Click the number to view the list of URLsUniform Resource Locator. URL is a global address used for locating web resources on the Internet..

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—In the Webhook table, select the Webhook from the list and click icon to edit the Webhook. You can refresh the token and add URLsUniform Resource Locator. URL is a global address used for locating web resources on the Internet.. Click Save to save the changes.

Delete—In the Webhook table, select the Webhook from the list and click icon and click Yes to delete the Webhook.

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 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 APIApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software. Webhooks resource:

GET 

POST

PUT

DELETE

You can perform CRUD operation on the Webhooks URLUniform Resource Locator. URL is a global address used for locating web resources on the Internet. configuration. The key configuration elements that are required to use APIApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software. Webhooks service are Webhooks URLUniform Resource Locator. URL is a global address used for locating web resources on the Internet. and a shared secret.

A shared secret token is generated for the Webhooks URLUniform Resource Locator. URL is a global address used for locating web resources on the Internet. when you register for Webhooks. A hash key is generated using SHA256 algorithm by using the payload and the shared secret token. The APIApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software. 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 APIApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software. 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 APIsApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software. are listed under API Reference.

 

For more information on Webhooks APIsApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software., refer to https://app1-apigw.central.arubanetworks.com/swagger/central.

List of Webhooks APIs

Aruba Central supports the following Webhooks APIsApplication Programming Interface. Refers to a set of functions, procedures, protocols, and tools that enable users to build application software.:

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": "AAA", "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:

Access Point Alerts—Sample JSON

Switch Alerts—Sample JSON

Gateway Alerts—Sample JSON

Miscellaneous Alerts—Sample JSON

 

/*]]>*/