Developer

 View Only
last person joined: 2 days ago 

Expand all | Collapse all

Aruba central: Rest api to create/configure external captive portal profile

This thread has been viewed 32 times
  • 1.  Aruba central: Rest api to create/configure external captive portal profile

    Posted Jan 31, 2023 11:52 PM
    Is there a way to create/configure external captive portal profile for a given group in aruba central using api?

    I am trying to create a guest wlan linked with a captive portal that can be created on the fly though api


  • 2.  RE: Aruba central: Rest api to create/configure external captive portal profile

    Posted Feb 01, 2023 04:10 AM
    Yes there are APIs to create new guest portals for cloud captive portal 
    https://developer.arubanetworks.com/aruba-central/reference/apiviewsexternal_apicreate_api_portal

    You can then create a new SSID in a group and set it to the newly created captive portal:
    https://developer.arubanetworks.com/aruba-central/reference/apiwlancreate_wlan_v2

    ------------------------------
    Thanks,
    Bjarne
    ------------------------------



  • 3.  RE: Aruba central: Rest api to create/configure external captive portal profile

    Posted Feb 01, 2023 12:26 PM

    @bkohnke  thanks! I think you are referring to cloud-guest type of captive profile which is set in the aruba controller itself. But I was referring to external captive profile which is visible in AP config > securities > authentication servers

    ​​

    I want to create this through api.

    The is a cli api to replace whole ap config where this can be configured but it looks very risky




  • 4.  RE: Aruba central: Rest api to create/configure external captive portal profile

    Posted Feb 03, 2023 04:40 AM
    I would configure the WLAN by hand once and then call different GET endpoints and see how the JSON config looks. I can't test it myself right now.

    But looking at the API documentation I also didn't find a point where to configure that.

    The CLI config could work, I never did that. But then you probably need a template group and that disables the GUI config in Central for that group. 
    And then with templates I would use variables to set or not set the config. Then you can just push the variables thorugh the API. That would probably be better than replacing the whole template every time. 



    ------------------------------
    Thanks,
    Bjarne
    ------------------------------



  • 5.  RE: Aruba central: Rest api to create/configure external captive portal profile

    Posted Feb 03, 2023 05:08 AM

    @bkohnke thanks,  get wlan details response does not have details  of  external captive portal, it's just linked with profile name.

    I am fairly new to this. So need to check and understand the templating you are referring to ​​




  • 6.  RE: Aruba central: Rest api to create/configure external captive portal profile

    Posted Feb 03, 2023 05:15 AM
    Aruba has a basic templating language so that you can create CLI configs and parse variables. You can bind variables to each device. 

    I only use that for more complex switch configs, where the UI does not fulfill all requirements, but you could also do that with Instant.


    I would manually create an example CLI config with all features I need, then copy that to notepad and start adding variables. 
    For example a variable to check if one SSID should be enabled or disabled. Or what IP to put into the authentication server config.
    Or the hostname, etc.

    Then you can import a variable file to Central and add the template to the group.

    https://www.arubanetworks.com/techdocs/central/latest/content/nms/access-points/cfg/cfg-templates/bst_prac_prov_template_iap.htm

    ------------------------------
    Thanks,
    Bjarne
    ------------------------------



  • 7.  RE: Aruba central: Rest api to create/configure external captive portal profile

    Posted Feb 03, 2023 05:24 AM
    thanks for the direction @bkohnke!  
    will check​