Reputation: 1707
I am trying to get data in jira server using curl. I tried this command
curl -u username:password -X GET -H "Content-Type: application/json" jiraServer/rest/api/2/search?jql=created >= "2015-11-18"
It downloaded a file in the curl directory and the file says
{"errorMessages":["Error in the JQL Query: Expecting operator before the end of the query. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'."],"errors":{}}
I tried put the created >= "2015-11-18" in advanced search in Jira web interface and it works. Don't why it failed in curl?
Upvotes: 4
Views: 2616
Reputation: 7489
You need to encode the URL and enclose in quotes:
curl -u username:password -X GET -H 'Content-Type: application/json' "http://jiraServer/rest/api/2/search?jql=created%20>%3D%202015-11-18"
Upvotes: 7