200-901 Understanding and Using APIs Practice Question
When using RESTCONF to configure a network device, what Content-Type header should be set in the HTTP request to indicate YANG data in JSON format?
⚠ Common exam trap
200-901 often tests the distinction between generic JSON/XML media types and the YANG-specific '+json' structured suffix, catching candidates who assume 'application/json' is always accepted.
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
✓
application/yang-data+json
RFC 8040 defines the media type for YANG-modeled data encoded in JSON as 'application/yang-data+json'. When sending a RESTCONF request with a JSON body, the Content-Type header must be set to this value so the device knows to parse the payload against the YANG model using the JSON encoding rules.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
application/yang
Why it's wrong here
RESTCONF defines the media type application/yang-data+json for YANG-modelled JSON payloads; application/yang is not a registered RESTCONF media type. It is tempting because it names YANG directly and resembles the XML media type application/yang-data+xml, but the correct header must specify both the yang-data structure and the json encoding.
- ✓
application/yang-data+json
Why this is correct
RESTCONF uses the YANG-derived media type application/yang-data+json to signal JSON-encoded YANG data in the request body. Setting it as Content-Type tells the device how to parse the payload, satisfying the stem's requirement to indicate YANG data in JSON format.
- ✗
application/xml
Why it's wrong here
RESTCONF selects the YANG payload encoding through the Content-Type header, so application/xml requests XML-encoded data, not JSON. It is tempting because XML remains a valid RESTCONF media type, and would be correct when the client sends or expects XML-encoded YANG bodies.
- ✗
application/json
Why it's wrong here
application/json is the generic JSON media type, but RESTCONF requires the YANG-specific type application/yang-data+json so the server interprets the payload as modelled data. It is tempting because the payload is JSON, yet the header must also identify the YANG data structure, which plain application/json omits.
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 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-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.