Developer

last person joined: 2 days ago 

Expand all | Collapse all

Aruba Central API: Rename an AP and other POST methods

Jump to Best Answer
This thread has been viewed 47 times
  • 1.  Aruba Central API: Rename an AP and other POST methods

    Posted May 10, 2019 08:40 AM

    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



  • 2.  RE: Aruba Central API: Rename an AP and other POST methods
    Best Answer

    Posted May 16, 2019 03:11 PM

    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



  • 3.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted May 16, 2019 03:39 PM

    Hi Karthik,

     

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

     

    Again, thank you.

     

    Cheers,

     

    Conor



  • 4.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Jul 08, 2019 05:07 AM

    Hi Karthik,

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



  • 5.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Jul 15, 2019 02:14 PM

    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



  • 6.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Dec 02, 2019 02:34 AM

    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.



  • 7.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Dec 02, 2019 03:38 AM

    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



  • 8.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Dec 02, 2019 04:56 AM

    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.



  • 9.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Dec 03, 2019 02:31 PM

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

     



  • 10.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Dec 03, 2019 02:47 PM

    @alagoutte wrote:

    No API call for rename a AP ?!

     


    No, not for APs in UI Groups



  • 11.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Dec 11, 2019 04:38 PM

    Hi Michal,

     

    Keep an eye for these endpoints to be available soon in Aruba Central update.

     

    /configuration/v1/swarm_config/{guid}

    Sample Payload:

    {
      "name": "SWARM2",
      "ip_address": "2.2.2.2"
    }

    /configuration/v1/ap_settings/{serial_number}

    Sample Payload:

    {
      "hostname": "AP2",
      "ip_address": "2.2.2.2"
    }

    Other API endpoints that could be useful

    /device_management/v1/device/{serial}/action/{command}

    /device_management/v1/swarm/{swarm_id}/action/{command}



  • 12.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Jan 06, 2020 01:42 PM

    Hei Karthik,

     

    Regarding the new API endpoints for AP settings, specifically

    /configuration/v1/ap_settings/{serial_number}

    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?

     

    Cheers,

     

    Conor



  • 13.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Jan 12, 2020 12:17 AM

    Hello,

     

    Sounds like a good solution. However the following link you posted is no longer live, can you point us to an updated one?

     

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



  • 14.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Jan 12, 2020 04:10 AM

    Here is the direct link the the `AP Settings` API endpoint.

     

    https://eu-apigw.central.arubanetworks.com/swagger/central/#!/AP_Settings/api_ap_settings_get_ap_settings

     

    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.



  • 15.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Apr 29, 2020 10:02 AM

    Hi, I am following the thread to rename the AP and is not able to access the mentioned API:

    https://eu-apigw.central.arubanetworks.com/swagger/central/#!/AP_Settings/api_ap_settings_get_ap_settings

     

    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. 

     

    Thanks,



  • 16.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Apr 29, 2020 01:37 PM

    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



  • 17.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Apr 29, 2020 01:59 PM

    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. 

     

    Thanks,

    Ankur



  • 18.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Apr 29, 2020 05:38 PM

    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.

    https://help.central.arubanetworks.com/latest/documentation/online_help/content/access-points/cfg/cfg-templates/prov_template_iap.htm?Highlight=template

     

    https://help.central.arubanetworks.com/latest/documentation/online_help/content/nms/template-variables.htm

     

    Once you are familiar with this concept feel free to explore API based template & variables upload in the API gateway swagger interface.



  • 19.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Oct 22, 2020 02:48 PM

    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_0-1603392459108.png

     



  • 20.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Oct 24, 2020 05:01 AM

    @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.

     

    pmar_0-1603392459108.png

     


    We don't see the screenshot

    can also coming from a wrong request

    What do you POST ?



  • 21.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Apr 29, 2020 04:48 PM

    Can i get a Step by step guide on creating this



  • 22.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Dec 11, 2020 03:55 PM
    Hi, We have pycentral SDK which has a workflow to change the AP Settings including the name.

    Link to the SDK: https://developer.arubanetworks.com/aruba-central/docs/python-using-api-sdk
    Link to the AP Settings workflow: https://developer.arubanetworks.com/aruba-central/docs/python-workflows-rest-api#section-update-ap-settings-rename-an-ap

    ------------------------------
    Karthikeyan Dhandapani
    ------------------------------



  • 23.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Mar 04, 2021 01:26 PM
    Hi Guys,

    I am trying to update following parameters in AP setting.  Can someone help with this please.

    • AP Name
    • RF Zone
    • IP Address
    • Subnet Netmask
    • Default Gateway
    • DNS
    • Uplink VLAN
    But the only options i can see are below.

    API Endpoint Path: /configuration/v2/ap_settings/{serial_number}
    {
      "hostname": "<ap-name>",
      "ip_address": "<ip-address>",
      "zonename": "<zone-name>",
      "achannel": "<achannel-num>",
      "atxpower": "<atxpower-num>",
      "gchannel": "<gchannel-num>",
      "gtxpower": "<gtxpower-num>",
      "dot11a_radio_disable": <true/false>,
      "dot11g_radio_disable": <true/false>,
      "usb_port_disable": <true/false>
    }
    Thanks
    Tariq


    ------------------------------
    Tariq Shaikh
    ------------------------------



  • 24.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted Mar 07, 2021 03:03 PM
    Hi Tariq, it will be better to open a new thread/topic

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

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

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

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------



  • 25.  RE: Aruba Central API: Rename an AP and other POST methods

    Posted May 04, 2021 12:10 PM

    What line items are needed for a typical setup? Something like this?

    • A 7010 controller

    • X number of unified APs

    • X number of AP licenses

    • A support contract (Foundation Care?) Is this per AP? Per controller?

    What else?



    ------------------------------
    Kurt Kuvalis
    ------------------------------