Create issue via REST API - what shoudl fields / update data look like?

Hi there,

I am trying to create an automated issue creation / cloning process from our Connect App … On the create issue point https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-post … the fields and update just has {} as the example in the documentation.

Please advise what that data should look like for the various fields? Or where I can look for that information?

I am currently having myself create new test custom fields of all the available field types and check what comes back on the get and what is needed for the create part. And it seems very tedious … Am I alone in this?

Thank you

Hi @YatishMadhav,

The fields required are dependent on how the project has been configured so it’s not feasible/sensible to document what these fields should look like.

I think your app will need to retrieve project metadata to determine what fields are necessary for the project that the issue is being created in.

Maybe others in the community have worked through this issue and have suggestions?

Regards,
Dugald

Thanks for the reply @dmorrow

Yes, I am using the create meta endpoint to determine this too. I just think it’s not very helpful for a blank object {} in the API docco examples. Particularly for the various field types that are available … eg for an issue type in a project, i have 1 of each field type and I want to populate each, how does one know the format of that.

Though I have been referring to the Field input formats section on https://developer.atlassian.com/server/jira/platform/rest-apis/ which is Server docco. Doesn’t seem right but it works :slight_smile:

Hope this clears it and aids in improving the documentation?

Thank you
Yatish