This post will walk through on how to configure a WiFi Network using APIs. This will be helpful to any Developer or Automation Engineer to get started with APIs available in ArubaOS 8 and do their further exploration. You might find the "Inputs" used in the "POST Body" useful.
My Setup:
The following is how the Setup looks, I am going to configure an SSID called “API-Demo” on the cluster using API calls.
I will be using Postman tool and will also share the equivalent Container and Object which was referred in the Swagger UI.
The following is my Configuration Node hierarchy.
I will be creating all the configurations on the Group “/md/Campus-A”
Assumption:
Mobility Master and Managed Devices are UP and running.
The APs are terminated on the Cluster.
Swagger UI:
Swagger UI can be accessed using the following link
https://<MM-IP-Address>/api/
Postman
Get Postman downloaded and installed on your Windows or Mac. Now let’s get started.
Controller Login:
First I need to login into the Controller in order to start configuring.
I will be getting an "UIDARUBA": "0a94f2e6-a967-458d-bcc9-ebea0cf3c15c" which will be used in subsequent API calls.
Create User VLAN:
Swagger UI:
CONTAINERS | Interfaces |
OBJECT | POST /object/vlan_id |
Postman:
Create Dot1x Auth Profile:
Swagger UI:
CONTAINERS | Authentication |
OBJECT | POST /object/dot1x_auth_profile |
Postman:
Create AAA Profile:
Swagger UI:
CONTAINERS | Authentication |
OBJECT | POST /object/aaa_prof |
Postman:
Create SSID Profile:
Swagger UI:
CONTAINER | WLAN |
OBJECT | POST /object/ssid_prof |
Postman:
Create Virtual AP Profile:
Swagger UI:
CONTAINER | WLAN |
OBJECT | POST /object/virtual_ap |
Postman:
Link to AP-Group:
Swagger UI:
CONTAINER | WLAN |
OBJECT | POST /object/ap_group |
Postman:
Write Memory:
Swagger UI:
CONTAINER | Controller |
OBJECT | POST /object/write_memory |
Postman:
Verification:
Verifying if "API-Demo" SSID is created:
EXTRAS - BONUS :)
1) Getting VLANS:
How to get the VLAN configured in the Controller 192.168.17.177 (/md/Campus-A/20:4c:03:15:b9:9c)
Swagger UI:
CONTAINER | Interfaces |
OBJECT | GET /object/vlan_id |
Postman:
2) Show Commands:
3) Enable/Disable SSID:
Swagger UI:
CONTAINER | WLAN |
OBJECT | POST /object/ssid_prof |
Postman:
Disable SSID:
Enable SSID:
Hope you find this useful. Please post your feedback !
Regards,
Kapildev Erampu