REST error "The value 'XXX' does not exist for the field 'project'."] Edited

Similar to issue https://jira.atlassian.com/browse/JRASERVER-36370, but I can't figure out how to see that solution!

I'm using Excel VBA (Microsoft XML v6.0 library, MSXML2.XMLHTTP60) to query Jira via the REST API, and if I start from a REST query with a jql clause that returns data correctly using rest/api/2/search, but then add a project filter into the jql, e.g. 'project in (a,b,c)' then the request fails with a return of 400 and a message of "The value 'a' does not exist for the field 'project'." for each of the projects requested.

The project names are correct, and if I paste my request uri into Chrome it works fine and returns data, although it actually fails in Edge with the same error interestingly.

1 answer

1 accepted

1 vote
Accepted answer

Hi Pat,

That specific error is an indicator that your REST call has not created a session yet.  There is a KB that better explains this in JIRA API with CURL throws error {"errorMessages":["The value 'XXX' does not exist for the field 'project'."],"errors":{}} 

Without a session created, Jira throws this error because without a session, the call has not made any kind of authentication with Jira yet.  Jira can still allow unauthenticated users/calls to result search results, but in cases like that Jira isn't going to divulge the names/keys of projects to unauthenticated users (unless the project has the browse permission opened up to the Anyone group).  Which is why you see an error here that the project does not exist.

I hope this helps,

Andy

Hi Andy,

Thanks for your help - that fixed it. I was using Basic Authentication, but I didn't realise certain data still wasn't available using that - haven't come across that in the documentation. I assume the reason it works in one browser and not another is because I already had a session open in Chrome.

Thanks,

Pat.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Mar 28, 2018 in Jira Software

Can a company’s culture make or break agile adoption?

Can a new-to-agile team survive and thrive in a non-agile culture? If so, what advice would you give to those trying to be agile in a non-agile culture? What's the key(s) to success? Share your thoug...

17,655 views 18 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you