Jira Software version: 7.3.0
I cannot perform API search queries asking for "createdDate" and "project".
curl -D- -u xxx:yyy -X GET -H "Content-Type: application/json" /rest/api/2/search\?jql\=createdDate%20%3E%3D%20-30d
works, but
curl -D- -u xxx:yyy -X GET -H "Content-Type: application/json" /rest/api/2/search\?jql\=project%3DGS%20AND%20createdDate%20%3E%3D%20-30d
does not. Error is
HTTP/1.1 403 Forbidden Date: Mon, 10 Jul 2017 10:12:46 GMT Server: Apache Content-Length: 226 Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /rest/api/2/search on this server.<br /> </p> </body></html>
I suppose that it is no permission error but some kind of problem with the query.
Thanks in advance!
Max
Hmm. What happens if you search just for the project and drop the date part?
i.e. just "project = GS" or jql\=project%3DGS in the url.
This works. Changing createdDate and project does not work either.
Running the JQL query directly via Jira works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right, I meant specifically the url based query with just the project - does that pull back all the project issues for GS?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It returns the "first 50" setting maxResults to 50 and strting at 0. "total" returns the correct total number of issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, let me repeat this back to you to ensure I have it clear:
These two calls work, pulling back issues:
And the third call, where there are both clauses joined by an AND gives you a permission error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, exactly.
I have just found the problem: Removing the "=" from ">=-30" fixes the problem. So I transformed ">=-30" to ">-31".
Perhabs the "-" is interpreted as an assignment by the server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahh, nicely spotted. I think you might need to escape it in the url.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But I have a new problem...
/rest/api/2/search?jql=project%3DGS%20AND%20status%3DErledigt%20AND%20createdDate%3E-31d
does not work in my node.js Code but works via curl. It is an SSL connection so I cannot use Wireshark to analyse both streams.
Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.