Autocomplete the department name.
HTTP Method | URL | Requires Auth |
---|---|---|
GET | /api/v1/livechat/department.autocomplete | yes |
{% hint style="info" %} Permissions required:
view-livechat-departments
view-l-room
{% endhint %}
Key | Example Value | Description |
---|---|---|
selector * | { "exceptions" : [], "conditions" : {}} | Enter the exceptions or the conditions that you want to search for. |
onlyMyDepartments | true | Only displays the departments that you are assigned to. The value can be boolean true or false . |
showArchived | true | The result includes archived departments. The value can be boolean true or false . |
{% code overflow="wrap" %}
curl --location --request GET 'http://localhost:3000/api/v1/livechat/department.autocomplete?selector={} \
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'
{% endcode %}
{
"departments": [
{
"_id": "qajzu7WaBRoQBpq6Z",
"enabled": true,
"name": "Brazil",
"description": "",
"numAgents": 3,
"showOnRegistration": false,
"showOnOfflineForm": true,
"email": "brazil@rocketchat.com",
"_updatedAt": "2021-06-23T06:02:02.931Z",
"chatClosingTags": [],
"maxNumberSimultaneousChat": "",
"requestTagBeforeClosingChat": false,
"type": "d",
"waitingQueueMessage": "",
"abandonedRoomsCloseCustomMessage": "",
"departmentsAllowedToForward": "",
"offlineMessageChannelName": "",
"visitorInactivityTimeoutInSeconds": "",
"ancestors": []
},
{
"_id": "NhnC9dBwFonZqSQ5m",
"enabled": true,
"name": "CSM and Support",
"description": "",
"showOnRegistration": true,
"showOnOfflineForm": false,
"requestTagBeforeClosingChat": false,
"email": "br@rocketchat.com",
"chatClosingTags": [],
"offlineMessageChannelName": "",
"abandonedRoomsCloseCustomMessage": "",
"waitingQueueMessage": "",
"departmentsAllowedToForward": [
"CAJioQNAvLnYWTy8i",
"Z2KWYBJQFR7AzfmQL"
],
"_updatedAt": "2021-07-12T18:05:53.257Z",
"numAgents": 4
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}