
I’ve been doing some automation work lately that involves validating specific state information for AOS-CX switches.
Being a good digital citizen, I reached straight for the Central MRT API.
I very quickly discovered that the things I needed to check weren’t covered by the API.
Looking at the Postman Collection, the MRT API can show basic info on hardware, interfaces, VLANs, stacking, PoE, VSX.

But what about STP, OSPF, BGP, NTP, PIM, AAA, QoS? And all the rest of the TLAs?
show me how to live?
As a hack workaround, you can run a fixed list of ‘show’ commands via the API and read the result – but parsing unstructured text is not the way.
Classic Central offers a few different show commands that aren’t on the Central MRT list but we’ve still got the problem of unstructured text, and Classic Central’s days are numbered.
Go straight to the source
The best option for the most complete dataset in one place turns out to be the AOS-CX REST API. It’s a one-stop shop.
Unfortunately it means connecting to each device directly from inside the network. Aren’t these cloud managed switches though?

And here’s the pitch!
What if there was a way to access the full AOS-CX REST API in all its glory from Central?
Then we could get the best of both worlds: A rich API with the convenience of cloud accessibility.
Most of the puzzle pieces already exist:
- An authenticated WebSocket between Central and the switch
- A mechanism for Central to send GET requests to the AOS-CX REST API through the WebSocket and process the response (this is in fact where some of the data shown in Central comes from)
- A northbound API that allows you to query a specific switch based on its serial number
All I want for Christmas is…JSON
Dear HPE,
I promise I’ve been good this year.
Please can you build an API proxy so that we can make GET requests to the AOS-CX REST API via Central?
We’ll even buy Advanced Central Subscriptions.
Crispy
P.S. Enjoy the cookies!
(Seriously, don’t forget to reference the cookie ID for subsequent requests after logging in to the AOS-CX REST API!)
An application diagram is worth 1000 words
Here is an example of what this feature could look like if implemented:

Sharing is caring
If you think this would be useful, please share this with your local SE team!