curl --request POST \
--url https://sla.thena.ai/v1/sla/policy \
--header 'Content-Type: application/json' \
--data '
{
"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": "team-123456"
}
'import requests
url = "https://sla.thena.ai/v1/sla/policy"
payload = {
"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": "team-123456"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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: 'team-123456'
})
};
fetch('https://sla.thena.ai/v1/sla/policy', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => 'team-123456'
]),
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"
payload := strings.NewReader("{\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 \"teamId\": \"team-123456\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sla.thena.ai/v1/sla/policy")
.header("Content-Type", "application/json")
.body("{\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 \"teamId\": \"team-123456\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sla.thena.ai/v1/sla/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\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 \"teamId\": \"team-123456\"\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"
}Create a policy
curl --request POST \
--url https://sla.thena.ai/v1/sla/policy \
--header 'Content-Type: application/json' \
--data '
{
"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": "team-123456"
}
'import requests
url = "https://sla.thena.ai/v1/sla/policy"
payload = {
"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": "team-123456"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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: 'team-123456'
})
};
fetch('https://sla.thena.ai/v1/sla/policy', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => 'team-123456'
]),
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"
payload := strings.NewReader("{\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 \"teamId\": \"team-123456\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sla.thena.ai/v1/sla/policy")
.header("Content-Type", "application/json")
.body("{\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 \"teamId\": \"team-123456\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sla.thena.ai/v1/sla/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\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 \"teamId\": \"team-123456\"\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"
}Body
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
"team-123456"
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