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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 21, 2018 in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

1,194 views 10 18
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