2.4 Lab - RESTCONF With Postman - ILM
2.4 Lab - RESTCONF With Postman - ILM
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Setup HTTP Headers in Postman
Background / Scenario
RESTCONF is a RESTful API interface that provides a programmatic interface for accessing data defined in
YANG device models.
In this lab, you will learn how to interact with the RESTCONF interface using the Postman application to
retrieve the device’s configuration, update and create new interfaces and retrieve operation data.
Required Resources
Postman
Access to a router with the IOS XE operating system version 16.6 or higher.
Instructions
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 4 www.netacad.com
Lab – RESTCONF with Postman
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 4 www.netacad.com
Lab – RESTCONF with Postman
b. In the URL for the API endpoint, enter after the host and port portion:
/restconf/data/ietf-interfaces:interfaces to retrieve data defined in the ietf-interfaces
YANG model in the interfaces container.
c. Click Send to send the RESTCONF API request. With unchecked Accept header or the Accept header
set to application/yang-data+xml, the result YANG data are returned in XML encoding.
d. Check the Accept header and set it to application/yang-data+json to receive YANG data
formatted in JSON encoding.
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 4 www.netacad.com
Lab – RESTCONF with Postman
d. Click Send to create a new interface Loopback99 with the IP address 99.99.99.99/24.
e. In the Output (scroll down), you should see the HTTP Error code 201 Created indicating that the new
interface has been created:
f. Verify using the IOS CLI that the new Loopback99 interface has been created (sh ip int brief).
g. Update the RESTCONF API request to delete the interface Loopback99.
Question
h. What changes were needed to be made in the RESTCONF request to delete the interface?
Change the HTTP Request Method from PUT to DELETE.
End of Document
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 4 www.netacad.com