What Does RESTCONF Mean?
This page mentions older exam versions. See the Current Exam Context and Legacy Exam Context sections below for the updated mapping.
On This Page
Quick Definition
RESTCONF lets you configure and monitor network equipment, like routers or switches, by sending simple web requests instead of using complex command-line commands. It uses standard web technologies (HTTP and JSON or XML) that many IT professionals already know, making network automation easier to learn and implement. Think of it as a way to talk to a network device using the same kind of web service calls that power websites and mobile apps.
Commonly Confused With
NETCONF is another YANG-based network management protocol, but it uses SSH for transport and XML for data encoding. RESTCONF uses HTTP/S and supports both JSON and XML. NETCONF operates over an RPC-based session model, while RESTCONF follows a stateless RESTful model. Both can manage the same YANG data, but the transport and API style differ.
To get interface status via NETCONF, you open an SSH session and send an XML RPC. With RESTCONF, you just send an HTTP GET to a URL and get back JSON.
RESTCONF is a specific REST API designed for network management using YANG data models, while a general REST API could be any web service that follows REST principles. RESTCONF has predefined URIs, headers, and data formats dictated by YANG, making it a specialized case of a REST API. All RESTCONF APIs are RESTful, but not all REST APIs are RESTCONF.
A weather REST API returns weather data in JSON; RESTCONF returns network device config in JSON, but with specific YANG structure and authentication methods.
gRPC is a high-performance, remote procedure call framework that uses HTTP/2 and Protocol Buffers for serialization, whereas RESTCONF uses HTTP/1.1 or HTTP/2 and JSON/XML. gRPC is more suited for microservices and low-latency communication, while RESTCONF is tailored for network device configuration. They are not directly interchangeable for network management.
If you need to stream real-time telemetry from a router, gRPC might be better. If you need to update a VLAN config, RESTCONF is the standard choice.
Must Know for Exams
RESTCONF is a relevant topic in several major IT certifications, especially those that include network automation and programmability. In the Cisco CCNA 200-301 exam, the 'Automation and Programmability' section (which accounts for about 15% of the exam) explicitly covers RESTCONF. Candidates are expected to understand how RESTCONF compares to NETCONF, what HTTP methods (GET, POST, PUT, PATCH, DELETE) correspond to which operations, and how to interpret JSON or XML payloads.
The exam objectives also require knowledge of YANG models and the concept of datastores. For the Cisco CCNP Enterprise (350-401 ENCOR), RESTCONF is covered in more depth as part of the automation objective. CCNP candidates must not only understand the protocol but also be able to troubleshoot RESTCONF responses, interpret error codes, and design automation scripts that use RESTCONF.
Similarly, the CCNP Security (350-701 SCOR) may touch on RESTCONF in the context of securing network management interfaces, including authentication methods and encryption. In the Juniper JNCIA-Junos track, RESTCONF is less prominent, but Juniper devices do support it, and candidates may encounter it in the broader context of Junos automation features like pyEz and Ansible. The Juniper JNCIA-DevOps certification (JNCIA-DevOps) specifically covers RESTCONF and NETCONF as key APIs for device management.
For the CompTIA Network+ (N10-008), RESTCONF is not a direct exam objective, but understanding the concept of network automation and APIs is part of emerging technologies. It may appear in a multiple-choice question about common network management protocols or automation tools. The Cisco DevNet Associate (200-901) exam heavily features RESTCONF because it is a core technology for network programmability.
DevNet candidates must be able to construct RESTCONF requests, parse responses, and use tools like Postman or curl to interact with devices. They also need to understand YANG data models and how to use them with RESTCONF. In all these exams, RESTCONF typically appears in multiple-choice questions, drag-and-drop matching of HTTP methods to operations, and scenario-based questions where the candidate must choose the correct API call to achieve a specific configuration change.
For example, a question might present a network topology, a desired configuration change, and ask which RESTCONF request (method and URI) the administrator should use. Another common question type involves interpreting an error response, such as a 405 Method Not Allowed, and determining why the request failed. Understanding the distinction between RESTCONF and NETCONF is a frequent trap, as both protocols use YANG but differ in transport and encoding.
RESTCONF is a high-yield topic for exams that include automation, and candidates should be prepared for both conceptual and practical questions.
Simple Meaning
RESTCONF is a way for network administrators to talk to network devices, like routers or switches, using the same language that web browsers and websites use. Instead of typing difficult commands or using proprietary software, you send simple web requests. To understand this, imagine you want to change the temperature in a smart home.
Without RESTCONF, you might have to walk over to the thermostat and push buttons (like logging into a device and typing commands). With RESTCONF, you can just send a text message to the thermostat saying, 'set temperature to 72.' The thermostat understands the request and changes itself.
RESTCONF does the same for network devices: you send them a message over the network using HTTP (Hypertext Transfer Protocol), which is the same protocol that loads web pages. You can ask the device for its current settings, and it replies back with data in a structured format like JSON (a simple way of organizing information). You can also send new settings, delete old ones, or create new features.
The beauty of RESTCONF is that it is based on a standard called YANG (Yet Another Next Generation), which acts like a blueprint. YANG defines what settings and data a device can understand. So when you send a request, you know exactly what to type and what to expect back.
This consistent and predictable method is much easier to automate than manually typing commands over and over. It also works with many brands of equipment because it follows an industry standard, not a proprietary system. This means you can learn one method and use it across different vendors, which is a huge time saver.
In short, RESTCONF turns network management into something similar to working with a modern web API, making it accessible to IT professionals who may not be expert network engineers.
Full Technical Definition
RESTCONF is a network management protocol defined by the IETF in RFC 8040. It provides a programmable interface for accessing data and configuration defined in YANG datastores, using the RESTful architectural style. The protocol operates over HTTP or HTTPS and supports standard HTTP methods: GET, POST, PUT, PATCH, and DELETE.
These methods correspond directly to Create, Read, Update, and Delete (CRUD) operations on the YANG-defined data. For example, a GET request retrieves configuration or state data, a PUT request creates or replaces a resource, and a DELETE request removes a resource. RESTCONF uses either XML or JSON as the data encoding format, with JSON being more common in modern implementations due to its lightweight nature and widespread use in web development.
Each RESTCONF request targets a specific URI (Uniform Resource Identifier) that maps to a YANG data node. The base URI typically follows the pattern /restconf/data/{yang-module}:{data-node}. The protocol also supports query parameters for filtering, such as ?
depth=1 to limit the depth of returned data, or ?fields=name;status to retrieve only specific sub-elements. In terms of practical implementation, a network administrator or automation script sends an HTTP request to the device’s RESTCONF endpoint.
The device authenticates the request, typically using HTTP Basic Authentication or token-based authentication, and then processes the request against its operational or running datastore. The device responds with an HTTP status code: 200 for success with data, 201 for successful resource creation, 204 for successful deletion with no content, or 4xx/5xx for errors. The response body includes the requested data in the specified format.
RESTCONF is closely related to NETCONF, another YANG-based management protocol, but it differs in its use of lightweight HTTP instead of the more complex SSH-based RPC mechanism. RESTCONF is simpler to integrate with web-based tools, scripting languages like Python, and orchestration platforms such as Ansible or Puppet. Many modern network devices from Cisco, Juniper, Arista, and others support RESTCONF, making it a key technology for network automation, DevOps, and intent-based networking.
IT professionals working toward certifications like CCNA, CCNP, or JNCIA often encounter RESTCONF as a core automation concept, particularly in objectives related to programmability and configuration management.
Real-Life Example
Imagine you are the manager of a large office building with hundreds of rooms, each containing a thermostat. In the old way of managing these thermostats, you would have to physically walk to each room, open the thermostat cover, and twist a dial or press buttons to change the temperature. This is like the traditional command-line interface (CLI) for network devices, you have to log in to each device separately and type commands.
Now, suppose a central building management system is installed. Each thermostat is connected to a central computer via a network. You sit at your computer and open a simple web page.
On that web page, you type a command like 'Room 312: set temperature to 72 degrees.' The central computer sends that request to the thermostat in room 312. The thermostat reads the request, adjusts itself, and sends back a confirmation message: 'Done.
Current temperature is 72.' This is exactly what RESTCONF does. The central computer is like a network automation tool. Each thermostat is like a network device. The request you typed is an HTTP request.
The confirmation is an HTTP response. And the format in which you typed 'Room 312: set temperature to 72' is like a structured JSON or XML message. This system works because everyone agreed on a common language, the YANG model, that defines what 'temperature' means, what units to use, and what actions are allowed (like set, get, or delete).
So, without knowing the inner wiring of each thermostat brand, you can manage all of them the same way. For IT professionals, this analogy shows how RESTCONF removes the need for memorizing different command sets for each vendor. Instead, you learn one web-based method and apply it across Cisco, Juniper, Arista, or any standard-compliant equipment.
The building manager’s life becomes much easier, and mistakes are reduced because the system automatically checks that your request is valid before sending it.
Why This Term Matters
RESTCONF matters because it is a cornerstone of modern network automation, which is increasingly required in enterprise IT environments. Network administrators used to spend hours logging into dozens of devices one by one to apply configuration changes or gather information. This manual process is slow, error-prone, and does not scale.
RESTCONF changes that by allowing automation scripts to programmatically manage devices at scale. For example, if an organization needs to update the VLAN configuration on 500 switches, a Python script can send a single RESTCONF request to each switch in sequence, or even in parallel, completing the task in minutes instead of days. This not only saves time but also reduces human errors, such as typos or missed steps.
Another reason RESTCONF matters is its integration with existing IT tools. Since RESTCONF uses HTTP and JSON, it fits naturally into the world of web services, cloud platforms, and DevOps pipelines. Tools like Ansible, Puppet, Chef, and custom Python scripts can all easily interact with RESTCONF endpoints.
This means network teams can adopt the same automation practices that software development teams use, enabling continuous integration and continuous delivery (CI/CD) for network configurations. In practical IT contexts, RESTCONF also provides a consistent interface across different vendors. A network engineer can learn the YANG models once and then apply them to Cisco, Juniper, Arista, or open-source devices.
This reduces the learning curve and simplifies multi-vendor environments. Because RESTCONF is an IETF standard, it ensures long-term compatibility and vendor neutrality. For organizations undergoing digital transformation, RESTCONF enables intent-based networking, where the network can be managed at a higher level of abstraction.
Instead of configuring each interface individually, an administrator defines the desired network state, and automation software uses RESTCONF to push that state to all devices. This aligns with the movement toward software-defined networking (SDN) and network as code. RESTCONF is essential for IT professionals who want to automate, scale, and standardize network management in a way that is reliable, vendor-agnostic, and compatible with modern IT workflows.
How It Appears in Exam Questions
RESTCONF questions in certification exams often take the form of scenario-based, configuration-related, or troubleshooting queries. A typical scenario question might describe a network administrator who needs to change the hostname on a router. The question will ask which HTTP method and URI should be used in a RESTCONF request.
The correct answer would be: PUT /restconf/data/Cisco-NX-OS-device:hostname. The candidate must understand that PUT is used to create or replace a resource, and the URI points to the specific YANG data node for hostname. Another common question type presents a JSON or XML payload and asks what the payload will do when sent via a POST request.
For example, a JSON payload containing new VLAN configuration might be posted to /restconf/data/Cisco-IOS-XE-vlan:vlan. The answer would be that it creates a new VLAN. Troubleshooting questions might show an HTTP response, such as a 400 Bad Request, and ask what could be wrong.
Possible answers include a malformed JSON payload, an invalid URI, or missing authentication. Another troubleshooting pattern involves a 404 Not Found error when trying to retrieve interface statistics. The candidate must recognize that the URI might be incorrect or that the specific interface does not exist.
Drag-and-drop questions are also common. For instance, the exam might list HTTP methods on one side and their corresponding CRUD operations on the other, requiring the candidate to match them: GET with Read, POST with Create, PUT with Create/Replace, PATCH with Modify, DELETE with Delete. Some exams include questions about the differences between RESTCONF and NETCONF.
For example, a question might ask which protocol uses SSH as its transport protocol (NETCONF) and which uses HTTP/S (RESTCONF). Another might ask which protocol typically uses XML exclusively (NETCONF) versus supporting both JSON and XML (RESTCONF). In more advanced exams, candidates might be asked to analyze a Python script that uses the requests library to perform a RESTCONF query.
They would need to identify the correct URL, headers (Content-Type: application/yang-data+json), and authentication parameters. The script might then print the JSON response, and the question would ask what configuration element is being retrieved. Finally, scenario-based troubleshooting might involve an error where a POST request returns a 405 Method Not Allowed.
The candidate must realize that the resource already exists and that a PUT or PATCH should have been used instead, or that the URI is read-only. These questions test both theoretical knowledge and practical application of RESTCONF in real-world network management tasks.
Practise RESTCONF Questions
Test your understanding with exam-style practice questions.
Example Scenario
You are a network administrator for a company with 50 branch offices, each with one router and one switch. Your company has just acquired 10 new offices, and you need to configure the hostname on each of the 10 new routers to include the office location, such as 'Router-NewYork' or 'Router-Dallas'. Instead of logging into each device individually, you decide to use RESTCONF to automate the task.
You first verify that each router has RESTCONF enabled and that you have the correct YANG model for the hostname. You then write a simple Python script that loops through a list of new routers, each with its IP address, username, password, and desired hostname. For each router, the script sends a PUT request to the URI 'https://192.
168.1.1/restconf/data/Cisco-IOS-XE-native:native/hostname'. The request includes a JSON payload: {"hostname": "Router-NewYork"}. The script also sets the authentication header using HTTP Basic Authentication.
Within minutes, you have configured all 10 routers. You run the script again, this time sending a GET request to the same URI on each router to verify the hostname was applied correctly. You receive JSON responses with the hostname values, confirming the configuration was successful.
This scenario demonstrates how RESTCONF allows you to manage devices at scale, reduce manual effort, and ensure accuracy. Without RESTCONF, you would have spent at least an hour logging in, typing commands, and double-checking each device. With RESTCONF, the entire task took about five minutes of coding and a few seconds of execution.
This is exactly the kind of efficiency that automation aims to bring, and it is why RESTCONF is an essential skill for modern network professionals.
Common Mistakes
Thinking RESTCONF is the same as NETCONF.
RESTCONF and NETCONF both use YANG data models, but they are different protocols. NETCONF uses SSH as its transport and XML for encoding, while RESTCONF uses HTTP/S and supports both JSON and XML. They have different session models and capabilities.
Remember: NETCONF = SSH + XML. RESTCONF = HTTP + JSON/XML. In exams, if you see SSH, think NETCONF; if you see HTTP, think RESTCONF.
Using HTTP GET to create a new resource.
GET is used only to retrieve data. Using GET to create a resource will either return an error (405 Method Not Allowed) or simply return existing data, not create anything. The correct method for creating is POST or PUT.
Map HTTP methods to CRUD: GET = Read, POST = Create (when sent to a collection), PUT = Create/Replace (when sending the full resource), PATCH = Modify, DELETE = Delete.
Sending the wrong content type in the HTTP header.
RESTCONF requires specific content types. For JSON, the header must be 'Content-Type: application/yang-data+json'. For XML, it is 'application/yang-data+xml'. Sending plain 'application/json' may cause the device to reject the request or misinterpret the payload.
Always set the Content-Type header to 'application/yang-data+json' (or +xml) when sending RESTCONF requests. In automation scripts, explicitly define this header.
Confusing the URI path for configuration versus operational data.
RESTCONF uses different base paths for configuration data and operational state data. The base path for configuration is typically '/restconf/data', while operational data may be under '/restconf/operations' or '/restconf/data' with a different YANG module. Using the wrong path returns a 404 or 400 error.
Check the device documentation. For configuration changes, use '/restconf/data/'. For reading operational stats, use the specific YANG module path under '/restconf/data' but ensure you are referencing the correct state data container.
Exam Trap — Don't Get Fooled
{"trap":"A question asks which protocol uses 'SSH' for secure transport: NETCONF or RESTCONF? The trap is that many learners think both can use SSH because both are secure. However, RESTCONF uses HTTPS (TLS), not SSH, while NETCONF uses SSH as its standard transport."
,"why_learners_choose_it":"Learners see that both protocols support encryption and assume they can use the same protocol. They might also confuse the fact that some implementations allow RESTCONF over SSH, but that is non-standard and not tested. The official standard (RFC 8040) defines HTTP or HTTPS only."
,"how_to_avoid_it":"Memorize the transport layer for each: NETCONF = SSH (port 830). RESTCONF = HTTP (port 80) or HTTPS (port 443). In exam questions, if they mention 'SSH transport,' the answer is always NETCONF.
If they mention 'HTTPS' or 'web-based,' the answer is RESTCONF."
Step-by-Step Breakdown
Enable RESTCONF on the Device
Before you can use RESTCONF, you must enable it on the network device. Typically, this involves a global configuration command such as 'restconf' on Cisco IOS-XE or 'set system services restconf' on Juniper Junos. This activates the RESTCONF server and opens the listening port (usually 443 for HTTPS). This step is often tested in configuration-related exam questions.
Authenticate the Request
RESTCONF requires authentication. Most implementations support HTTP Basic Authentication, where you send the username and password base64-encoded in the Authorization header. Some devices also support token-based authentication. Without proper authentication, the device responds with a 401 Unauthorized error. This step tests your understanding of security headers in exams.
Construct the URI
The URI identifies the target resource. The base is '/restconf/data' followed by the YANG module name and the specific data node. For example, to get the hostname, you might use '/restconf/data/Cisco-IOS-XE-native:native/hostname'. The correct syntax is critical; an incorrect path returns a 404 error. This is a common point for exam questions.
Set HTTP Method and Headers
Choose the correct HTTP method: GET to read, POST to create, PUT to replace, PATCH to modify, DELETE to remove. Set the Content-Type header to 'application/yang-data+json' (or +xml) for requests with a body. The Accept header indicates the desired response format. Exam questions often test method-purpose mapping.
Send the Request and Handle Response
The device processes the request and returns an HTTP status code. 200 OK for successful GET, 201 Created for successful POST, 204 No Content for successful DELETE. The response body contains the requested data in JSON/XML. If there is an error, the status code indicates the nature (400 Bad Request, 404 Not Found, 405 Method Not Allowed, 500 Internal Server Error). Understanding these codes is essential for troubleshooting questions.
Practical Mini-Lesson
RESTCONF is not just a theoretical concept, it is a practical tool that network professionals use daily for automation. To work with RESTCONF, you need to understand several components: the YANG model, the RESTCONF server, the client tool, and the authentication method. Let's walk through a real-world example using Python and the 'requests' library.
Suppose you have a Cisco IOS-XE device at 192.168.1.1. First, ensure RESTCONF is enabled on the device. Usually, this is done in the global config: 'restconf' command. Next, you'll write a Python script.
Start by importing requests and disabling SSL verification for lab purposes (use proper certs in production). url = 'https://192.168.1.1/restconf/data/Cisco-IOS-XE-native:native/hostname'.
headers = {'Accept': 'application/yang-data+json', 'Content-Type': 'application/yang-data+json'}. response = requests.get(url, auth=('admin', 'password'), headers=headers, verify=False).
If the request is successful, response.status_code will be 200, and response.json() will contain the hostname. Now, to change the hostname to 'Router-SF', you use a PUT request with a JSON payload: payload = {"Cisco-IOS-XE-native:hostname": "Router-SF"}.
response = requests.put(url, auth=('admin', 'password'), headers=headers, json=payload, verify=False). If successful, you get a 204 or 200 response. To verify, you can then do a GET request again.
What can go wrong? Common issues include: SSL certificate errors if you don't disable verification in a lab; 401 errors if authentication is wrong; 400 errors if the JSON payload is malformed or does not match the YANG model; 404 errors if the URI path is incorrect. When troubleshooting, always check the HTTP status code first.
For example, a 405 error means you used the wrong method (e.g., POST on an existing resource that only allows PUT). A 400 error often means the JSON syntax or data values are invalid.
Professionals also use tools like Postman for testing RESTCONF calls before writing scripts. Postman allows you to build requests, set headers, and view responses interactively. It is a great debugging tool for network automation.
Working with RESTCONF in practice is straightforward: enable the service, authenticate, construct the correct URI, use the right HTTP method and headers, and handle the response. With practice, you can automate almost any configuration or monitoring task on modern network equipment.
Memory Tip
RESTCONF: HTTP methods = CRUD (GET=Read, POST=Create, PUT=Replace, PATCH=Modify, DELETE=Delete). Remember 'GP P&D' (GET, POST, PUT, PATCH, DELETE) as the five RESTCONF verbs.
Covered in These Exams
Current Exam Context
Current exam versions that test this topic — use these objectives when studying.
200-301Cisco CCNA →AZ-400AZ-400 →Legacy Exam Context
Older materials may mention these exam versions, but learners should use the current objectives for their target exam.
N10-008N10-009(current version)Related Glossary Terms
AAA (Authentication, Authorization, and Accounting) is a security framework that controls who can access a network, what they are allowed to do, and tracks what they did.
802.1X is a network access control standard that authenticates devices before they are allowed to connect to a wired or wireless network.
5G is the fifth generation of cellular network technology, designed to deliver faster speeds, lower latency, and support for many more connected devices than previous generations.
An A record is a type of DNS resource record that maps a domain name to an IPv4 address.
An AAAA record is a DNS record that maps a domain name to an IPv6 address, allowing devices to find each other over the internet using the newer IP addressing system.
Frequently Asked Questions
What is the main difference between RESTCONF and NETCONF?
RESTCONF uses HTTP/HTTPS as its transport and supports both JSON and XML data formats. NETCONF uses SSH as its transport and only supports XML. RESTCONF is simpler to integrate with web tools and scripting, while NETCONF is more feature-rich for transaction management and locking.
Do I need to know YANG to use RESTCONF?
Yes, a basic understanding of YANG is very helpful because RESTCONF URIs and data payloads are defined by YANG models. You need to know which YANG module and data node you want to access to construct the correct URL and JSON/XML structure.
Which ports does RESTCONF use?
The standard port for RESTCONF is 443 for HTTPS and 80 for HTTP, though some devices allow custom ports. Always use HTTPS in production for security. The default port for NETCONF is 830 over SSH.
Is RESTCONF supported on all network devices?
No, RESTCONF is supported on modern devices from major vendors like Cisco (IOS-XE, NX-OS), Juniper (Junos), Arista (EOS), and others. Older devices may not support it. Always verify device compatibility before planning automation.
What is the difference between a 200 and a 204 response in RESTCONF?
A 200 OK response includes a body with the requested data, such as when you perform a GET request. A 204 No Content response indicates success but no body is returned, such as after a successful DELETE or PUT request that updates an existing resource without returning data.
Can I use RESTCONF for monitoring and telemetry?
Yes, RESTCONF supports reading operational state data (e.g., interface statistics, CPU usage) by sending GET requests to the appropriate YANG data nodes. However, for high-frequency telemetry, gRPC or NETCONF might be more efficient.
Summary
RESTCONF is a modern, web-based network management protocol that uses HTTP methods and YANG data models to configure and monitor network devices. It simplifies automation by replacing manual command-line interfaces with a consistent, vendor-neutral API that is easy to integrate with scripting languages and automation tools. For IT certification candidates, understanding RESTCONF is essential because it appears in exams like CCNA, CCNP, DevNet Associate, and JNCIA-DevOps.
Questions typically focus on HTTP method to CRUD mapping, URI construction, authentication, and error handling. Common mistakes include confusing RESTCONF with NETCONF, using the wrong HTTP method, and misconfiguring content-type headers. The protocol's importance in real-world IT cannot be overstated, it enables network automation at scale, reduces human errors, and aligns network management with modern DevOps practices.
By mastering RESTCONF, you not only prepare for certification exams but also gain a practical skill that is increasingly required in network engineering roles. The key takeaway for exams is to remember the five HTTP methods and their purposes, the secure transport (HTTPS), and the support for JSON and XML. With this foundation, you will be well-equipped to answer both theoretical and scenario-based questions.