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

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events