Skip to main content
GET
/
v1
/
sla
/
duration
Get the duration left for a job
curl --request GET \
  --url https://sla.thena.ai/v1/sla/duration
import requests

url = "https://sla.thena.ai/v1/sla/duration"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://sla.thena.ai/v1/sla/duration', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sla.thena.ai/v1/sla/duration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://sla.thena.ai/v1/sla/duration"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sla.thena.ai/v1/sla/duration")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sla.thena.ai/v1/sla/duration")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "durationToBreachWorkingMinutes": 120,
  "status": "running",
  "nextAttemptAt": "2024-03-21T10:00:00Z",
  "pausedAt": "2024-03-21T10:00:00Z",
  "resumedAt": "2024-03-21T10:00:00Z",
  "pausedDurationInWorkingMinutes": 120,
  "breachedAt": "2024-03-21T10:00:00Z",
  "achievedAt": "2024-03-21T10:00:00Z",
  "cancelledAt": "2024-03-21T10:00:00Z",
  "createdAt": "2024-03-21T10:00:00Z"
}

Query Parameters

organizationId
string
required

The unique identifier of the organization

Example:

"org-123456"

teamId
string
required

The unique identifier of the team

Example:

"team-123456"

entityId
string
required

The unique identifier of the entity

Example:

"entity-123456"

entityType
string
required

The type of the entity

Example:

"issue"

metric
enum<string>
required

The metric to be used for the SLA job

Available options:
first_time_response,
next_time_response,
total_resolution_time,
update_time
Example:

"response_time"

Response

Operation successful

durationToBreachWorkingMinutes
number
required

The remaining duration in working minutes until SLA breach

Example:

120

status
enum<string>
required

The current status of the SLA job

Available options:
scheduled,
running,
achieved,
breached,
cancelled,
paused,
not_scheduled,
resumed
Example:

"running"

nextAttemptAt
string<date-time>
required

The timestamp for the scheduled next attempt

Example:

"2024-03-21T10:00:00Z"

pausedAt
string<date-time>
required

The timestamp when the job was paused

Example:

"2024-03-21T10:00:00Z"

resumedAt
string<date-time>
required

The timestamp when the job was resumed

Example:

"2024-03-21T10:00:00Z"

pausedDurationInWorkingMinutes
number
required

The paused duration in working minutes

Example:

120

breachedAt
string<date-time>
required

The timestamp when the job was breached

Example:

"2024-03-21T10:00:00Z"

achievedAt
string<date-time>
required

The timestamp when the job was achieved

Example:

"2024-03-21T10:00:00Z"

cancelledAt
string<date-time>
required

The timestamp when the job was cancelled

Example:

"2024-03-21T10:00:00Z"

createdAt
string<date-time>
required

The timestamp when the job was created

Example:

"2024-03-21T10:00:00Z"