The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Rest API using curl and cmd command

Bongani Hermans
August 11, 2020

Hi,

I am trying to run the curl command to update a summary of an issue but getting errors.

Curl command : curl -D- -u user:password -H "Content-Type:application/json" -k -D '{"update":{"summary":[{"set":"Big Block Chevy"}]}}' {jira-server url}/rest/api/2/issue/RIM-816

getting error :

Warning: Failed to open {"update":{"summary":[{"set":"Big Block Chevy"}]}}
curl: (23) Failed writing received data to disk/application

Kindly please advise on a workaround for this, all my tests run fine in postman but when using curl I get an error.

Regards,

Bongani

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Fabio Racobaldo _Catworkx_
Community Champion
January 23, 2023

Hi @Bongani Hermans ,

problem could be related to -D option

-D/--dump-header <file>

Write the protocol headers to the specified file.

This option is handy to use when you want to store the headers that a HTTP site sends to you. Cookies from the headers could then be read in a second curl invoke by using the -b/--cookie option! The -c/--cookie-jar option is however a better way to store cookies.

When used on FTP, the ftp server response lines are considered being "headers" and thus are saved there.

If this option is used several times, the last one will be used.