CCNP ENCOR lab 32 of 36
RESTCONF, REST response codes and API security
Manage an IOS XE router over HTTPS with RESTCONF: read and change YANG data with curl and Python, trigger and explain every common response code, lock the API down, and read Catalyst Center and SD-WAN Manager API responses the way the exam presents them.
Run this lab
It needs Lite: its 2 nodes are set to 3 vCPU and 5,120 MB in total. That fits the free demo too.
In your workspace: Shared, then CCNP ENCOR 350-401 guided labs, then 32 - RESTCONF REST response codes and API security
- Level
- Intermediate
- Time
- About 75 minutes
- Nodes need
- 3 vCPU, 5,120 MB
- Smallest plan
- Lite
The scenario
Fernhill Freight's web developers want to build a self-service portal for branch loopback and VLAN requests. They don't want SSH or XML: they want an HTTPS API with JSON. RESTCONF on the NOC's IOS XE router (CSR1) gives them exactly that, using the same YANG models as NETCONF. You'll enable and secure it, work through every verb and the response codes the portal must handle, and then read responses from Fernhill's Catalyst Center and SD-WAN Manager APIs, which the portal will also call.
| Device | Interface | Address |
|---|---|---|
| CSR1 (IOS XE 17.3) | Gi1 | 10.10.50.1/24 |
| NMS (Ubuntu desktop) | eth0 | 10.10.50.100/24 |
RESTCONF account: admin / Fh-Restconf-2026 (privilege 15). On NMS (terminal: Applications → System Tools → MATE Terminal):
/opt/lab/rc.sh METHOD PATH [BODY-FILE]callshttps://10.10.50.1/restconf/data/PATHwith curl and prints the body andHTTP <code>. Read it: it shows the exact headers RESTCONF needs./opt/lab/rc_report.pyis a Pythonrequestsscript./opt/lab/catalyst-center/and/opt/lab/sdwan-manager/hold saved API responses.
Topology: CSR1 Gi1 — NMS eth0.
What you’ll practise
- Map HTTP methods to CRUD operations and build RESTCONF URIs from YANG paths
- Enable RESTCONF on IOS XE and restrict who can reach the API
- Create, update, read and delete configuration with PUT, PATCH, GET, POST and DELETE
- Interpret response codes (200, 201, 204, 400, 401, 404, 409) and JSON payloads
- Describe REST API security and the Catalyst Center and SD-WAN Manager authentication flows
The tasks
- REST in five minutes
- Enable and protect RESTCONF
- Read with GET
- Create with PUT
- Change with PATCH, read it back
- Trigger the errors on purpose
- Use Python
- Read Catalyst Center and SD-WAN Manager responses
The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.
Topology and devices
The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.
Every link, as text
- CSR1
Gi1to NMSeth0
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| CSR1 | Cisco CSR 1000v | csr1000vng-universalk9.17.03.08a-serial | 2 vCPU, 4,096 MB |
| NMS | EVE-NG GUI server (Docker) | eve-gui-server:latest | 1 vCPU, 1,024 MB |
How to open this lab
Sign in to your workspace at
lab.cloudlabbox.com.In File Manager, open Shared, then the folder
CCNP ENCOR 350-401 guided labs.Open
32 - RESTCONF REST response codes and API securityand start its nodes, then open Lab Tasks for the scenario and the steps.
The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.
More CCNP ENCOR labs
Related labs in other courses
CloudLabBox is independent of Cisco. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.