REST API: "Error 415 Unsupported Media Type"

Still need help?

The Atlassian Community is here for you.

Ask the community


When executing a REST API call, the following error is returned (using curl as an example):

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 415 Unsupported Media Type</title>
<body><h2>HTTP ERROR 415</h2>
<p>Problem accessing /rest/api/1.0/rest-service/reviews-v1. Reason:
<pre>    Unsupported Media Type</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>                                                

In the atlassian-fisheye-yyyy-mm-dd.log the following stack-trace can be seen:

2012-12-10 14:19:37,263 ERROR [btpool0-2 ] ThrowableExceptionMapper-toResponse - Uncaught exception thrown by REST service
	at com.sun.jersey.server.impl.uri.rules.TerminatingRule.accept(
	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(
	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(


An incorrect "Content-Type" (eg.text/xml) or no "Content-Type" has been defined for the call.


The correct "Content-Type" should be indicated in the call:

curl -u admin:admin -X POST -d@cr.xml http://localhost:8060/rest-service/reviews-v1 -H "Content-Type: application/xml"

(warning) Make sure to replace http://localhost:8060 with the base URL of your instance. Sometimes making cURL requests to http addresses behing SSL would also cause this 415 error

For more information over REST API please refer to the following documentation:

DescriptionThis page discusses about an error while executing a REST API call when an incorrect "Content-Type" (eg.text/xml) or no "Content-Type" has been defined for the call.
ProductFisheye, Crucible
Last modified on Nov 29, 2021

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.