Cisco ACI – Programmability – Using REST APIs

I thought I’d take a break from the series of writing how to setup Cisco ACI and talk a little bit about the programmability features available within ACI. Any of the other articles I’ve written where I’ve shown how to set things up using the GUI, you can also do by using REST API calls to the Cisco Application Policy Infrastructure Controller (APIC). You can write python scripts incorporating these calls to orchestrate things, or we can simply just use a REST client, available for free, to make API calls that will do anything from setting up the initial fabric to creating End Point Groups and probably anything else you can think of.

To start we’re going to use the POSTMAN REST client. It can be downloaded for free from the Chrome Web Store. You can use any other REST client if you prefer one from Mozilla, for example.  Within Postman we make GET, PUT, POST, and DELETE calls to the API (there are other calls, but these are the four used most). We then use XML or JSON code in the payload which is where the programmability occurs. In the picture below we see the saved collections on the left. We can see that I’m using the POST method in the main window. When I click on Body I see the JSON payload which in this example is configuring Leaf 1 in our fabric.

To read more click here.