REST API, issue/createmeta not returning fields when using expand=projects.issuetypes.fields

Hey there,

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: and documented on 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.


2 answers

2 votes

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. 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.

Like 1 person likes this

How do you execute this requests? It sounds like your request is being cut after &, which often happens when you try to execute request from command line - as (linux) shell uses & as 'run in background' - so it need to be escaped properly.

0 votes

That should just work fine. Are you sure the fields that you expect are there on Create screen?

I've tried every combination. Using issue id, issue name, project ID, project key, in different combinations for different projects. Everything. The only time I got fields was by only passing expand=projects.issuetypes.fields and nothing else.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

899 views 3 9
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