Cisco DevNet - Lab 10: SD-WAN REST API

SD-WAN REST API

In Lab 10, participants delve into the world of SD-WAN (Software-Defined Wide Area Networking) by focusing on the REST API (Representational State Transfer Application Programming Interface). This hands-on lab is structured to provide participants with practical experience in working with SD-WAN REST APIs for network programmability. Participants typically engage in activities such as authenticating with the SD-WAN controller, retrieving device information, and making dynamic configurations using RESTful principles. This lab underscores the significance of programmable interfaces in the context of SD-WAN, empowering participants to automate and orchestrate network operations efficiently. By working with SD-WAN REST APIs, participants gain valuable insights into the programmability features that enhance the agility and flexibility of SD-WAN solutions within the Cisco DevNet ecosystem.

Lab:

Cisco SD-WAN vManage provides a REST API interface and its functionality over REST API. The REST API documentation for cisco vManage can be found at the following link: https://sdwan-docs.cisco.com/Product_Documentation/Command_Reference/Command_Reference/vManage_REST_APIs

A Swagger based documentation is also provided at the following URL:
https://30.0.0.100:8443/apidocs

This documentation gives you the option of interacting with the API and to see how the schema of the API is organized.

Step 1: Exploring Swagger Interface

Explore the API by trying out some REST calls in the swagger interface. The username is admin and password is admin.

Monitoring – Device Details

try out the GET call for the /device endpoint that can be found under Monitoring – Device Details.

Click on /devices

the output will be as below

Click on Try it out

You will see request URL created for Rest API call to get devices details
https://30.0.0.100:8443/dataservice/device

the following output shows the Response Body and Response Header received for this request.

Response code 200 means success.

The output will be in JSON format as seen below:

We can see that the output of this call is verbose and contains a lot of useful information.

Monitoring – Device Config

try out the GET call for the /device config that can be found under Monitoring – Device Details.

For the deviceId parameter give the ip address of device that we want to monitor.

We will use IP address of our vManage device to monitor its configuration.

In this example we will use the web browser to send rest api get request.
https://30.0.0.100:8443/dataservice/device/config?deviceId=123.123.123.123

section We can see that the output of this call is verbose and contains a lot of useful information.