Accessing all options when creating an issue

Chris Kwan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2021

Hi,

I'm trying to connect to the Jira API and retrieve all options for a custom field. From my research I will have to use "Get Create Issue Data" to retrieve this information. For context, I believe the company server is using the Rest API v2. 

So I am trying to follow the instructions outlined here

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-get 

I can retrieve all options for every project type with 

"/rest/api/2/issue/createmeta/"

But when I try to filter to only retrieve options for a specific project id with

"/rest/api/2/issue/createmeta/projectIds=16103"

It returns 404. I found the project id using inspect element and grabbing "value":"1603" that comes just after my desired project name.

Just wondering what I am doing wrong, this is my first time using the API, so I'm a little confused.

 

Thank you!

1 answer

1 accepted

1 vote
Answer accepted
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2021

Hello @Chris Kwan 

The projectIds is a parameter, and parameters are declared after the question mark, like this:

/rest/api/2/issue/createmeta?projectIds=16103

Next, you said "I believe the company server is using the Rest API v2" but the link in your post points to documentation for Jira CLOUD's v2 REST API documentation and you've added the tag 'cloud' to your question. You need to find out if you are using Jira Server or Jira Cloud as the REST APIs of the two can be quite different.

If your company is on Jira Cloud, you should think about using the v3 REST API, as development of v2 ended some time ago.

If your company is on Jira Server, there is no v3 REST API, only a v2 REST API and the documentation is here (this is for server v8.14.0, which is the most recent)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events