REST APIs

REST APIs

Time to SLA provides REST APIs to help you view and manage your SLA configurations, calendars, and work items.

Here's an overview of what you can do:

View and manage SLAs

  • Get a list of all SLA definitions

  • Search SLAs by description, workflow, priority, and other parameters

  • Retrieve SLA configuration details by ID

  • Create a new SLA definition

  • Bulk-create multiple SLA definitions

  • Update an existing SLA definition

  • Delete an SLA definition

View and manage calendars

  • Get all Time to SLA calendars

  • Retrieve a specific calendar configuration by ID

  • Create a new calendar

  • Update an existing calendar

  • Delete a calendar

Get SLA data for work items

  • Get SLA details for a single issue

  • Get SLA details for multiple work items using JQL

  • Get the Time to SLA field values for a work item

  • Get the SLA Overview data for a work item

Regenerate and reset SLA data

  • Regenerate SLA data for a work item

  • Reset SLA data for a specific SLA on a work item (or for all SLAs on a work item)

View SLA history

  • Get the detailed SLA history for a work item and SLA, including key events and duration breakdowns

Prerequisites

Before you begin using the REST APIs, make sure that:

  • You have access to your Jira Data Center base URL.

  • Your Jira user has the necessary permissions to view and manage SLAs, calendars, and other Time to SLA configurations.

  • You know your Jira username and password (or another supported authentication method, such as a personal access token).

  • You have an API client, such as Postman, to send HTTP requests.

How to authenticate

  • Time to SLA for Jira Data Center uses Jira’s standard authentication. There is no separate Time to SLA API token.

  • The preferred authentication methods are OAuth and HTTP basic authentication.

  • Jira itself uses cookie-based authentication in the browser, so you can call REST from JavaScript on the page and rely on the authentication that the browser has established.

Examples

1. Calendars

Use these endpoints to list, create, update, and delete the calendars you have defined in Time to SLA. The Postman collection includes example requests, responses, and expected HTTP status codes.

2. SLAs

Use these endpoints to manage your SLA definitions: create new SLAs, search existing ones, update their configuration, or delete them. You’ll find full examples and response details in the Postman collection.

3. Custom fields

Use these endpoints to manage SLA-related custom fields, such as updating which SLAs are included in a given field. For request/response examples, refer to the Postman collection.

4. Saving the SLA definition

Method

POST

URL

/rest/tts-api/latest/sla

Sample result

Sample result

{"success":false,"message":"Failed when saving SLA: All fields cannot be empty"} {"success":true,"message":"35"}

Origin and target dates are custom fields

    "description":"Description of the SLA definition",     "workflowName":"Workflow name",     "slaStartDateField":10900, // date custom field Id     "slaEndDateField":10901,   // date custom field Id     "slaValueAsTimeString":"3h",     "jqlString":"",     "calendarId":-1, // -1 for 7x24, or calendarId     "multipleTransition":true,     "onlyFirstExecution":false }

Possible responses

Possible responses

{"success":true,"message":"34"} {"success":false,"message":"Failed when saving SLA: At least slaStartDateField or originStatusId should be provided"}

With negotiation time

 

 

    "description":"Description of the SLA definition",     "workflowName":"Workflow name",     "originStatusId":[1],     "targetStatusId":[6],     "slaNegotiationDateIssueFieldKey":"duedate",     "jqlString":"",     "calendarId":-1, // -1 for 7x24, or calendarId     "multipleTransition":true,     "onlyFirstExecution":false }

Possible Responses

Possible Responses

{"success":true,"message":"34"} {"success":false,"message":"Failed when saving SLA: At least slaStartDateField or originStatusId should be provided"}

With pauses

POST Data

    "description":"Description of the SLA definition",     "workflowName":"Workflow name",     "originStatusId":[1],     "targetStatusId":[6],     "slaNegotiationDateIssueFieldKey":"duedate",     "jqlString":"",     "calendarId":-1, // -1 for 7x24, or calendarId     "multipleTransition":true,     "onlyFirstExecution":false,     "pauseSlaArray":[1,5] }

Possible Responses

Possible Responses

{"success":true,"message":"34"} {"success":false,"message":"Failed when saving SLA: At least slaStartDateField or originStatusId should be provided"}

