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

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 Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,175 views 6 19
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot