I am trying to fetch data using a filter :
"Defect Created in Integrity" is EMPTY AND status= "TO DO"
Through postman I am able to get the data but with java code it is not working .
I am getting the following exception :
java.io.IOException: Server returned HTTP response code: 400 for URL: https://gauravj7.atlassian.net/rest/api/3/search?jql="Defect Created in Integrity" is EMPTY AND status= "TO DO"
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at Jira2.main(Jira2.java:23)
Can someone help me with this ?
That's because the url you are giving it is invalid - it has unencoded spaces in it. You'll need to encode the url.
You say "in java" though - are you writing an app inside Jira? If so, instead of using clumsy urls, you could use the API directly to build a valid query without needing to think of urls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.