200-901 Infrastructure and Automation Practice Question
A network automation script uses RESTCONF to retrieve operational data from a Cisco device. What data format is typically supported by RESTCONF?
⚠ Common exam trap
Cisco often tests the misconception that RESTCONF supports YAML because of its popularity in automation tools like Ansible, but RESTCONF strictly uses XML and JSON per RFC 8040, and YAML is not a valid encoding in the standard.
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
✓
XML or JSON
RESTCONF (RFC 8040) is a REST-like protocol that uses HTTP methods to access structured data defined by YANG models. It natively supports both XML and JSON as data serialization formats, allowing clients to choose the format via the Accept header or URL suffix (e.g., .xml or .json). This makes XML and JSON the correct answer because they are the only formats explicitly defined in the RESTCONF specification for encoding configuration and operational data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
YAML
Why it's wrong here
YAML is not a RESTCONF media type; RESTCONF supports XML and JSON encodings of YANG data. It is tempting because YAML is common in automation tooling such as Ansible playbooks, and it would be correct for defining configuration files or orchestration variables, not for RESTCONF request and response payloads.
- ✗
Plain text
Why it's wrong here
RESTCONF encodes data as XML or JSON, not plain text; plain text carries no structured schema for YANG-modelled resources. It is tempting because raw HTTP responses can appear textual, and it would be correct where a protocol or API explicitly returns unstructured content rather than modelled configuration or state data.
- ✓
XML or JSON
Why this is correct
RESTCONF encodes data as either XML or JSON, negotiated through the Accept and Content-Type headers. This satisfies the stem's requirement for the format typically supported when retrieving operational data, since RESTCONF, unlike SNMP or NETCONF's XML-only encoding, permits JSON payloads alongside XML.
- ✗
CSV
Why it's wrong here
CSV is a flat tabular format with no hierarchical structure, so it cannot represent YANG-modelled containers and lists that RESTCONF returns. It is tempting because CSV suits bulk import and spreadsheet reporting, and it would be correct for exporting simple tabular inventories rather than querying device operational data.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 200-901 question from scratch — 975 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-901 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-901 exam.