An engineer is troubleshooting a script that updates Junos configuration via the REST API. The payload is sent as JSON, but the device returns a 415 Unsupported Media Type error. What is the root cause?
A 415 response is returned by the Junos REST API when the request's Content-Type header does not match the payload format. Since the script sends JSON, the header must be `Content-Type: application/json`; omitting it or specifying another media type causes the device to reject the request before parsing the body.
Why this answer
HTTP 415 Unsupported Media Type means the server refuses to process the request because the payload's media type is not supported. In the Junos REST API, the client must send a Content-Type header (e.g., 'application/json' or 'application/xml') that matches the payload format. If the header is missing or set to something the device does not accept, the device returns 415.
Exam trap
JNCIA-DevOps often tests HTTP status code semantics — candidates confuse 415 (media type) with 401/403 (auth), 404 (not found), or 500 (server error), and pick the wrong root cause.
How to eliminate wrong answers
Option A is wrong because memory exhaustion would typically manifest as a 500 Internal Server Error or a timeout, not a 415 — 415 is specifically about media type negotiation. Option B is wrong because insufficient permissions produce 401 Unauthorized or 403 Forbidden, not 415. Option D is wrong because a non-existent URI path produces 404 Not Found, not 415.