Hello There!!
I am trying to get list of issues filtered by issue type by making rest api call. uri works for me on postman is https://jira.comapnyname.net/rest/api/latest/search?jql=issuetype=outage AND (createdDate>=startOfMonth(-1) AND createdDate<startOfMonth()).
When I try to pass the same url through api call, it says illegal character. I tried replacing the spaces with %20 as '
"search?jql=issuetype=outage%20AND%20(createdDate>=startOfMonth(-1)%20AND%20createdDate<startOfMonth())"
but still same issue. Please do let me know how can I pass jql query through restapi call.
Thanks
Dear @Tejaswi Gangurde,
in Java I use this function for URL encoding to UTF-8:
protected String encodeMsg(String message) {
try {
return URLEncoder.encode(message,"UTF-8");
} catch (UnsupportedEncodingException e) {
String msg = "UnsupportedOperationException: " + e.getMessage();
logger.error(msg);
throw new RuntimeException(msg);
}
}
'message' is the JQL.
Hope that helps ...
So long
Thomas
Thanks @Thomas Deiler
It works!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.