Http Status 400 Error In The Jql Query
null with status code 40010-1asas asdsdSep 05, 2012Hi, When i write a seach query and fires it in the browser, it returns null. The Query is : http://localhost:8080/rest/api/2/search?jql=Name~WO1.X.D but it works fine for other queries : http://localhost:8080/rest/api/2/search?jql=Name~WOP-D I think the problem in in the name WO1.X.D The "dots(.)" are not recognised. Can somebody tell me a alternate for it . TIA!jirasearchjqlCommentCommentAdd your comment...1 answer10-1Harry ChanSep 05, 2012Hi, can you try replacing "." with "%2E". I think they need to be escaped.CommentCommentAdd your comment...Sign up or log in to answerWatchRelated questions Powered by Atlassian Confluence 5.7.3, Team Collaboration Software Printed by Atlassian Confluence 5.7.3, Team Collaboration Software. Report a bug Atlassian News Atlassian
for Visual Studio (discontinued)PLVS-378HTTP 400 due to illegal JQL "Expecting ',' but got 'order'" against JIRA v5.0.4Log in PrintExport XMLExport Word Details Type: Bug Status: Resolved Priority: Major Resolution: Fixed Affects Version/s: 1.3.6, https://answers.atlassian.com/questions/84598/search-query-returns-null-with-status-code-400 1.3.7 Fix Version/s: 1.3.7 Component/s: JIRA Labels: None Environment: connector version: 1.3.7-20121120-1002 Visual Studio version: 10.0, Premium Operating System: Microsoft Windows NT 5.1.2600 Service Pack 3 CPU count: 2 JIRA (v5.0.4#731-sha1:3aa7374) https://ecosystem.atlassian.net/browse/PLVS-378 Description I'm unable to retrieve any JIRA issues using the connnector. I get the following Error on trying to access i.e. the "my tasks" filter entry. Der Remoteserver hat einen Fehler zurückgegeben: (400) Ungültige Anforderung.
Url: https://www.FOOOBAR.de/jira/rest/api/2/search?jql=assignee+%3d+currentUser()+AND+status+in+(Open%2c+%22In+Progress%22%2c+Reopened%2c+New%2c+%22In+Specification%22%2c+%22On+Hold%22)+ORDER+BY+issuetype+ASC%2c+priority+DESC%2c+key+DESC+order+by+priority+desc&startAt=0&maxResults=50&expand=renderedFields
Response: {"errorMessages":["Error in the JQL Query: Expecting ',' but got 'order'. (line 1, character 156)"],"errors":{}}
System.Net.WebException bei Atlassian.plvs.api.jira.RestClient.jsonOp(String method, String tgtUrl, Object json, HttpStatusCode expectedCode) bei Atlassian.plvs.api.jira.RestClient.getSavedFilterIssues(JiraSavedFilter filter, String sortBy, String sortOrder, Int32 start, Int32 count) bei Atlassian.plvs.api.jira.facade.RestJiraServerFacade.getSavedFilterIssues(JiraServer server, JiraSavedFilter filter, Int32 start, Int32 count) bei Atlassian.plvs.api.jira.facade.SmartJiraServerFacade.<>c__DisplayClassa.
Sign in Pricing Blog Support Search GitHub This repository Watch 129 Star 1,157 Fork 451 capitalone/Hygieia https://github.com/capitalone/Hygieia/issues/276 Code Issues 187 Pull requests 11 Projects 0 Wiki Pulse Graphs http://stackoverflow.com/questions/24368731/http-post-request-to-jira-using-java-yields-400-bad-request-error-curl-works-fi New issue jira collector logged query error #276 Open hongluovz opened this Issue Jan 15, 2016 · 43 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 6 participants hongluovz commented Jan 15, http status 2016 I installed a new copy of Hygieia with latest from master branch. The problem I reported via issue #220 has been fixed, however I got this error from Jira server response: "400 Bad Request {"errorMessages":["Error in the JQL Query: Expecting operator but got '&'. The valid operators are '=', '!=', '<', '>', http status 400 '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 12)"],"errors":{}} com.google.api.client.http.HttpResponseException: 400 Bad Request {"errorMessages":["Error in the JQL Query: Expecting operator but got '&'. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 12)"],"errors":{}}" Please see the collector output below: "016-01-15 11:45:00,000 INFO c.c.d.collector.CollectorTask - Running Collector: Jira 2016-01-15 11:45:00,021 INFO c.c.d.collector.FeatureCollectorTask - Starting Feature collection... 2016-01-15 11:45:00,044 INFO c.c.d.d.j.s.c.BaseConnectionImpl - Jira HttpRequestFactory has been generated successfully 2016-01-15 11:45:00,044 INFO c.c.d.d.j.s.c.ApiPropertiesSupplier - USER-AGENT-HDR: [SYSTEM INFO HEADER FOR JIRA API TRANSACTION: User Name of System: oracle; Main Application Jar: /apps/opt/tools/Hygieia/jira_feature_collector/target/jira_feature_collector_jar] 2016-01-15 11:45:00,101 INFO c.c.d.d.j.s.c.GetResponseBuilderImpl - Jira web response message has been successfully generated and transformed 2016-01-15 11:45:00,189 INFO c.c.d.c.team.TeamDataClientSetupImpl - Process took :0.145286611 seconds to update 2016-01-15 11:45:00,195 INFO c.c.d.d.j.s.c.BaseConnectionImpl - Jira HttpRequestFactory has been generated successfully 2016-01-15 11:45:00,196 INFO c.c.d.d.j.s.c.ApiPropertiesSupplier - USER-AGENT-HDR: [SYSTEM INFO HEADER FOR JIRA
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up HTTP POST request to JIRA using Java yields 400 bad request error, curl works fine up vote 0 down vote favorite So I'm trying to retrieve information about Jira issues through REST API using Java, however I keep getting the 400 error. I feel like there's something really stupid that I'm missing, can anyone help me find out what's wrong with this? EDIT: I realised that I'm not sending the username/password to Jira in the Java program, but I'm actually unsure how to do that... Help here would be great! Here is the code I have (company name edited): import java.io.*; import java.net.*; import java.util.*; public class JiraConnector { public static void main(String[] args) { try { //store necessary query information URL jiraURL = new URL("http://jira.somecompany.com/rest/api/2/search"); String data = "'{\"jql\":\"project = PROJ\"}'"; //establish connection and request properties HttpURLConnection connection = (HttpURLConnection)jiraURL.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Accept", "*/*"); connection.setRequestProperty("Content-Type", "application/json"); connection.setDoOutput(true); connection.setDoInput(true); connection.connect(); OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream()); wr.write(data.toString()); wr.flush(); wr.close(); Reader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); for (int c; (c = in.read()) >= 0; System.out.print((char)c)); } catch (MalformedURLException e) { System.err.println("MalformedURLException: " + e.getMessage()); } catch (java.net.UnknownServiceException e) { System.err.println("UnknownServiceException: " + e.getMessage()); } catch (IOException e) { System.err.println("IOException: " + e.getMessage()); } } } For the record, using this curl