--- title: "SLA Policy" slug: "server-api-ticketing-sla-policy" updated: 2022-06-16T07:32:58Z published: 2022-06-16T07:32:58Z canonical: "developer.comm100.com/server-api-ticketing-sla-policy" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # SLA Policy ## SLA Policy Policy of ticketing sla. - `SLA Policies` - SLA Policies Manage - `GET ticketing/slaPolicies` - [Get the list of SLA Policies](/docs/server-api-ticketing-sla-policy#get-the-list-of-sla-policies) - `GET ticketing/slaPolicies/{id}` - [Get a single SLA Policy](/docs/server-api-ticketing-sla-policy#get-a-single-sla-policy) - `POST ticketing/slaPolicies` - [Create a new SLA Policy](/docs/server-api-ticketing-sla-policy#create-a-new-sla-policy) - `POST ticketing/slaPolicies/{id}:disable` - [Disable the SLA Policy](/docs/server-api-ticketing-sla-policy#disable-the-sla-policy) - `POST ticketing/slaPolicies/{id}:enable` - [Enable the SLA Policy](/docs/server-api-ticketing-sla-policy#enable-the-sla-policy) - `PUT ticketing/slaPolicies/{id}` - [Update the SLA Policy](/docs/server-api-ticketing-sla-policy#update-the-sla-policy) - `DELETE ticketing/slaPolicies/{id}` - [Remove the SLA Policy](/docs/server-api-ticketing-sla-policy#remove-the-sla-policy) ### SLA Policy JSON Format SLA Policy is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the SLA Policy. | | `isEnabled` | bool | Whether SLA Policy is enabled or not. | | `order` | integer | Order of the SLA Policy. | | `firstResponse` | integer | First response time of the SLA Policy. | | `nextResponse` | integer | Next response time of the SLA Policy. | | `resolution` | integer | Resolution time of the SLA Policy. | | `operationalHours` | string | Operating hours refer to the working hours of your company. Allowed values are "CalendarHour", "BusinessHour". | | `conditionMetType` | string | How conditions are matched. Allowed values are "any", "all", "logicalExpression". | | `logicalExpression` | string | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). | | `name` | string | Name of the SLA Policy. | | `slaPolicyConditions` | [slaPolicyConditions[]](/docs/server-api-ticketing-sla-policy#sla-policy-condition-json-format) | Reference to SLA Policy Condition. | ### SLA Policy Condition JSON Format: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the SLA Policy condition. | | `slaPolicyId` | guid | Id of the SLA Policy which the condition belongs to. | | `fieldName` | string | Name of the ticketing field you want to set value for. | | `operator` | string | How value for this condition field is matched. Allowed values are "contains", "notContains", "is", "isNot", "isMoreThan", "isLessThan", "before", "after", "regularExpression", "isOneOf", "isNotIn". | | `value` | string | Value of the condition field. | | `order` | integer | Order of the condition. | ### Get the list of SLA Policies `GET ticketing/slaPolicies` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "slaPolicyCondition". | - #### Response: An array of [SLA Policy](/docs/server-api-ticketing-sla-policy#sla-policy-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/slaPolicies \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "slaPolicies": [ { "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "isEnabled": true, "order": 1, "firstResponse": 1, "nextResponse": 2, "resolution": 3, "operationalHours": "BusinessHour", "conditionMetType": "all", "logicalExpression": "", "name": "Sla example", "slaPolicyConditions": [ { "id": "980cce41-58ae-43b2-8de8-37eea94da4a4", "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "fieldName": "{!Ticket.Status}", "operator": "is", "value": "resolved", "order": 1 } ] } ], "nextPage": null, "previousPage": null, "total": 1 } ``` ### Get a single SLA Policy `GET ticketing/slaPolicies/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "slaPolicyCondition". | - #### Response: [SLA Policy](/docs/server-api-ticketing-sla-policy#sla-policy-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "isEnabled": true, "order": 1, "firstResponse": 1, "nextResponse": 2, "resolution": 3, "operationalHours": "BusinessHour", "conditionMetType": "all", "logicalExpression": "", "name": "Sla example", "slaPolicyConditions": [ { "id": "980cce41-58ae-43b2-8de8-37eea94da4a4", "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "fieldName": "{!Ticket.Status}", "operator": "is", "value": "resolved", "order": 1 } ] } ``` ### Create a new SLA Policy `POST ticketing/slaPolicies` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `isEnabled` | bool | body | yes | Whether SLA Policy is enabled or not. | | `order` | integer | body | no | Order of the SLA Policy. | | `firstResponse` | integer | body | yes | First response time of the SLA Policy. | | `nextResponse` | integer | body | yes | Next response time of the SLA Policy. | | `resolution` | integer | body | yes | Resolution time of the SLA Policy. | | `operationalHours` | string | body | yes | Operating hours refer to the working hours of your company. Allowed values are "CalendarHour", "BusinessHour". | | `conditionMetType` | string | body | yes | How conditions are matched. Allowed values are "any", "all", "logicalExpression". | | `logicalExpression` | string | body | no | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). | | `name` | string | body | yes | Name of the SLA Policy. | | `slaPolicyConditions` | [slaPolicyConditions[]](/docs/server-api-ticketing-sla-policy#sla-policy-condition-json-format) | body | no | Condition of Sla policy. | - #### Response: [SLA Policy](/docs/server-api-ticketing-sla-policy#sla-policy-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/slaPolicies \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"isEnabled":true,"order":1,"firstResponse":1,"nextResponse":2,"resolution":3,"operationalHours":"BusinessHour","conditionMetType":"all","logicalExpression":"","name":"Sla example","slaPolicyConditions":[{"fieldName":"{!Ticket.Status}","operator":"is","value":"resolved","order":1}]}' ``` Response: HTTP/1.1 201 Created ``` { "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "isEnabled": true, "order": 1, "firstResponse": 1, "nextResponse": 2, "resolution": 3, "operationalHours": "BusinessHour", "conditionMetType": "all", "logicalExpression": "", "name": "Sla example", "slaPolicyConditions": [ { "id": "980cce41-58ae-43b2-8de8-37eea94da4a4", "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "fieldName": "{!Ticket.Status}", "operator": "is", "value": "resolved", "order": 1 } ] } ``` ### Disable the SLA Policy `POST ticketing/slaPolicies/{id}:disable` - #### Parameters: No Parameters - #### Response: [SLA Policy](/docs/server-api-ticketing-sla-policy#sla-policy-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648:disable \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "isEnabled": false, "order": 1, "firstResponse": 1, "nextResponse": 2, "resolution": 3, "operationalHours": "BusinessHour", "conditionMetType": "all", "logicalExpression": "", "name": "Sla example", "slaPolicyConditions": [ { "id": "980cce41-58ae-43b2-8de8-37eea94da4a4", "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "fieldName": "{!Ticket.Status}", "operator": "is", "value": "resolved", "order": 1 } ] } ``` ### Enable the SLA Policy `POST ticketing/slaPolicies/{id}:enable` - #### Parameters: No Parameters - #### Response: [SLA Policy](/docs/server-api-ticketing-sla-policy#sla-policy-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648:enable \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "isEnabled": true, "order": 1, "firstResponse": 1, "nextResponse": 2, "resolution": 3, "operationalHours": "BusinessHour", "conditionMetType": "all", "logicalExpression": "", "name": "Sla example", "slaPolicyConditions": [ { "id": "980cce41-58ae-43b2-8de8-37eea94da4a4", "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "fieldName": "{!Ticket.Status}", "operator": "is", "value": "resolved", "order": 1 } ] } ``` ### Update the SLA Policy `PUT ticketing/slaPolicies/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `isEnabled` | bool | body | yes | Whether SLA Policy is enabled or not. | | `order` | integer | body | no | Order of the SLA Policy. | | `firstResponse` | integer | body | yes | First response time of the SLA Policy. | | `nextResponse` | integer | body | yes | Next response time of the SLA Policy. | | `resolution` | integer | body | yes | Resolution time of the SLA Policy. | | `operationalHours` | string | body | yes | Operating hours refer to the working hours of your company. Allowed values are "CalendarHour", "BusinessHour". | | `conditionMetType` | string | body | yes | How conditions are matched. Allowed values are "any", "all", "logicalExpression". | | `logicalExpression` | string | body | no | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). | | `name` | string | body | yes | Name of the SLA Policy. | | `slaPolicyConditions` | [slaPolicyConditions[]](/docs/server-api-ticketing-sla-policy#sla-policy-condition-json-format) | body | no | Condition of Sla policy. | - #### Response: [SLA Policy](/docs/server-api-ticketing-sla-policy#sla-policy-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"isEnabled":true,"order":1,"firstResponse":1,"nextResponse":2,"resolution":3,"operationalHours":"BusinessHour","conditionMetType":"all","logicalExpression":"","name":"Sla example","slaPolicyConditions":[{"fieldName":"{!Ticket.Status}","operator":"is","value":"resolved","order":1}]}' ``` Response: HTTP/1.1 200 OK ``` { "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "isEnabled": true, "order": 1, "firstResponse": 1, "nextResponse": 2, "resolution": 3, "operationalHours": "BusinessHour", "conditionMetType": "all", "logicalExpression": "", "name": "Sla example", "slaPolicyConditions": [ { "id": "980cce41-58ae-43b2-8de8-37eea94da4a4", "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648", "fieldName": "{!Ticket.Status}", "operator": "is", "value": "resolved", "order": 1 } ] } ``` ### Remove the SLA Policy `DELETE ticketing/slaPolicies/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content