Developer Community

Reply
Highlighted
Occasional Contributor II

Aruba Central API: Rename an AP and other POST methods

Hello hello,

 

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.

 

Cheers,

Conor


Accepted Solutions
Highlighted
Aruba Employee

Re: Aruba Central API: Rename an AP and other POST methods

Hi Conor,

 

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.

http://help.central.arubanetworks.com/latest/documentation/online_help/content/public_cloud/applications/global_settings/groups/variables.htm 

 

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"

{
"device_id": "AD12412345",
"device_type": "IAP",
"label_id": <site-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.

 

Thanks,

Karthik

Technical Marketing Engineer

Aruba HPE

View solution in original post


All Replies
Highlighted
Aruba Employee

Re: Aruba Central API: Rename an AP and other POST methods

Hi Conor,

 

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.

http://help.central.arubanetworks.com/latest/documentation/online_help/content/public_cloud/applications/global_settings/groups/variables.htm 

 

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"

{
"device_id": "AD12412345",
"device_type": "IAP",
"label_id": <site-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.

 

Thanks,

Karthik

Technical Marketing Engineer

Aruba HPE

View solution in original post

Highlighted
Occasional Contributor II

Re: Aruba Central API: Rename an AP and other POST methods

Hi Karthik,

 

Thank you very much! That was extremely well written and wonderfully helpful.

 

Again, thank you.

 

Cheers,

 

Conor

Highlighted
New Contributor

Re: Aruba Central API: Rename an AP and other POST methods

Hi Karthik,

Is it also possible if IAP is in group which is NOT a template base?

Highlighted
Aruba Employee

Re: Aruba Central API: Rename an AP and other POST methods

Hi Michal,

 

It depends on what are you trying to configure.

 

For example,

If you are looking to set the country code in IAP, it can be set through API for IAP in UI group. 

/configuration/v1/country

 

To configure the WLAN, you could use this API

/configuration/v1/wlan/{group}/{wlan_name}

 

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.

 

Reference Link

 

Thanks,

Karthik

Technical Marketing Engnieer

Highlighted
New Contributor

Re: Aruba Central API: Rename an AP and other POST methods

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.

Highlighted
MVP Guru Elite

Re: Aruba Central API: Rename an AP and other POST methods

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



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
New Contributor

Re: Aruba Central API: Rename an AP and other POST methods

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.

Highlighted
MVP Guru Elite

Re: Aruba Central API: Rename an AP and other POST methods


@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 ?!

 



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
New Contributor

Re: Aruba Central API: Rename an AP and other POST methods


@alagoutte wrote:

No API call for rename a AP ?!

 


No, not for APs in UI Groups

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: