CCNA AI and Network Operations Practice Question
A network administrator is using a Python script to retrieve interface statistics from a Cisco IOS XE device via RESTCONF. The script sends an HTTP GET request to the RESTCONF endpoint. Which HTTP status code indicates that the request was successful and the response body contains the requested data?
⚠ Common exam trap
The trap here is assuming any 2xx status code means success with data, but 204 specifically means no content is returned.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
200 OK
In RESTCONF, a successful GET request that returns data uses the HTTP 200 OK status code. This indicates that the server has processed the request and the response body contains the requested representation, such as interface statistics in JSON or XML. Other 2xx codes like 201 or 204 have different meanings related to resource creation or empty responses.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
200 OK
Why this is correct
HTTP 200 OK indicates that the request succeeded and the response body contains the requested resource representation. In RESTCONF, a successful GET returns 200 with the data in JSON or XML format. This is the standard success code for retrieving information.
- ✗
304 Not Modified
Why it's wrong here
HTTP 304 Not Modified is used for conditional GET requests when the resource has not changed since the last retrieval, often using caching headers. It does not contain the resource data. This is not the typical success code for a straightforward RESTCONF GET without conditional headers.
- ✗
201 Created
Why it's wrong here
HTTP 201 Created is returned when a new resource is successfully created, typically in response to a POST request. For a GET request to retrieve data, 201 is not appropriate. The scenario involves retrieving statistics, not creating a resource.
- ✗
204 No Content
Why it's wrong here
HTTP 204 No Content indicates that the request succeeded but there is no data to return in the response body. This might occur if the resource exists but has no content, or after a successful DELETE. For a GET request that retrieves interface statistics, 204 would mean no statistics were available, which is not the expected success case.
Go deeper
Related to this question
Learn chapter
Lab: Configure DHCP Server on Router
Key term
RESTCONF
RESTCONF is a protocol that uses HTTP methods to manage and configure network devices, replacing older command-line methods with a modern web-based approach.
Key term
Interface
An interface is a point of connection or interaction between two systems, devices, or software components that allows them to exchange information or signals.
About these practice questions
One of 1,450 original 200-301 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
This 200-301 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-301 exam.