I'm trying to make my life easier when working with Aruba Central. One of the things I'm trying to do is rename APs, for example from: 'aa:bb:cc...' to 'ROOM101'. I have no trouble getting this information from the API, but I cannot for the life of me find any POST methods in the documentation to set the name of an AP, or for example, assign an API to a Site.
I'm using the API reference: https://eu-apigw.central.arubanetworks.com/swagger/central/
If anyone knows of an API to rename APs, or add an AP to a site in Aruba Central, I'd be very grateful.
1) To rename an AP through API, in the API reference go to configuration and choose devices.
- Add IAP to the template group. (POST /configuration/v1/devices/move)
In case you do not have a template group, create one (POST /configuration/v1/groups)
- Then you could manage the devices in the template group from templates and variables. You have a variable called "_sys_hostname" which can be used to rename the device. You could achieve all this with API.
2. To create site and add devices to site, in API reference page, choose Monitoring -> Sites.
- Create a site (POST /central/v2/sites)
- Use the API endpoint under labels to add device to the site (POST /central/v1/labels/associations).
In the payload, provide the site id value to "label_id"
In order to obtain the site_id you could make list sites API call or while creating the site, the site id will be present in the response message. Attached screen shots in this reply message for your reference.
Technical Marketing Engineer
Thank you very much! That was extremely well written and wonderfully helpful.
Again, thank you.
Is it also possible if IAP is in group which is NOT a template base?
It depends on what are you trying to configure.
If you are looking to set the country code in IAP, it can be set through API for IAP in UI group.
To configure the WLAN, you could use this API
In general to configure the device through API, when the group is 'template group', more detailed configurations can be made such as setting a hostname.
Technical Marketing Engnieer
We would like to be able to do the following things for APs in UI group:
- Change Swarm Mode
- Rename AP and VC
- Set 2.4G radio in Monitor mode
- Change gain and polarization for external antenna
Unfortunately doing this manually on hundreds of APs in Aruba Central is very time-consuming.
With API, it will be possible... but need to write some code for the moment ;-)
You can look already the aruba-central github with some python code for this
Well, it will be possible when they add API methods for this, at the moment for UI groups it's only possible to change country code as Karthik mentioned.
@michal.ambroziak wrote:Well, it will be possible when they add API methods for this, at the moment for UI groups it's only possible to change country code as Karthik mentioned.
No API call for rename a AP ?!
@alagoutte wrote:No API call for rename a AP ?!
No, not for APs in UI Groups
Keep an eye for these endpoints to be available soon in Aruba Central update.
Other API endpoints that could be useful
Regarding the new API endpoints for AP settings, specifically
I see that it is documented in the API documentation for Central 2.4.9, however both my python requests and the API documentation 'TRY' feature return a 404. It appears, to me at least, that the endpoint hasn't gone live yet, but is nonetheless documented. Do you know if that is the case?
Sounds like a good solution. However the following link you posted is no longer live, can you point us to an updated one?
Here is the direct link the the `AP Settings` API endpoint.
I should also note that the endpoint is now working after returning 404 for quite some time. I have successfully renamed all my APs using the endpoint in the link above.
Hi, I am following the thread to rename the AP and is not able to access the mentioned API:
Can you please help with the updated URL or guide the way to access the same.
Also, is there a way to change name of the WLAN (SSID) in a group.
Hi, if you follow the link it might not take you to the right place. Once you are in the api gateway swagger interface, you would need to navigate to the "Configuration" option in the URL dropdown, then choose "AP settings" under API reference.
Currently, to configure an SSID via API, you would need to use templates & variables within template groups. Then renaming SSID is changing a variable.
Thanks Karthik, I was able to find the AP Settings.
I checked the Template groups but do not see a way to create a new WLAN (SSID) with the parameters in the API. It seems more about assigning SSID in the template.
It would be helpful if you can guide me with a sample template/variables/details.
You are right. As of today, the API itself doesn't provide an option to configure SSID. But it allows to configure all configuration using templates. With the use of variables per device configurations are made possible. For example, you could have a common configuration that applies to the group and define variables for per device configuration changes such as hostname, SSID name, etc.
You can find more information about IAP SSID templates and variables here.
Once you are familiar with this concept feel free to explore API based template & variables upload in the API gateway swagger interface.
I'm having difficulties with changing the AP name via APIs. Below is a screen shot from Postman with error 500, which would indicate something on the server side.
@pmar wrote:I'm having difficulties with changing the AP name via APIs. Below is a screen shot from Postman with error 500, which would indicate something on the server side.
We don't see the screenshot
can also coming from a wrong request
What do you POST ?
Can i get a Step by step guide on creating this
At Aruba, we believe that the most dynamic customer experiences happen at the Edge. Our mission is to deliver innovative solutions that harness data at the Edge to drive powerful business outcomes.
© Copyright 2021 Hewlett Packard Enterprise Development LPAll Rights Reserved.