All of the code and examples for this lesson is located in the netprog_basics/programming_fundamentals/rest_part_1
directory. Clone and access it with the following commands:
git clone https://github.com/CiscoDevNet/netprog_basics
cd netprog_basics/programming_fundamentals/rest_part_1
Be sure to complete the General Workstation Setup instructions before beginning this lesson.
In this lesson the Linux utility curl
is used to send basic REST API requests. On Linux and OS X, curl
is available and installed by default.
Windows does not come with curl
by default, but today there are several options for running Linux utilities like curl
on Windows with ease. Here are two options to use.
git bash
: When you install git for Windows, it includesgit bash
which is a bash shell option for Windows that includes common Linux tools such ascurl
. Just startgit bash
and work as if you are within bash on Linux.Ubuntu Bash
: If you are on Windows 10 you can install Ubuntu Bash using the Linux Subsystem for Windows. Once installed you can run the Ubuntu Bash Shell and work within Linux from Windows.
This lesson leverages the IOS XE on CSR Recommended Code Always On Sandbox. This sandbox requires no reservation or VPN connection.
Note: In the video, a different DevNet Sandbox is used
When running the curl
for the RESTCONF example, leverage https://ios-xe-mgmt.cisco.com:9443
as the URL instead of https://10.10.20.21
.
You can download the slides for this lesson here.
Suggestion: Right click, "Open in new tab"