When using the REST API and the issue/createmeta call to get the fields for a specific issue, the fields don't get returned, only the different issue types and some data about the project, when passing 'expand=projects.issuetypes.fields' and the project key and issue type like displayed on: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Discovering+meta-data+for+creating+issues and documented on http://docs.atlassian.com/jira/REST/latest/ like so: rest/api/2/issue/createmeta?projectKeys=QE&issuetypeIds=1&expand=projects.issuetypes.fields
The only way the fields are returned is if I don't specify a project key and issue type and only 'expand=projects.issuetypes.fields', but then I get EVERY project in a HUGE JSON blob.
This is for JIRA 5.1.
How do you execute request? Are you 100% sure that you send proper URL - especially is the & character send properly to server? What happen if you pass expand= as first query parameter and then select project or issue type?
If you run those queries from shell, then please make sure that you escapes URL with single quotes (shell interpretes ? and & characters when they are not escaped/quted).
Thanks for your hint with the parameter order. The first try as explained on the following site does not work where the *expand* paramter is at the end of the url. https://developer.atlassian.com/jiradev/api-reference/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue#JIRARESTAPIExample-CreateIssue-Fieldmeta-dataforcreatingissues But if I set the expand parameter before the other it works. Not work: rest/api/2/issue/createmeta?projectKeys=QE&issuetypeIds=1&expand=projects.issuetypes.fields Works: rest/api/2/issue/createmeta?expand=projects.issuetypes.fields&projectKeys=QE&issuetypeIds=1 Maybe it is also the solution for the question author @Nic Baumann.
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot