200-901 Understanding and Using APIs Practice Question
A developer uses RESTCONF to configure a network device. What is the correct content-type header to send in the request?
⚠ Common exam trap
200-901 often tests whether candidates know the YANG-specific media types — many incorrectly choose generic application/json or application/xml, missing that RESTCONF requires application/yang-data+json (or +xml) to bind the payload to YANG models.
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
RESTCONF, defined in RFC 8040, uses YANG-modeled data and requires the content-type header to indicate the YANG data representation. The correct media type for JSON-encoded YANG data is application/yang-data+json, which tells the server the payload conforms to the YANG data model in JSON format. This is the standard content type for RESTCONF JSON requests.
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/json
Why it's wrong here
RESTCONF requires the request body's media type; application/json is valid only when the payload is actually JSON-encoded, so it fails when the device expects XML. It is tempting because JSON is the default for most REST APIs, and RESTCONF does support JSON encoding, but the header must match the body sent.
- ✗
application/xml
Why it's wrong here
application/xml is valid only when the request body is XML-encoded, so it fails if the payload is JSON. It is tempting because RESTCONF's YANG models are defined in YANG and commonly serialised as XML, making XML the traditional RESTCONF encoding, but the header must match the body actually sent.
- ✓
application/yang-data+json
Why this is correct
RESTCONF encodes YANG-modelled data, so requests must declare the YANG media type. application/yang-data+json tells the device the body is JSON-encoded YANG data, satisfying the RESTCONF content-type requirement; generic application/json is not the registered RESTCONF media type.
- ✗
text/plain
Why it's wrong here
text/plain carries no structured YANG encoding, so RESTCONF cannot parse configuration data from it. It is tempting for simple debugging or curl tests, but RESTCONF requires XML or JSON media types with the yang-data parameter for configuration payloads.
Go deeper
Related to this question
About these practice questions
This 200-901 question is part of Courseiva's 975-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.