AOS 8

The AOS 8 Developer Hub

Welcome to the AOS 8 developer hub. You'll find comprehensive guides and documentation to help you start working with AOS 8 APIs as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Showcommand API

In this section we will see how to use the showcommand API. This type of API is used for obtaining an output of regular CLI show commands using API. Most of the show commands present a well structured JSON response.

Syntax for a GET request using cURL to use show commands over API:

curl --insecure -b "aruba-cookie" -X GET -i 'https://<mcr-ip>:4343/v1/configuration/showcommand?command=<show-command>&UIDARUBA=<session-token>'

Note

--insecure or -k option can be used with the cURL command if the certificate of the Mobility Conductor cannot be validated
-b is used to read the cookie from "aruba-cookie" file
-i is used to include protocol headers in the output

Description of user-specific values used in the cURL example

cURL values - Showcommand

cURL values - Showcommand

Showcommand API Request

Request URL:
https://<mcr-ip>:4343/v1/configuration/showcommand

Request Query Params:
command = <show-command>
UIDARUBA = <session-token>

Request Headers:
Content-Type: application/json
Accept: application/json
Cookie: SESSION= <session-token>

Request Payload:
None

 

Sample response for showcommand API request:

{
  "Vlan Status": [
    {
      "AAA Profile": "N/A",
      "Adminstate": "Enabled",
      "IPAddress": "111.1.1.1/255.0.0.0",
      "Mode": "Regular",
      "Nat Inside": "Disabled",
      "Operstate": "Up",
      "Option-82": "Disabled",
      "PortCount": "1",
      "Ports": "GE0/0/0",
      "VlanId": "198"
    }
  ],
  "_meta": [
    "VlanId",
    "IPAddress",
    "Adminstate",
    "Operstate",
    "PortCount",
    "Nat Inside",
    "Mode",
    "Ports",
    "AAA Profile",
    "Option-82"
  ]
}

Note

Most of the showcommand API response will give structured JSON response.

Updated 4 months ago


Showcommand API


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.