Skip to content

Latest commit

 

History

History
87 lines (69 loc) · 2.33 KB

File metadata and controls

87 lines (69 loc) · 2.33 KB

Get SLA Policies

Get a list of all SLA policies. It supports the #pagination parameters.

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

URL Requires Auth HTTP Method
api/v1/livechat/sla YES GET

Headers

ArgumentExampleRequiredDescription
X-User-Idmyuser-nameRequiredThe authenticated user ID.
X-Auth-Tokenmyauth-tokenRequiredAuth token.

Example Call

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

Example Result

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