0
votes

What is wrong in my Jira API call ? ''' curl -D- -u : -X GET -H "Content-Type: application/json" https://jiratraining02.atlassian.net/rest/api/2/search?jql=project=Project_WebDevelopment_Demo AND issuetype=Story AND status=READY FOR DEV '''

I am getting the below error

curl: (6) Couldn't resolve host 'AND'
curl: (6) Couldn't resolve host 'issuetype=Story'
curl: (6) Couldn't resolve host 'AND'
curl: (6) Couldn't resolve host 'status=READY'
curl: (6) Couldn't resolve host 'FOR'
curl: (6) Couldn't resolve host 'DEV'

What I want to Achieve is -

  1. This command should give a json output. From the Json output, I have to extract the issue ID.
  2. In a bitbucket pipeline, I have to run yaml to move the tickets to a different status when the jo completes.
1
URL query parameters should be separated by an ampersand (&) and without spaces. curl is treating the spaces as separators for its arguments. - Simon Crane

1 Answers

0
votes

I'd run the query inside the Jira UI and then copy the Share link and use that in curl