Versions Compared

Key

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

Auibuttongroup
idk6bthk4se78
titleTTS
alignmentleft
Auibutton
color#0052CC
idfusrvnnxae9
typestandard
titleServer
urlhttps://appfire.atlassian.net/wiki/spaces/TTS/pages/43876443/Install
targetfalse
Auibutton
color#F4F5F6
idrw3yzrn2izl
typestandard
titleCloud
urlhttps://appfire.atlassian.net/wiki/spaces/TTSC/pages/35684371/Install
Info

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

Table of Contents
maxLevel1

Calendar Rest API

Panel
bgColor#DEEBFF

Click here to reach Calendar REST API.

...

Next-Gen SLA Rest API

Panel
bgColor#DEEBFF

Click here to reach Next-Gen SLA REST API.

...

Additional Time to SLA Rest API

Panel
bgColor#DEEBFF

Click here to reach REST API.

Saving 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

POST Data


    "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"}

...

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 

...

Possible Responses

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

...

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],
    ...
}

...

Searching SLA definition

Method

GET

URL

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

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

...

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
    }
]

...

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":"Status validation error. [100] no such status."}

...

Deleting SLA definition

Method

DELETE

URL

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

...

Get SLA details for an issue

Method

GET

URL

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

Possible query parameters

-slaId

Example slaId=26

Error Response

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

...

Get SLA details for issues based on JQL

Method

GET

URL

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

Possible query parameters

-slaId

[Optional] sla filtering parameter 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

Warning

Attention

For performance and memory issues, we support pagination. Max 100 issues are returned for a single page, but you can navigate with the parameters returned from REST.

Result

{
    "totalIssues": 49,
    "pagesCount": 5,
    "start": 0,
    "niceStart": 1,
    "end": 10,
    "nextStart": 10,
    "previousStart": 0,
    "slas": [
        {
            ....// same REST response as above service
        },
        {
            ....// same REST response as above service
        }
    ]
}

...

Generating SLA data for existing issues

Method

GET

URL

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

...