---
title: "REST APIs"
canonical: "https://support.appfire.com/space/TTS/46662426/REST%20APIs"
format: markdown
---
> Macro (aura-html)

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:

## 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](https://documenter.getpostman.com/view/6538836/SVfH1Xtp) 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](https://documenter.getpostman.com/view/15299464/TzJoF1nJ).

### 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](https://documenter.getpostman.com/view/15299464/Tzsfn5ju).

### 4. Saving the SLA definition

| **Method** | `POST` |
| --- | --- |
| **URL** | `/rest/tts-api/latest/sla` |

| **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** |
| --- |
| ```
{"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** |
| --- |
| ```
{"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** |
| --- |
| ```
{"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** |
| --- |
| ```
[
  {"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** |
| --- |
| ```
[
  {
    "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** |
| --- |
| ```
[
  {"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** |
| --- |
| ```
{ 
    "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** |
| --- |
| -description | **Example**<br>*description=Urgent* |
| -workflowName | **Example**<br>*workflowName=TTS Project Workflow* |
| -priorityId | **Example**<br>*priorityId=1* |
| -originStatusId | **Example**<br>*originStatusId=3* |
| -targetStatusId | **Example**<br>*targetStatusId=5* |
| -slaStartDateField | **Example**<br>*slaStartDateField=1* |
| -slaEndDateField | **Example**<br>*slaEndDateField=5* |
| -multipleTransition | **Example**<br>*multipleTransition=true* |
| -onlyFirstExecution | **Example**<br>*onlyFirstExecution=false* |
| -slaValueAsTimeString | **Example**<br>*slaValueAsTimeString=20m* |
| -slaNegotiationDateFieldId | **Example**<br>*slaNegotiationDateFieldId=11000* |
| -slaNegotiationDateIssueFieldKey | **Example**<br>*slaNegotiationDateIssueFieldKey=duedate* |
| -workingTimeId | **Example**<br>*workingTimeId=3* |
| -jqlString | **Example**<br>*jqlString=issuetype = Improvement* |

| **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** |
| --- |
| ```
[
    {
       "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** |
| --- |
| ```
[
    {
       "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** |
| --- |
| ```
[
    {
       "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** |
| --- |
| ```
{ 
    "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** |
| --- |
| ```
{"success":true,"message":"25"}
{"success":false,"message":"error message!"}
``` |

| **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** |
| --- |
| ```
{"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** |
| --- |
| ```
{"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** |
| --- |
| -slaId | **Example**<br>*slaId=26* |

| **Error response** |
| --- |
| ```
{"message":"Issue with given key "TTS-235" could not be found."}
``` |

| **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** |
| --- |
| ```
{
  "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** |
| --- |
| ```
{
  "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** |
| --- | --- |
| `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** |
| --- |
| -slaId | (Optional) Return only the SLA values for the given SLA ID.<br>**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=...` |
| --- |
| ```
{
  "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** |
| --- |
| `success":false,"message":"Issue not exists: TTS-313"}` |

| **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** |
| --- |
| ```
[
  {
    "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** |
| --- |
| ```
{
  "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** |
| --- |
| ```
{"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** | `GET` |
| --- | --- |
| **URL** | `{{baseUrl}}/rest/tts-api/1.0/sla-history-new?issueId=10400&slaId=339` |

> 📝 Using the work item key (for example, `APPFIRE-18`) will return a `404 Not Found` error. You must use the work item ID (for example, `10101`).

| **Possible Responses** |
| --- |
| ```
{
  "slaState": {
    "deadline": "2025-06-24T14:00:00Z",
    "remainingDuration": 28800,
    "overdueDuration": 0,
    "elapsedPercentage": 0,
    "state": "SUCCESS",
    "elapsedDuration": 0,
    "pausedDuration": 0,
    "startTime": "2025-06-23T14:09:09.895Z",
    "endTime": "2025-06-23T14:09:50.113Z",
    "startCondition": "Entered in 'In Progress' status",
    "endCondition": "Public comment from jira-software-users",
    "slaGoal": {
      "durationGoal": 28800,
      "nextBusinessDay": null,
      "fixedGoal": null
    },
    "goalCondition": "Remaining issues Duration='1d'",
    "slaGoalContext": {
      "type": "FIXED_DURATION",
      "duration": "1d"
    },
    "nbdGoalDeadline": null
  },
  "calendarName": "my calendar",
  "slaEventDtos": [
    {
      "authorName": "tomasz.szczucinski",
      "authorAvatarUrl": "http://localhost:8080/secure/useravatar?avatarId=10341",
      "eventTime": "2025-06-23T14:09:07.675Z",
      "stateType": null,
      "eventDuration": null,
      "eventType": "ISSUE_CREATED",
      "overallElapsed": null,
      "overallPaused": null,
      "overallOverdue": null,
      "isBreached": null
    },
    {
      "authorName": "tomasz.szczucinski",
      "authorAvatarUrl": "http://localhost:8080/secure/useravatar?avatarId=10341",
      "eventTime": "2025-06-23T14:09:09.895Z",
      "stateType": "RUNNING",
      "eventDuration": 0,
      "eventType": "START",
      "overallElapsed": 0,
      "overallPaused": 0,
      "overallOverdue": 0,
      "isBreached": false
    },
    {
      "authorName": "tomasz.szczucinski",
      "authorAvatarUrl": "http://localhost:8080/secure/useravatar?avatarId=10341",
      "eventTime": "2025-06-23T14:09:50.113Z",
      "stateType": "STOPPED",
      "eventDuration": null,
      "eventType": "STOP",
      "overallElapsed": 0,
      "overallPaused": 0,
      "overallOverdue": 0,
      "isBreached": false
    }
  ],
  "hoursOfBusinessDay": "8.00",
  "issueKey": "DRAGON-18"
}
``` |