Cisco ACI – API Calls vs JSON POST

API Calls method

The fancy way of configuring Cisco ACI Fabric is by using Python script for generating API calls. Those API calls are then used to configure Cisco ACI by pushing those calls to APIC controller using POSTMAN (or similar tool). Configuration changes done this way are those that you are doing often and without much chance of making mistakes.

You write a Python script and that script will take your configuration variables and generate API call that will configure the system quickly and correctly every time.

The thing is that you need to take the API call example and use Python to write a script that will recreate that API calls with your variables of configuration and do that correctly. You need to know to code in Python and you will need a certain amount of time to write that script.

POST JSON file method

If you are making some initial configuration of ACI Fabric and you need to create 50 Bridge domains, or you need to quickly add 200 host routes to some EPG it will be slow to make those configs by clicking through the GUI but writing Python script which will generate API call for that config will surely take a lot of time too. This is true if you do that kind of config for the first time and you don’t have that script ready.

The reasoning about this is that it is worth to write the script if the config mentioned will be used all the time, so you spend more time in the beginning to write the script and then every next time this script will do the job for you. But if it is a config that will be used once a year then maybe it isn’t worth the time you will spend on that script creation and POST of JSON will do.

The Difference

The thing to note is that by using API calls as a method you are able to add, edit and delete objects inside ACI configuration and POST of JSON will only enable you to add missing objects and it will not be able to delete stuff.

If you want to know more about how to use JSON config POSTing in ACI read further here.

One Response

  1. Nnanna Obuba December 30, 2019

Leave a Reply