Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Button handy

...

blank

...

false
color

...

#0052CC

...

name

...

Cloud

...

linkhttps://appfire.atlassian.net/wiki/spaces/

...

TTSC/pages/

...

36209134/REST+

...

APIs

...

width

...

84

...

Button handy

...

blank

...

false
color

...

#EBECF0

...

name

...

On-Prem
linkhttps://appfire.atlassian.net/wiki/spaces/

...

TTS/pages/

...

46662426/REST+

...

Services
width85

Panel
panelIconIdatlassian-info
panelIcon:info:
bgColor#F4F5F7

This page is about Time to SLA for Jira Cloud. Using Jira ServerOn-Prem? Click the Server On-Prem button above.

Rest APIs can help you edit and view your SLA data.

...

To use these APIs, you need a JWT token for authorization.

To create a new token:

...

  1. Navigate to Settings > API Token

...

  1. .

...

  1. Image Added
  2. Click New Token to create a token.

...

...

  1. Name your token, select when it'll expire, or check the Never expire box to make sure the token doesn’t expire in a certain time period, and how much access it will have. Click Save.

...

  1. Image Added
Note

For security reasons, we do not recommend generating tokens that never expire. Please be aware that if this token is somehow exposed, you will need to delete it manually, as it will not expire automatically.

...

  1. The JWT Token will appear. Save it by clicking the icon shown below. Keep in mind that you won’t be able to access this code after closing the pop-up.

...

  1. Image Added

...

  1. Click Cancel after copying the token, and the token will appear on the main page.

...

  1. Replace {{jwtToken}} in the header with your token.

Note

Important note: Keep in mind that your JWT must have permission and access to use these APIs. For example, even if your JWT token has access to SLA APIs, you cannot utilize them if you do not have authority to view SLA configurations or administer SLAs.

...

We’ll give you an example of giving JWT authorization using Postman. 1.

  1. Open the TTS REST APIs documentation.

...

  1. Click Run in Postman > Postman for Web.

...

  1. Image Added

...

  1. On the Postman main page, click Workspaces > My Workspaces.

...

  1. Image Added

...

  1. Click ➕ to add a new permission.

...

  1. Image Added

...

  1. Here, to give authorization, first copy and paste the link of the token you’ve chosen from here.

Note

Please don't change the link to reflect your own instance. You can only change the parameters (i.e., issue ID, SLA ID, etc.).

...

  1. Click Headers.

...

  1. Under KEY, write Authorization.

...

  1. Under Value, write “Bearer (paste the token you’ve created and copied)

...

  1. Click Send.

...

  1. Image Added

...

  1. Tada! You’ve successfully given the JWT authorization.

If you don’t know how to get the issue-id on Cloud, you should know there are many ways you can do that. One way is that the issue ID will appear on the result of the below call, like this: BASE_URL/rest/api/3/issue/{issueKey}

...

For better comprehension, we included definitions for some values of an example response below.

Example Response for “Get Issue SLA of Issue”

Meaning

slaValueType

This is the SLA’s goal.

slaValue

This is also related to the the SLA goal. We keep this value in milliseconds.

startDate

If the SLA has started, this will show the start date. We keep this value in unix timestamp. If you want to convert it to human readable form date, you can use a converter.

endDate

If the SLA has finished, this will show the end date. We keep this value in unix timestamp. If you want to convert it to human readable form date, you can use a converter.

deadline

This is the Target Date. We keep this value in unix timestamp. If you want to convert it to human readable form date, you can use a converter.

elapsedDuration

Elapsed time is the total time the SLA has taken until this time.

remainingDuration

The time left until the SLA breaches.

overdueDuration

The time that has passed since the SLA was breached.

pausedDuration

The lenght of time that SLA has been paused.

workingDuration

This value is the same with elapsedDuration

.

{{baseUrl}}/rest/tts-api/1.0/sla-history-new?issueId=10400&slaId=339

This brings the information about SLA history

.

Panel
panelIconId26d4
panelIcon:no_entry:
panelIconText
bgColor#FFEBE6#F4F5F7

Setting Permissions