Get SLA
URL : v3/api/get-enforcer/sla/{slaId}
Method : GET
Response :
{
"success": true,
"data": {
"sla": {
"id": 84,
"name": "Test Sla",
"status": 1,
"order": 1,
"matcher": "all",
"is_default": 0,
"internal_notes": "",
"created_at": "2019-12-09 11:12:15",
"updated_at": "2019-12-09 11:12:15",
"sla_meta": [{
"id": 14,
"ticket_sla_id": 14,
"priority_id": 1,
"respond_within": "diff::1~hour",
"resolve_within": "diff::1~hour",
"business_hour_id": 1,
"send_email_notification": 1,
"send_app_notification": 1,
"priority": {
"name": "Low",
"id": 1
},
"business_hour": {
"id": 1,
"name": "Default Business-Hours"
}
}],
"reminders": {
"approaching": [{
"id": 65,
"reminder_delta": "diff::10~minute",
"type": "response",
"reminder_receivers": {
"agents": [{
"id": 1,
"name": "Demo Admin"
}],
"agent_types": [{
"id": 1,
"name": "User"
}]
}
}, {
"id": 66,
"reminder_delta": "diff::10~minute",
"type": "resolution",
"reminder_receivers": {
"agents": [{
"id": 1,
"name": "Demo Admin"
}],
"agent_types": [{
"id": 1,
"name": "User"
}]
}
}],
"violated": [{
"id": 65,
"reminder_delta": "diff::10~minute",
"type": "response",
"reminder_receivers": {
"agents": [{
"id": 1,
"name": "Demo Admin"
}],
"agent_types": [{
"id": 1,
"name": "User"
}]
}
}, {
"id": 66,
"reminder_delta": "diff::10~minute",
"type": "resolution",
"reminder_receivers": {
"agents": [{
"id": 1,
"name": "Demo Admin"
}],
"agent_types": [{
"id": 1,
"name": "User"
}]
}
}]
},
"rules": [{
"id": 1085,
"field": "subject",
"relation": "equal",
"value": "something",
"rules": []
}, {
"id": 1086,
"field": "status_id",
"relation": "not_equal",
"value": {
"id": 1,
"name": "Open"
},
"rules": []
}],
"priority": {
"name": "Low",
"id": 1
},
"business_hour": {
"id": 1,
"name": "Default Business-Hours"
}
}
}
}
Post SLA Reminders
URL : api/post-enforcer
Method : POST
Request Body :
{
"data": {
"id": null,
"name": "test Sla",
"status": 1,
"order": 1,
"matcher": "all",
"sla_meta": [{
"priority_id": 1,
"business_hour_id": 1,
"send_email_notification": 1,
"send_app_notification": 1,
"respond_within": "diff::2~minute",
"resolve_within": "diff::2~minute"
}],
"rules": [{
"id": null,
"field": "subject",
"relation": "equal",
"value": "something"
}, {
"id": null,
"field": "status_id",
"relation": "not_equal",
"value": 1
}],
"reminders": {
"approaching": [{
"id": null,
"reminder_delta": "diff::10~minute",
"reminder_receivers": {
"agents": [1],
"agent_types": [1]
},
"type": "response"
}, {
"id": null,
"reminder_delta": "diff::10~minute",
"reminder_receivers": {
"agents": [1],
"agent_types": [1]
},
"type": "resolution"
}],
"violated": [{
"id": null,
"reminder_delta": "diff::10~minute",
"reminder_receivers": {
"agents": [1],
"agent_types": [1]
},
"type": "response"
}, {
"id": null,
"reminder_delta": "diff::10~minute",
"reminder_receivers": {
"agents": [1],
"agent_types": [1]
},
"type": "resolution"
}]
}
},
"type": "sla"
}
Response:
{
"success": true,
"message":"Saved Successfully"
}
Delete SLA Rule
URL : api/delete-enforcer/rule/{ruleId}
Method : DELETE
Response:
{
"success": true,
"message":"Deleted Successfully"
}
Delete SLA Reminder
URL : api/delete-enforcer/reminder/{reminderId}/{reminderType}
Reminder Type can be ‘approaching’ or ‘violated’
Method : DELETE
Response:
{
"success": true,
"message":"Deleted Successfully"
}
Reorder SLAs
URL : api/reorder-enforcer-list
Method : POST
Parameters:
| Name | Data Type | Required / Optional | Description |
| enforcers | Array | Required | List of enforcers in sorted format. See below the body |
| type | String | Required | value will be ‘sla’, since the same API could be used for reordering Workflow/Listener |
Request body:
{
"enforcers": [1, 2, 4, 6], // enforcer ids in sorted form
"type": "sla"
}
Response:
{
"success": true,
"message":"Reordered Successfully"
}
SLA List
URL : api/get-enforcer-list
Method : GET
Parameters:
| Name | Data Type | Required / Optional | Description |
| type | String | Required | value will be ‘sla’, since the same API could be used for Workflow/Listener |
Response:
{
"success": true,
"data": {
"current_page": 1,
"data": [{
"id": 1,
"name": "SLA one",
"status": 1,
"order": 1,
"matcher": "any",
"created_at": "2019-12-09 23:17:57",
"updated_at": "2019-12-09 23:20:34"
}, {
"id": 1,
"name": "SLA two",
"status": 1,
"order": 1,
"matcher": "any",
"created_at": "2019-12-09 23:17:57",
"updated_at": "2019-12-09 23:20:34"
}],
"first_page_url": "http:\/\/localhost:8888\/faveo-helpdesk-advance\/public\/api\/get-enforcer-list?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http:\/\/localhost:8888\/faveo-helpdesk-advance\/public\/api\/get-enforcer-list?page=1",
"next_page_url": null,
"path": "http:\/\/localhost:8888\/faveo-helpdesk-advance\/public\/api\/get-enforcer-list",
"per_page": 10,
"prev_page_url": null,
"to": 1,
"total": 2
}
}