JIRA API with CURL throws error {"errorMessages":["The value 'XXX' does not exist for the field 'project'."],"errors":{}}

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

There is an issue with REST API using CURL

  • When running the REST URL using the browser , the JSON response is OK
  • When running the REST URL using CURL with PHP, user receives the following error : 
 
{"errorMessages":["The value 'XXX' does not exist for the field 'project'."],"errors":{}}

Cause

A session needs to be created. 

Resolution

Create a session as per https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-cookie-based-authentication and use the JSESSIONID in the request header.

Last modified on Oct 13, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.