Developer Community

Reply
New Contributor

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

Occasional Contributor I

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

New Contributor

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

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?

Occasional Contributor I

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

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