Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

update due date using rest api

KP April 20, 2015

I am trying to use the below curl command, to update DueDate field, however, the O/P is :

 

 curl -u <userid>  <api-url> -i -H "Content-Type: application/json" -d '{"update": {"duedate":"null"}' -X PUT -sS



{"errorMessages":["Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@43077033; line: 1, column: 13] (through reference chain: com.atlassian.jira.rest.v2.issue.IssueUpdateBean[\"update\"])"]}

 

Could someone in the know, please shed some light?

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
David Black
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 15, 2016

Try sending something like this instead

curl -u &lt;userid&gt; &lt;api-url&gt; -i -H "Content-Type: application/json" -d '{"update": { "duedate": [ {"set": "2014-05-22"} ] } }' -X PUT -sS
0 votes
Praveen June 1, 2015

Hi,Did you found any ways to achieve this ? If so can you help me to understand how you achieved this ?

 

Thanks.

0 votes
KP April 21, 2015
Hi,

The file method hasnt worked as expected.


curl -u <userid> <api-url> -i -H "Content-Type: application/json" -d '{"update": {"duedate":[{"set":[{"2015-04-20"}]}]}}' -X PUT -sS  

on the other hand issues me 403 - Forbidden error
KP August 10, 2015

Any help on this or review of this error would be much appreciated

0 votes
Boris Berenberg
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 20, 2015

I would try putting the data into a file and using the curl -d @filename.ext notation. I find that things tend to work better that way, especially when it comes to quotation marks on the command prompt.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events