Error on trying to create a remote link for an issue

I have been trying to create a remote link for an issue using the following endpoint.


The screencaps below shows the POST request logic.

Screen Shot 2016-06-29 at 7.00.16 PM.png

Screen Shot 2016-06-29 at 7.00.10 PM.png

The parameters in the post request are as follows:

full_url = 'https://<domain>'
data = {"object": { "title": "Asana", "url": "" }}

This is the error that I get back from the API when the POST request is made (via requests):

	u'errorMessages': [u"Unexpected character ('o' (code 111)): expected a valid  value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@180652f; line: 1, column: 2]"]

Any idea what I may be doing incorrectly?

3 answers

1 accepted

1 vote
Accepted answer

OK, as I suspected your Python client lib is form-encoding your data, rather than sending it as JSON. Try this:, headers=headers, json=data)

See the documentation for more information and examples.

The problem is that the server does not understand the data you are sending. This may be due to various reasons - to understand why you need to trace the actual POST request being sent. One reason could be missing Content-Length header, another could be improperly constructed JSON data. What is the client API you are using?

I am using the REST client (JIRA REST API v2). My guess is that I'm not properly structuring the data - I'll explore more in depth today. The documentation isn't explicit about how the params should be structured (

Sorry if my question was not clear - which is the client library you are using for doing the post request? Does it add the Content-Length header automatically, does it need JSON data to be pre-processed in some manner?

Oh, my apologies. I'm using the python "requests" client (version 2.5.3).

Here are the headers included in the request:

	'X-AUSERNAME': 'ian.miller', 
	'X-AREQUESTID': '385x18736x1', 
	'X-Content-Type-Options': 'nosniff', 
	'Transfer-Encoding': 'chunked', 
	'Set-Cookie': '..........',
	'X-Seraph-LoginReason': 'OUT, OK', 
	'X-ASESSIONID': '12wjbma', 
	'Server': 'nginx', 
	'Connection': 'keep-alive', 
	'X-ATENANT-ID': '', 
	'Cache-Control': 'no-cache, no-store, no-transform', 
	'Date': 'Thu, 30 Jun 2016 13:25:28 GMT', 
	'Content-Type': 'application/json;charset=UTF-8', 
	'X-ASEN': 'SEN-6393989'

Don't see a Content-Length header - I can add this in manually. What would I need to specify as the value for the 'Content-Length' header?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,104 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you