Developer

last person joined: 2 days ago 

Expand all | Collapse all

How to use "?" (question mark) with ArubaOs 8 "show commands" API

This thread has been viewed 9 times
  • 1.  How to use "?" (question mark) with ArubaOs 8 "show commands" API

    Posted Apr 26, 2021 12:01 PM
    Hey all, I'm new;   first post here, also new to Aruba architecture.

    I am developing a set of calls against the ArubaOs 8 API on a mobility Master for a project. I want to see "all available options" for populating a webform drop down to select from. The contents (API response) should be a list of "all available AP group names".   The CLI has a very fast, easy and intuitive way to display this information:

    CLI:
    show ap-group ?
    output:
    default
    <group1>

    <group2>
    NoAuthApGroup
    <group3>
    <group4>
    <...>
    <profile-name> Profile name
    | Output Modifiers
    <cr>

    This output is nearly perfect for what I need, however, leaving out the ?, and instead pressing Enter only yields the default group and noauth group. Not what I need.

    I don't see an applicable API call for doing this question mark functionality directly (feel free to reply with this if it exists).
    There is the famous "show commands" API that could work, but when I try it, there is an obvious problem that it fundamentally changes the URL string that I am sending.... since question marks have special meaning.

    API:
    https://<mmFQDN>:4343/v1/configuration/showcommand?command=show+ap-gorup+?&UIDARUBA={{mmtoken}}
    I get:
    <empty body>

    One might think that you could encode the ? as %3F, but that yields the same empty body.
    All this not to mention that the "?" never even shows up when doing the CLI command.

    How does one achieve the CLI ? functionality with the API?



    ------------------------------
    :-Dan Watkins
    Ohio State University
    ------------------------------


  • 2.  RE: How to use "?" (question mark) with ArubaOs 8 "show commands" API

    Posted Apr 27, 2021 08:12 AM
    Hi,

    There is a typo on your URL (gorup => group)

    Not sure if it is possible to use "?" on show commands

    but if you want to have list of ap group, there is a API call for this...

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