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?
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.
Why this answer
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.
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.
How to eliminate wrong answers
Option A is wrong because 'application/yang' is not a registered media type for RESTCONF payloads; YANG is the modeling language, not the wire format. Option C is wrong because 'application/xml' would indicate XML-encoded data, which RESTCONF supports as 'application/yang-data+xml', not plain XML. Option D is wrong because 'application/json' is generic JSON and does not tell the device the payload conforms to YANG data rules, so RESTCONF servers reject it.