Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Receiving 400 Bad Request "The value 'DK' does not exist for the field 'project'." Rest API

Karsten Himmer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2018

Hi guys,

i had many variation tests ... nothing works!

I have a JiraRestClient more exact 

com.atlassian.jira.rest.client.api.SearchRestClient
..
.
.
..
SearchResult results = mySearchRestClient.searchJql("project=%27DK%27").claim();

Every variation ... i get a 

WARNUNG: jira rest client add comment error. cause: [ErrorCollection{status=400, errors={}, errorMessages=[The value 'DK' does not exist for the field 'project'..]}] 

BUT ... when i try 

https://xxxx.xxxx.de/tracker/rest/api/latest/search/?jql=project=%27DK%27 

It works ... the same credentials as in the java program ...

What is wrong in my code???

Any help would be appreciated - thanks!

 

1 answer

0 votes
Warren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2018

Hi

Try it without the %27 on each side (i.e. without the " on each side). I'm not sure if this will help, but the JQL seems happy to accept the project name with or without quotes

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events