Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,455,655
Community Members
 
Community Events
175
Community Groups

How to add some new "issue types" to issue-type-scheme via rest api ?

I need to add several new "issue types" to the existing schema. I can't find the method I need through rest-api.

3 answers

1 accepted

0 votes
Answer accepted

Hi!!!

This is the method that you are looking for if you are using Jira on Cloud.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-type-schemes/#api-rest-api-3-issuetypescheme-issuetypeschemeid-issuetype-put

But if you are using Jira Server/Data Center this method doesn’t exist.
You must follow the next flow by api rest:

https://docs.atlassian.com/software/jira/docs/api/REST/8.13.9/

1. Get the issuetypes of the project.

2. Create a new issuetype scheme with the issuetypes that you have got plus the new ones that you want to add.

3. Associate the new issuetype scheme with the project.

4. Delete the old issuetype scheme if you can and want to.

I hope I have helped you.

Best Regards

Txus

We followed below for adding issue type in issue type schema via REST API but it's not working and showing error (HTTP Status 405 – Method Not Allowed)

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-type-schemes/#api-rest-api-3-issuetypescheme-issuetypeschemeid-issuetype-put

 

https://docs.atlassian.com/software/jira/docs/api/REST/8.13.9/

We are getting below error while following
PUT method  https://domain/rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype

Body :{ "issueTypeIds": [ "10000", "10002", "10003" ] }

Error we getting is

<!doctype html>
<html lang="en">

<head>
<title>HTTP Status 405 – Method Not Allowed</title>
<style type="text/css">
body {
font-family: Tahoma, Arial, sans-serif;
}

h1,
h2,
h3,
b {
color: white;
background-color: #525D76;
}

h1 {
font-size: 22px;
}

h2 {
font-size: 16px;
}

h3 {
font-size: 14px;
}

p {
font-size: 12px;
}

a {
color: black;
}

.line {
height: 1px;
background-color: #525D76;
border: none;
}
</style>
</head>

<body>
<h1>HTTP Status 405 – Method Not Allowed</h1>
<hr class="line" />
<p><b>Type</b> Status Report</p>
<p><b>Description</b> The method received in the request-line is known by the origin server but not supported by the
target resource.</p>
<hr class="line" />
<h3>Apache Tomcat/8.5.81</h3>
</body>

</html>

Hi @Dmitrii 

I think this is what you are looking for 

Regards

Dave

I followed below curl call but still showing an error

PUT    https://domainname/rest/api/2/issuetypescheme/issuetypeschemeID

Body :

{
"name": "issue type name",
"description": "Anil adding issue types through REST API",
"issueTypeIds": [
"12300"
]
}


ERROR is
{
"errorMessages": [
"Cannot update IssueTypeScheme because an IssueType migration would be required."
],
"errors": {}
}

Suggest an answer

Log in or Sign up to answer