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,555,397
Community Members
 
Community Events
184
Community Groups

Create SLA using REST API

Hey community!

Is there an option to create/modify SLA in Jira SM using API?

I am researching an option, because we want to avoid human errors during routine operations. EG, when adding a new queue, we have to create also SLA for it, same when editing.

 

https://developer.atlassian.com/cloud/jira/service-desk/rest/intro/ says nothing about it 

3 answers

1 accepted

Hello, 

 

I have managed to automate this via submitting a JSON to 

 

https://{Organization}.atlassian.net/rest/servicedesk/1/servicedesk/agent/{Project}/sla/metrics/{SLA.id}

 

Example JSON to POST 

 

{
"id": 20,
"name": "Time to first response",
"config": {
"definition": {
"start": [
{
"pluginKey": "com.atlassian.servicedesk",
"factoryKey": "issue-created-sla-condition-factory",
"conditionId": "issue-created-hit-condition",
"type": "Start",
"name": "Issue Created",
"missing": false
}
],
"pause": [
{
"pluginKey": "com.atlassian.servicedesk",
"factoryKey": "status-sla-condition-factory",
"conditionId": "10057",
"type": "Pause",
"name": "Status: ON HOLD",
"missing": false
}
],
"stop": [
{
"pluginKey": "com.atlassian.servicedesk",
"factoryKey": "comment-sla-condition-factory",
"conditionId": "comment-for-reporter-hit-condition",
"type": "Stop",
"name": "Comment: For Customers",
"missing": false
}
],
"inconsistent": false
},
"goals": [
{
"id": "856",
"jqlQuery": "type = \"Incident Request\"",
"defaultGoal": false,
"calendarName": "24/7 Calendar (Default)",
"timeMetricId": 0,
"duration": 1800000
},
{
"id": "892",
"jqlQuery": "",
"calendarId": 13,
"defaultGoal": true,
"timeMetricId": 0,
"duration": 28800000
}
],
"slaDisplayFormat": "NEW_SLA_FORMAT"
}
}

 

Also interestd in such functionality. 

I haven't been able to find anything about this, either. We're building a new Service Management project with multiple components, and I'd like to be able to modify SLA definitions programmatically.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events