curl --request PATCH \
--url https://sla.thena.ai/v1/sla/policy/{id} \
--header 'Content-Type: application/json' \
--data '
{
"teamId": "team-123456",
"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"
}
]
}
]
}
}
'import requests
url = "https://sla.thena.ai/v1/sla/policy/{id}"
payload = {
"teamId": "team-123456",
"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" }]
}
]
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
teamId: 'team-123456',
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'}]
}
]
}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'teamId' => 'team-123456',
'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'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sla.thena.ai/v1/sla/policy/{id}"
payload := strings.NewReader("{\n \"teamId\": \"team-123456\",\n \"name\": \"High Priority Ticket SLA\",\n \"description\": \"SLA policy for handling high priority tickets\",\n \"entityType\": \"ticket\",\n \"filter\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n },\n \"policyMetrics\": [\n {\n \"metric\": \"FIRST_RESPONSE_TIME\",\n \"default\": true,\n \"durationInMinutes\": \"120\",\n \"specific\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n }\n ],\n \"durationInMinutes\": \"60\"\n }\n ]\n }\n ],\n \"pauseConditions\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://sla.thena.ai/v1/sla/policy/{id}")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"team-123456\",\n \"name\": \"High Priority Ticket SLA\",\n \"description\": \"SLA policy for handling high priority tickets\",\n \"entityType\": \"ticket\",\n \"filter\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n },\n \"policyMetrics\": [\n {\n \"metric\": \"FIRST_RESPONSE_TIME\",\n \"default\": true,\n \"durationInMinutes\": \"120\",\n \"specific\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n }\n ],\n \"durationInMinutes\": \"60\"\n }\n ]\n }\n ],\n \"pauseConditions\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n }\n}")
.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::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"teamId\": \"team-123456\",\n \"name\": \"High Priority Ticket SLA\",\n \"description\": \"SLA policy for handling high priority tickets\",\n \"entityType\": \"ticket\",\n \"filter\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n },\n \"policyMetrics\": [\n {\n \"metric\": \"FIRST_RESPONSE_TIME\",\n \"default\": true,\n \"durationInMinutes\": \"120\",\n \"specific\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n }\n ],\n \"durationInMinutes\": \"60\"\n }\n ]\n }\n ],\n \"pauseConditions\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n }\n}"
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"
}Update a policy
curl --request PATCH \
--url https://sla.thena.ai/v1/sla/policy/{id} \
--header 'Content-Type: application/json' \
--data '
{
"teamId": "team-123456",
"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"
}
]
}
]
}
}
'import requests
url = "https://sla.thena.ai/v1/sla/policy/{id}"
payload = {
"teamId": "team-123456",
"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" }]
}
]
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
teamId: 'team-123456',
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'}]
}
]
}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'teamId' => 'team-123456',
'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'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sla.thena.ai/v1/sla/policy/{id}"
payload := strings.NewReader("{\n \"teamId\": \"team-123456\",\n \"name\": \"High Priority Ticket SLA\",\n \"description\": \"SLA policy for handling high priority tickets\",\n \"entityType\": \"ticket\",\n \"filter\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n },\n \"policyMetrics\": [\n {\n \"metric\": \"FIRST_RESPONSE_TIME\",\n \"default\": true,\n \"durationInMinutes\": \"120\",\n \"specific\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n }\n ],\n \"durationInMinutes\": \"60\"\n }\n ]\n }\n ],\n \"pauseConditions\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://sla.thena.ai/v1/sla/policy/{id}")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"team-123456\",\n \"name\": \"High Priority Ticket SLA\",\n \"description\": \"SLA policy for handling high priority tickets\",\n \"entityType\": \"ticket\",\n \"filter\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n },\n \"policyMetrics\": [\n {\n \"metric\": \"FIRST_RESPONSE_TIME\",\n \"default\": true,\n \"durationInMinutes\": \"120\",\n \"specific\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n }\n ],\n \"durationInMinutes\": \"60\"\n }\n ]\n }\n ],\n \"pauseConditions\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n }\n}")
.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::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"teamId\": \"team-123456\",\n \"name\": \"High Priority Ticket SLA\",\n \"description\": \"SLA policy for handling high priority tickets\",\n \"entityType\": \"ticket\",\n \"filter\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n },\n \"policyMetrics\": [\n {\n \"metric\": \"FIRST_RESPONSE_TIME\",\n \"default\": true,\n \"durationInMinutes\": \"120\",\n \"specific\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n }\n ],\n \"durationInMinutes\": \"60\"\n }\n ]\n }\n ],\n \"pauseConditions\": {\n \"all\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"status\",\n \"operator\": \"equals\",\n \"values\": [\n {\n \"label\": \"Open\"\n }\n ]\n }\n ],\n \"any\": [\n {\n \"entity\": \"ticket\",\n \"field\": \"priority\",\n \"operator\": \"in\",\n \"values\": [\n {\n \"label\": \"High Priority\"\n },\n {\n \"label\": \"Medium Priority\"\n }\n ]\n }\n ]\n }\n}"
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
Body
The unique identifier of the team
"team-123456"
The name of the policy
"High Priority Ticket SLA"
The description of the policy
"SLA policy for handling high priority tickets"
The type of the entity
"ticket"
The filter of the policy
Show child attributes
Show child attributes
The metrics of the policy
Show child attributes
Show child attributes
[
{
"metric": "FIRST_RESPONSE_TIME",
"default": true,
"durationInMinutes": "120",
"specific": [
{
"entity": "ticket",
"field": "priority",
"operator": "equals",
"values": [{ "label": "High Priority" }],
"durationInMinutes": "60"
}
]
}
]The pause conditions of the policy
Show child attributes
Show child attributes
Response
Operation successful
The name of the policy
"High Priority Ticket SLA"
The description of the policy
"SLA policy for handling high priority tickets"
The type of the entity
"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