Skip to content

Latest commit

 

History

History
 
 
Before you begin

You will need to download and setup a few items before you can begin coding along with us.

    Download the Coding 101 sample code and slides
    Your favorite text editor (text wrangler, notepad ++, sublime text etc.)
    Postman Rest Client for Chrome
    Python
        Python is normally pre-installed on Mac OS and most Linux distributions.
        You can also install Python on Windows.
        First, check see if you have Python installed on your system.
        Go to your command prompt and type “python”.
        If you get an error, follow the installations to install python for your system type from this page - http://learnpythonthehardway.org/book/ex0.html
    You will also need to install the Requests Library for Python.
        This is a library that makes it very easy to call REST APIs.
        Follow the instructions to install it here - http://docs.python-requests.org/en/latest/user/install/#install


This download contains the following python examples:

* apic-em-helloworld.py – “hello world” type example to show list of devices
* learning-lab-basics.py – Retrieves device list and pretty prints JSON
* learning-lab-basics-step2.py – Retrieves network device list and parses JSON to display networkDeviceId values
* learning-lab-basics-step3.py – Retrieves and lists all devices, hosts, policies and configured applications
* learning-lab-create-policy.py – Shows how to create a new policy using the POST Method