Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
85 lines (67 loc) · 2.35 KB

File metadata and controls

85 lines (67 loc) · 2.35 KB

Get List of SLA Policies

HTTP MethodURLRequires Auth
GET/api/v1/livechat/slayes

{% hint style="info" %} You are required to have the manage-livechat-sla or view-l-room permission. {% endhint %}

Query Parameters

This endpoint supports the optional #pagination parameters. Additional optional parameters are as follows:

KeyExample ValueDescription
textslaTestThe text with which you want to filter the result.

Example Call

curl --location 'http://localhost:3000/api/v1/livechat/sla' \
--header 'X-Auth-Token: q2zjkgQt_OmYaBY4nEp50-r7yUAqVIoAqgo0jjBIws5' \
--header 'X-User-Id: rYhzFRd2QZjNwAAXX'

Example Response

Success

{
    "sla": [
        {
            "_id": "641daf3d7718f90c810429c8",
            "name": "Minimal",
            "description": "2m UI creat",
            "dueTimeInMinutes": 2,
            "_updatedAt": "2023-03-24T14:10:05.063Z"
        },
        {
            "_id": "6417f67528384134ed600dc6",
            "name": "Try",
            "description": "Based on 1 min",
            "dueTimeInMinutes": 1,
            "_updatedAt": "2023-03-20T06:00:21.736Z"
        }
    ],
    "count": 2,
    "offset": 0,
    "total": 2,
    "success": true
}

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.
  • No Permission: This occurs when the authenticated user doesn't have manage-livechat-sla or view-l-room permission.

{% tabs %} {% tab title=" Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="No Permission" %}

{
    "success": false,
    "error": "error-not-authorized"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
6.0.0 Added