Hi everyone. I am trying to get all the fields metadata for a specific project issue type so I can render different inputs for different issue types of different projects.
I am currently doing a GET HTTP request via Insomnia to the following URL:
my_base_url/rest/api/2/issue/createmeta?projectKeys=MY_PROJ_KEY&expand=projects.issuetypes.fields
The base url and project key are 100% correct but I get the following error when doing the HTTP call:
{ "errorMessages": [ "Issue Does Not Exist" ], "errors": {} }
Other v2 API calls work. The question is, what is the issue here or what other ways do I have to get the create metadata fields for a specific project and issue type.
Hi @George Remus -- Welcome to the Atlassian Community!
For Jira Cloud, use this one:
For Jira Data Center, use this one:
https://docs.atlassian.com/software/jira/docs/api/REST/9.13.0/#api/2/issue-getCreateIssueMetaFields
Kind regards,
Bill
Hi Bill. Thank you for the response.
The issue is that the https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get you talked about does not return information of what types of fields to be rendered in the UI. like for example for what fields to load what type of input(e.g. autocomplete, select, multiselect, textfield etc). I need this because I want to render a jira create issue form and the inputs differ for project and issueType combination.
The API endpoint that I see it should help me is this one: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-get because I can give the expand query param, and apparently it should return the information I need about the fields. But the issue here is that, if I call this API endpoint I always get this response:
{
"errorMessages": [
"Issue Does Not Exist"
],
"errors": {}
}
with status code 404. Could it be some permissions issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That v2 one still works for me for an example project, as you have called it. Have you tried using a different user's credentials (or API token)?
And...you may have noticed that v2 endpoint is deprecated: https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304
And so with the new one, I suspect each field's information would need to be checked with additional calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solved it. It was some permissions issues and this is why I was not able to get the fields metadata. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're not using REST API documentation for the right version of Jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.