Archive a policy
curl --request DELETE \
--url https://sla.thena.ai/v1/sla/policy/{id}import requests
url = "https://sla.thena.ai/v1/sla/policy/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://sla.thena.ai/v1/sla/policy/{id}', 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/policy/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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/policy/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sla.thena.ai/v1/sla/policy/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sla.thena.ai/v1/sla/policy/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"name": "High Priority Ticket SLA",
"description": "SLA policy for handling high priority tickets",
"entityType": "ticket",
"filter": {
"all": [
{
"entity": "ticket",
"field": "status",
"operator": "equals",
"values": [
{
"label": "Open"
}
]
}
],
"any": [
{
"entity": "ticket",
"field": "priority",
"operator": "in",
"values": [
{
"label": "High Priority"
},
{
"label": "Medium Priority"
}
]
}
]
},
"policyMetrics": [
{
"metric": "FIRST_RESPONSE_TIME",
"default": true,
"durationInMinutes": "120",
"specific": [
{
"entity": "ticket",
"field": "priority",
"operator": "equals",
"values": [
{
"label": "High Priority"
}
],
"durationInMinutes": "60"
}
]
}
],
"pauseConditions": {
"all": [
{
"entity": "ticket",
"field": "status",
"operator": "equals",
"values": [
{
"label": "Open"
}
]
}
],
"any": [
{
"entity": "ticket",
"field": "priority",
"operator": "in",
"values": [
{
"label": "High Priority"
},
{
"label": "Medium Priority"
}
]
}
]
},
"teamId": "<string>",
"organizationId": "<string>",
"version": 123,
"priority": 123,
"isActive": true,
"uid": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}SLA Policies
Archive a policy
DELETE
/
v1
/
sla
/
policy
/
{id}
Archive a policy
curl --request DELETE \
--url https://sla.thena.ai/v1/sla/policy/{id}import requests
url = "https://sla.thena.ai/v1/sla/policy/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://sla.thena.ai/v1/sla/policy/{id}', 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/policy/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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/policy/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sla.thena.ai/v1/sla/policy/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sla.thena.ai/v1/sla/policy/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"name": "High Priority Ticket SLA",
"description": "SLA policy for handling high priority tickets",
"entityType": "ticket",
"filter": {
"all": [
{
"entity": "ticket",
"field": "status",
"operator": "equals",
"values": [
{
"label": "Open"
}
]
}
],
"any": [
{
"entity": "ticket",
"field": "priority",
"operator": "in",
"values": [
{
"label": "High Priority"
},
{
"label": "Medium Priority"
}
]
}
]
},
"policyMetrics": [
{
"metric": "FIRST_RESPONSE_TIME",
"default": true,
"durationInMinutes": "120",
"specific": [
{
"entity": "ticket",
"field": "priority",
"operator": "equals",
"values": [
{
"label": "High Priority"
}
],
"durationInMinutes": "60"
}
]
}
],
"pauseConditions": {
"all": [
{
"entity": "ticket",
"field": "status",
"operator": "equals",
"values": [
{
"label": "Open"
}
]
}
],
"any": [
{
"entity": "ticket",
"field": "priority",
"operator": "in",
"values": [
{
"label": "High Priority"
},
{
"label": "Medium Priority"
}
]
}
]
},
"teamId": "<string>",
"organizationId": "<string>",
"version": 123,
"priority": 123,
"isActive": true,
"uid": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Path Parameters
Response
Operation successful
The name of the policy
Example:
"High Priority Ticket SLA"
The description of the policy
Example:
"SLA policy for handling high priority tickets"
The type of the entity
Example:
"ticket"
The filter of the policy
Show child attributes
Show child attributes
The metrics of the policy
Show child attributes
Show child attributes
The pause conditions of the policy
Show child attributes
Show child attributes
The unique identifier of the team
The unique identifier of the organization
The version number of the policy
The priority of the policy
Whether the policy is active
The unique identifier string of the policy
The creation timestamp of the policy
The last update timestamp of the policy
⌘I