cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1810
Views
0
Helpful
3
Replies

REST API command reverse engineering

Walter Dey
VIP Alumni
VIP Alumni

If I create a complete tenant configuration: tenant, virtual network, bd,......

Is there a way to findout the sequence of REST API Calls that would create this configuration; could be used to define scripts ?

In UCS there is a nice feature, that allows UCSM configuration mapped to a sequence of UCS powershell commands !

 

 

1 Accepted Solution

Accepted Solutions

lpember
Level 1
Level 1

Hi Walter,

There is a tool in the ACI GUI called the API Inspector. If you click at the top right of the screen you will get a dropdown box with the option "Show API Inspector". This will show you the REST API calls that are occurring in the backend when you make configurations in the GUI. You can copy these and then run them independently of the GUI using tools like Postman (just make sure you authenticate first!). You can also copy the GET requests that are made if you want to use REST API calls to gather information about your fabric.

Does that answer your question?

 

View solution in original post

3 Replies 3

lpember
Level 1
Level 1

Hi Walter,

There is a tool in the ACI GUI called the API Inspector. If you click at the top right of the screen you will get a dropdown box with the option "Show API Inspector". This will show you the REST API calls that are occurring in the backend when you make configurations in the GUI. You can copy these and then run them independently of the GUI using tools like Postman (just make sure you authenticate first!). You can also copy the GET requests that are made if you want to use REST API calls to gather information about your fabric.

Does that answer your question?

 

Perfect ! Thanks for the quick answer !

Hi Walter,

 

To extend on what Leigh said, there are other options available as well.  Since you mentioned powershell, there is a whole powershell toolkit that also includes a tomcat server that can take what you do on the GUI and turn it into powershell commands.  

 

https://communities.cisco.com/community/technology/datacenter/sdn/aci-integrations/blog/2014/11/21/cisco-aci-powertool-beta-version-10

 

I'm more interested in python so I created a couple of tools that are available on Github to remotely capture the gui activity and either just log it or convert it to the ACI Python SDK (cobra) code.

 

https://github.com/datacenter/SimpleAciUiLogServer

 

https://github.com/datacenter/AryaLogger

 

Hope that helps,

 

Mike

Save 25% on Day-2 Operations Add-On License