5. Bulk saving SLA definitions

Method

POST

URL

/rest/tts-api/latest/sla/bulk

Sample Result

Sample Result

[   {"success":true,"message":"34"},   {"success":false,"message":"Failed when saving SLA: At least slaStartDateField or originStatusId should be provided"} ]

An SLA with negotiation time and another one with the custom origin and target dates 

POST Data

POST Data

[   {     "description":"Description of the SLA definition",     "workflowName":"Workflow name",     "originStatusId":[1],     "targetStatusId":[6],     "slaNegotiationDateIssueFieldKey":"duedate",     "jqlString":"",     "calendarId":-1, // -1 for 7x24, or calendarId     "multipleTransition":true,     "onlyFirstExecution":false   },   {     "description":"Description of the SLA definition",     "workflowName":"Workflow name",     "slaStartDateField":10900, // date custom field Id     "slaEndDateField":10901,   // date custom field Id     "slaValueAsTimeString":"3h",     "jqlString":"",     "calendarId":-1, // -1 for 7x24, or calendarId     "multipleTransition":true,     "onlyFirstExecution":false   } ]

Possible Responses

Possible Responses

[   {"success":true,"message":"34"},   {"success":false,"message":"Failed when saving SLA: At least slaStartDateField or originStatusId should be provided"} ]

6. Showing SLA definition

Method

GET

URL

/rest/tts-api/latest/sla/{slaId}

Possible Responses

Possible Responses

    "id": 25,     "description":"Description of the SLA definition",     "workflowName":"Workflow name",     "originStatusId":[1],     "targetStatusId":[6],     ... }

7. Searching SLA definition

Method

GET

URL

/rest/tts-api/latest/sla/search

Identifiers for search operation

Identifiers for search operation

-description

Example 

description=Urgent

-workflowName

Example 

workflowName=TTS Project Workflow

-priorityId

Example 

priorityId=1

-originStatusId

Example 

originStatusId=3

-targetStatusId

Example 

targetStatusId=5

-slaStartDateField

Example 

slaStartDateField=1

-slaEndDateField

Example 

slaEndDateField=5

-multipleTransition

Example 

multipleTransition=true

-onlyFirstExecution

Example 

onlyFirstExecution=false

-slaValueAsTimeString

Example

slaValueAsTimeString=20m

-slaNegotiationDateFieldId

Example 

slaNegotiationDateFieldId=11000

-slaNegotiationDateIssueFieldKey

Example 

slaNegotiationDateIssueFieldKey=duedate

-workingTimeId

Example 

workingTimeId=3

-jqlString

Example 

jqlString=issuetype = Improvement

Responses for: /rest/tts-api/latest/sla/search

Responses for: /rest/tts-api/latest/sla/search

[     {        "id":24,        "description":"Urgent Handle",        "workflowName":"TTS Project Workflow",        "priorityId":"1",        "originStatusId":[1],        "targetStatusId":[3],        "slaValueAsTimeString":"20m",        "jqlString":"",        "pauseSlaArray":[           ],        "empty":false     },     {        "id":25,        "description":"Urgent Fix",        "workflowName":"TTS Project Workflow",        "priorityId":"1",        "originStatusId":[3],        "targetStatusId":[5],        "slaValueAsTimeString":"1h",        "jqlString":"",        "pauseSlaArray":[           ],        "empty":false     },     {        "id":28,        "description":"Trivial Finalize",        "workflowName":"TTS Project Workflow",        "priorityId":"5",        "originStatusId":[1],        "targetStatusId":[6],        "slaValueAsTimeString":"1d",        "jqlString":"",        "pauseSlaArray":[           1        ],        "empty":false     },     {        "id":26,        "description":"Normal Resolve",        "workflowName":"TTS Project Workflow",        "originStatusId":[1],        "targetStatusId":[5],        "slaValueAsTimeString":"4h",        "workingTimeId":1,        "jqlString":"priority != Blocker",        "pauseSlaArray":[           ],        "empty":false     },     {        "id":30,        "description":"Multiple Status SLA",        "workflowName":"TTS Project Workflow",        "originStatusId":[1,4],        "targetStatusId":[5,6],        "slaValueAsTimeString":"10m",        "jqlString":"issuekey = TP-29",        "pauseSlaArray":[           ],        "empty":false     } ]

Responses for: /rest/tts-api/latest/sla/search?description=Urgent

Responses for: /rest/tts-api/latest/sla/search?description=Urgent

[     {        "id":24,        "description":"Urgent Handle",        "workflowName":"TTS Project Workflow",        "priorityId":"1",        "originStatusId":[1],        "targetStatusId":[3],        "slaValueAsTimeString":"20m",        "jqlString":"",        "pauseSlaArray":[           ],        "empty":false     },     {        "id":25,        "description":"Urgent Fix",        "workflowName":"TTS Project Workflow",        "priorityId":"1",        "originStatusId":[3],        "targetStatusId":[5],        "slaValueAsTimeString":"1h",        "jqlString":"",        "pauseSlaArray":[           ],        "empty":false     } ]

Responses for: /rest/tts-api/latest/sla/search?description=Urgent&slaValueAsTimeString=20m

Responses for: /rest/tts-api/latest/sla/search?description=Urgent&slaValueAsTimeString=20m

[     {        "id":24,        "description":"Urgent Handle",        "workflowName":"TTS Project Workflow",        "priorityId":"1",        "originStatusId":[1],        "targetStatusId":[3],        "slaValueAsTimeString":"20m",        "jqlString":"",        "pauseSlaArray":[           ],        "empty":false     } ]

8. Listing all SLA definitions

Method

GET

URL

/rest/tts-api/latest/sla/allSlas

Possible Response

Possible Response

[     {        "id":24,        "description":"Urgent Handle",        "workflowName":"TTS Project Workflow",        "priorityId":"1",        "originStatusId":[1],        "targetStatusId":[3],        "slaValueAsTimeString":"20m",        "jqlString":"",        "pauseSlaArray":[           ],        "empty":false     },     {        "id":25,        "description":"Urgent Fix",        "workflowName":"TTS Project Workflow",        "priorityId":"1",        "originStatusId":[3],        "targetStatusId":[5],        "slaValueAsTimeString":"1h",        "jqlString":"",        "pauseSlaArray":[           ],        "empty":false     },     {        "id":28,        "description":"Trivial Finalize",        "workflowName":"TTS Project Workflow",        "priorityId":"5",        "originStatusId":[1],        "targetStatusId":[6],        "slaValueAsTimeString":"1d",        "jqlString":"",        "pauseSlaArray":[           1        ],        "empty":false     },     {        "id":26,        "description":"Normal Resolve",        "workflowName":"TTS Project Workflow",        "originStatusId":[1],        "targetStatusId":[5],        "slaValueAsTimeString":"4h",        "workingTimeId":1,        "jqlString":"priority != Blocker",        "pauseSlaArray":[           ],        "empty":false     },     {        "id":30,        "description":"Multiple Status SLA",        "workflowName":"TTS Project Workflow",        "originStatusId":[1,4],        "targetStatusId":[5,6],        "slaValueAsTimeString":"10m",        "jqlString":"issuekey = TP-29",        "pauseSlaArray":[           ],        "empty":false     } ]

9. Updating SLA definition

Method

POST

URL

/rest/tts-api/latest/sla

POST Data

POST Data

    "id": 25,    // SLA Id     "description":"Description of the SLA definition",     "workflowName":"Workflow name",     "originStatusId":[1],     "targetStatusId":[6],     "slaNegotiationDateIssueFieldKey":"duedate",     "jqlString":"",     "workingTimeId":-1, // -1 for 7x24, or workingCalendarId     "multipleTransition":true,     "onlyFirstExecution":false }

Possible Responses

Possible Responses

{"success":true,"message":"25"} {"success":false,"message":"error message!"}

Updating with Pauses

Updating with Pauses

    "id": 25,    // SLA Id     "description":"Description of the SLA definition",     "workflowName":"Workflow name",     "originStatusId":[1],     "targetStatusId":[6],     "slaNegotiationDateIssueFieldKey":"duedate",     "jqlString":"",     "workingTimeId":-1, // -1 for 7x24, or workingCalendarId     "multipleTransition":true,     "onlyFirstExecution":false,     "pauseSlaArray":[5,100] }

Possible Responses

Possible Responses

{"success":true,"message":"25"} {"success":false,"message":"Status validation error. [100] no such status."}

10. Deleting SLA definition

Method

DELETE

URL

/rest/tts-api/latest/sla/{slaId}

Possible Responses

Possible Responses

{"success":true,"message":"Deleted slaId with 25"}

11. Get SLA details for a work item

Method

GET

URL

/rest/tts-api/1.0/sla/issue/{issue-key}

Possible query parameters

Possible query parameters

-slaId

Example 

slaId=26

Error response

Error response

{"message":"Issue with given key "TTS-235" could not be found."}

SLA state: Running

SLA state: Running

{ "created": "2025-08-19T10:28:07.006981Z", "issueSlaId": 5, "issueKey": "GOT-21", "slaId": 1, "slaKey": { "id": 1 }, "slaName": "asdasd", "slaValueAsDurationString": "1d", "workingCalendarName": "7x24", "slaValueType": "SLA_VALUE", "slaOriginType": "STATUS", "slaTargetType": "STATUS", "slaOriginSourceName": null, "slaTargetSourceName": null, "slaValueSourceName": "Duration", "notMuchTime": 80, "slaStatus": "STILL", "slaValue": 86400, "endDate": null, "targetDate": "2025-08-20T10:22:41.013Z", "workingDuration": 325, "remainingDuration": 86074, "overdueDuration": 0, "pausedDuration": 0, "elapsedPercentage": 0, "inNonWorkingHours": false, "inNonWorkingDays": false, "inCriticalZone": false, "synchronizing": false, "lastStatusDate": "2025-08-19T10:28:07.006981Z", "businessDayHours": 24, "started": true, "startDate": "2025-08-19T10:22:41.013Z", "finished": false, "paused": false, "indexedState": "RUNNING" }

SLA state: Breached

SLA state: Breached

{ "created": "2025-08-19T10:30:22.260282Z", "issueSlaId": 2, "issueKey": "GOT-18", "slaId": 1, "slaKey": { "id": 1 }, "slaName": "asdasd", "slaValueAsDurationString": "1d", "workingCalendarName": "7x24", "slaValueType": "SLA_VALUE", "slaOriginType": "STATUS", "slaTargetType": "STATUS", "slaOriginSourceName": null, "slaTargetSourceName": null, "slaValueSourceName": "Duration", "notMuchTime": 80, "slaStatus": "EXCEED", "slaValue": 86400, "endDate": null, "targetDate": "2025-08-15T12:17:27.983Z", "workingDuration": 425574, "remainingDuration": 0, "overdueDuration": 339174, "pausedDuration": 0, "elapsedPercentage": 493, "inNonWorkingHours": false, "inNonWorkingDays": false, "inCriticalZone": true, "synchronizing": false, "lastStatusDate": "2025-08-19T10:30:22.260281Z", "businessDayHours": 24, "started": true, "startDate": "2025-08-14T12:17:27.983Z", "finished": false, "paused": false, "indexedState": "RUNNING" }

SLA state: Succeeded

SLA state: Succeeded

{ "created": "2025-08-19T10:29:53.027422Z", "issueSlaId": 1, "issueKey": "GOT-17", "slaId": 1, "slaKey": { "id": 1 }, "slaName": "asdasd", "slaValueAsDurationString": "1d", "workingCalendarName": "7x24", "slaValueType": "SLA_VALUE", "slaOriginType": "STATUS", "slaTargetType": "STATUS", "slaOriginSourceName": null, "slaTargetSourceName": null, "slaValueSourceName": "Duration", "notMuchTime": 80, "slaStatus": "SUCCESS", "slaValue": 86400, "endDate": "2025-08-14T12:17:25.361Z", "targetDate": "2025-08-15T11:23:18.308Z", "workingDuration": 3247, "remainingDuration": 83152, "overdueDuration": 0, "pausedDuration": 0, "elapsedPercentage": 4, "inNonWorkingHours": false, "inNonWorkingDays": false, "inCriticalZone": false, "synchronizing": false, "lastStatusDate": "2025-08-19T10:29:53.027422Z", "businessDayHours": 24, "started": true, "startDate": "2025-08-14T11:23:18.308Z", "finished": true, "paused": false, "indexedState": "FINISHED" }

Parameter explanations

Field

Description

Field

Description

slaStatus

Current state of the SLA (STILL/RUNNING, SUCCESS, EXCEED)

slaValueAsDurationString

SLA goal in a human-readable format (for example, "1d")

workingCalendarName

Calendar applied to the SLA (for example, "7x24")

targetDate

The expected end date of the SLA

endDate

The actual date when the SLA finished (if completed)

workingDuration

Elapsed time spent toward the SLA target

remainingDuration

Time left before the SLA breaches

overdueDuration

Time exceeded after SLA breach

elapsedPercentage

How much of the SLA target has been consumed (in %)

pausedDuration

Total time spent in pause conditions

inCriticalZone

Whether the SLA is close to breaching

indexedState

Internal index state (RUNNING / FINISHED)


12. Get SLA details for multiple work items (JQL-based)

Retrieve SLA data for multiple work items that match a given JQL query. This REST endpoint supports pagination, which is especially useful for exporting SLA statuses in bulk.

Method

GET

URL

/rest/tts-api/1.0/sla/issue/

Possible query parameters

Possible query parameters

-slaId

(Optional) Return only the SLA values for the given SLA ID. 

Example= slaId=26

-jql

Jql to filter issues that you want to get SLA details. Example jql=key in (ABC-34,ABC-35)

-index

The index of a result whose page you want the pager to start at.

-max

The maximum number of results in a page (cannot be greater than 100).

Response

To address performance and memory concerns, we implement pagination in our system. Each page can return a maximum of 100 issues. However, you can easily navigate through the pages using the parameters provided by the REST API.

Result of /rest/tts-api/1.0/sla/issue?jql=...

Result of /rest/tts-api/1.0/sla/issue?jql=...

{ "totalIssues": 20, "pagesCount": 1, "start": 0, "niceStart": 1, "end": 20, "nextStart": 20, "previousStart": 0, "slas": [ { "created": "2025-08-20T07:06:20.281475674Z", "issueSlaId": 2, "issueKey": "DRAGON-18", "slaId": 1, "slaKey": { "id": 1 }, "slaName": "My SLA 1", "slaValueAsDurationString": "1d", "workingCalendarName": "my calendar", "slaValueType": "SLA_VALUE", "slaOriginType": "STATUS", "slaTargetType": "STATUS", "slaOriginSourceName": null, "slaTargetSourceName": null, "slaValueSourceName": "Duration", "notMuchTime": 80, "slaStatus": "SUCCESS", "slaValue": 28800, "endDate": "2025-06-23T14:09:50.113Z", "targetDate": "2025-06-24T14:00:00Z", "workingDuration": 0, "remainingDuration": 28800, "overdueDuration": 0, "pausedDuration": 0, "elapsedPercentage": 0, "inNonWorkingHours": false, "inNonWorkingDays": false, "inCriticalZone": false, "synchronizing": false, "lastStatusDate": "2025-08-20T07:06:20.281475466Z", "businessDayHours": 8, "indexedState": "FINISHED", "finished": true, "startDate": "2025-06-23T14:09:09.895Z", "paused": false, "started": true }, { "created": "2025-08-20T07:06:20.284390966Z", "issueSlaId": 1, "issueKey": "DRAGON-17", "slaId": 1, "slaKey": { "id": 1 }, "slaName": "My SLA 1", "slaValueAsDurationString": "1d", "workingCalendarName": "my calendar", "slaValueType": "SLA_VALUE", "slaOriginType": "STATUS", "slaTargetType": "STATUS", "slaOriginSourceName": null, "slaTargetSourceName": null, "slaValueSourceName": "Duration", "notMuchTime": 80, "slaStatus": "EXCEED", "slaValue": 28800, "endDate": null, "targetDate": "2025-06-24T14:00:00Z", "workingDuration": 954380, "remainingDuration": 0, "overdueDuration": 925580, "pausedDuration": 0, "elapsedPercentage": 3314, "inNonWorkingHours": false, "inNonWorkingDays": false, "inCriticalZone": true, "synchronizing": false, "lastStatusDate": "2025-08-20T07:06:20.284390633Z", "businessDayHours": 8, "indexedState": "RUNNING", "finished": false, "startDate": "2025-06-23T14:00:32.314Z", "paused": false, "started": true }, ...
  • "totalIssues": 250, → The total number of work items returned by the JQL. This does not indicate the number of SLA entries. Some work items may not have SLA data.

  • "pagesCount": 9, → The total number of pages. This always returns 9 due to a bug, so please ignore this value.

  • "start": 100, → The starting index of the current page.

  • "niceStart": 101, → The starting index in human-readable format (starts at 1).

  • "end": 200, → The ending index of the current page.

  • "nextStart": 200, → The index to use for the next page request.

  • "previousStart": 0, → The index for the previous page.


13. Get 'Time to SLA' field for the work item

Method

GET

URL

/rest/tts-api/1.0/sla/timeToSla/{issue-key}

Possible Responses

Possible Responses

success":false,"message":"Issue not exists: TTS-313"}

Possible Responses

Possible Responses

[ { "slaId": 1, "slaName": "My SLA 1", "originStatusName": "In Progress", "targetStatusName": null, "slaValue": 480, "slaValueAsString": "1d", "statusDate": 1750687749895, "targetDate": 1750773600000, "overdue": null, "started": true }, { "slaId": 1, "slaName": "My SLA 1", "originStatusName": "In Progress", "targetStatusName": null, "slaValue": 480, "slaValueAsString": "1d", "statusDate": 1750687749895, "targetDate": 1750773600000, "overdue": null, "started": true }, { "slaId": 1, "slaName": "My SLA 1", "originStatusName": "In Progress", "targetStatusName": null, "slaValue": 480, "slaValueAsString": "1d", "statusDate": 1750687749895, "targetDate": 1750773600000, "overdue": null, "started": true } ]

14. Get 'SLA Overview' data for the work item

Method

GET

URL

/rest/tts-api/latest/sla/overview/{issue-key}

Possible responses

Possible responses

[ { "timePerformed": "2025-06-23T14:09:09.895+00:00", "slaValueType": "SLA_VALUE", "workingDuration": "0", "workingDurationAsSeconds": 0, "pausedDuration": "0", "pausedDurationAsSeconds": 0, "slaValueAsMinutes": 480, "slaValueAsTimeString": "1d", "status": "SUCCESS", "breachString": null, "breachAsSeconds": null, "originDate": "2025-06-23T14:09:09.895+00:00", "statusDate": "2025-08-20T07:08:42.676+00:00", "expectedTargetDate": "2025-06-24T14:00:00.000+00:00", "actualTargetDate": "2025-06-23T14:09:50.113+00:00", "negotiationDateProvidedByCustomField": false, "workingCalendar": "my calendar", "slaName": "My SLA 1", "issueKey": "DRAGON-18", "issueId": 10101, "finished": true, "paused": false, "started": true, "elapsedPercentage": 0, "workingHoursOfWorkingDay": 8, "formattedExpectedTargetDate": "24/Jun/25 4:00 PM", "formattedActualTargetDate": "23/Jun/25 4:09 PM", "formattedOriginDate": "23/Jun/25 4:09 PM", "frmtActualTargetDate": "23/Jun/25 4:09 PM", "frmtExpectedTargetDate": "24/Jun/25 4:00 PM", "frmtOriginDate": "23/Jun/25 4:09 PM", "frmtStatusDate": "20/Aug/25 9:08 AM", "calendarId": null } ]

15. Generating SLA data for existing work items

Method

GET

URL

/rest/tts-api/latest/sla/regenerate/{issue-key}

Possible Responses

Possible Responses

{ "success": true, "message": "", "code": 0, "errorType": null }

16. Resetting SLA

Method

POST

URL

/rest/tts-api/latest/sla/reset/{issue-id}/{sla-id}

POST form param

"date=timeAsMillis"  (as long, time millis, optional. if not set, current time will be used)

{issue-id} required parameter where {sla-id} is optional. If {sla-id} is not provided, then all SLAs for the work item will be reset.

Possible Responses

Possible Responses

{"success":true,"message":""} {"success":true,"message":"There are no generated SLA data for issue: TTS-313"} {"success":false,"message":"Unauthorized user"} {"success":false,"message":"Issue not exists: TTS-313"}

17. Get SLA History

Method

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.