The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Update SLA via REST API JIRA Service Desk

Phoenix
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!
November 23, 2017

Hi,

I writing a small powershell script to create a workaround for our SLA problem (we are already in contact with Atlassian Support to fix the root cause). The problem is, that the workaround explained here https://confluence.atlassian.com/jirakb/missing-sla-data-in-jira-servicedesk-828790603.html, works fine except, that someone manually have to do the following step:

"Navigate to the Service Desk Project Administration and click on the "(warning) Update" icon under the SLAs section."

I was wondering, if someone knows an API way to do this particular step (unfortunately I couldn't find one)

Cheers

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Victor Alvarez
November 23, 2017

Try this, It works well for me

/rest/servicedesk/1/servicedesk/sla/admin/task/destructive/reconstruct?force=true

Headers:
* Authorization: User/Password
* Content-Type: application/json


Put in the Body an array of issues, for instance:
["PROJECTKEY-1234"]

0 votes
Paulo Hennig
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2017

Hi, Phoenix.
If you don't have a Rest client, you can also proceed with that within a cURL command as my example below where I'm reconstructing the SLA of the issue "DEVSPT-1453"

curl -D- -u username:password -X POST -H "Content-Type: application/json" --data '["DEVSPT-1453"]' "http://jira_server/rest/servicedesk/1/servicedesk/sla/admin/task/destructive/reconstruct"

Just ensure to rename the username/password in order to authenticate correctly and also jira_server according to your instance's FQDN. 

0 votes
Alexey Matveev
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 Champions.
November 23, 2017

Hello, 

You can open the browser you use for browsing your Jira site and go to developer tools. Then you push the update button and check what rest call was used on the Network tab of your developer tools window.

Anyway it will be internal REST API which can be changed by Atlassian any time. 

For example, in my version of Service Desk it is POST /rest/servicedesk/1/servicedesk/projectkey/sla/consistency. 

Comments for this post are closed

Community moderators have prevented the ability to post new answers.