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?
415 Unsupported Media Type is explicitly caused by missing or invalid Content-Type headers.
Why this answer
A 415 Unsupported Media Type error indicates that the Content-Type header sent in the HTTP request does not match what the Junos REST API daemon expects for processing configuration payloads (such as application/vnd.juniper.netconf.config+json or application/json).