Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

REST API to get issue types of given project ? Edited

Hi 

 

I am trying the get the issue types using the REST API. I tried the below two APIs. 

 

  1. /rest/api/2/project/{projectIdOrKey}
  2. rest/api/2/issue/createmeta?projectKeys=XXX

 

In both the API result, i am getting 11 issue types. But in actual JIRA UI, I am seeing only 5 issue types.

 

 Is there any REST API available to get only the issue types displayed in the JIRA UI ? Any suggestion on this issue is really appreciated. Thanks in advance.

 

2 answers

The project API may be an easier way of getting the issue types:

GET /rest/api/2/project/{projectIdOrKey}

This allows you to pass the Project Key and get back most of the metadata about the project including the available issue types

@Brian_Clawson 

I was looking for Project Issue Types API for quite some time, just like project component and then I run through your suggestion .. thanks mate this solved my requirement

0 votes

Hi @Jegan Gopalakrishnan

I wouldn’t  expect either of those calls to return a list of issues

try

/rest/api/2/search?jql=project=“Project Key"

 

https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Query+issues

Hi @tom lister,

Thanks for the quick response. The API that you suggested, gives the list of issues under the project. I am looking for "issuetypes" : list of issuetypes available while creating the JIRA. 

Please let me know if you need any details on the issue. Thanks.

Like agilbert likes this

Hi @Jegan Gopalakrishnan

use

http://localhost:8090/rest/api/2/issue/createmeta?projectKeys=FRO3&expand=projects.issuetypes.fields

you will get the list of issue types available in a project and within the issues a list of fields available and their types  including whether they are mandatory. For select lists the allowed values are shown. This is the most complete information available and is the meta data required fro creating an issue.

Like # people like this

Hi @tom lister

Thanks for getting back to me on this. I tried your API. In that response also, I got required: "true" for all the 11 fields. 

 

"fields": {

"required": true,

...

}

 

Will there be any other reason, why I am unable to see all the 11 fields in the UI ? 

tom lister Community Leader Dec 27, 2018

Hi Jegan

What do you mean by UI? The view screen for issues?

Fields will only be shown if they have values. JIRA doesn't have any custom field value entries for fields until they exist for the specific issue.

My REST data shows a mixture of fields required and not required. I have no reason to believe it's not accurately reflecting the underlying configuration. If you think it's wrong that would be an Altassian support issue.

Hi Tom,

Thanks for helping me out. Will check with support regarding the issue in our Jira server. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

328 views 9 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you