Gets all existing filter parameters. The filter has one limitation – the interval between parameters start
and end
cannot be bigger than 90 days.
Permissions
---- Permissions:INTEGRATOR,SUPERVISOR ----
Request Parameters
Key | Type | Description | Example |
start | date | Beginning of the interval when the threads were created. The default value is the current day minus 1 day. | 2021-07- 15T21:00:00.000Z |
end | date | End of the interval when the threads were created. The default value is the current day. | 2021-07- 15T21:00:00.000Z |
length | long | Thread duration in seconds. It is used in conjunction with the lengthOperator parameter | 350 |
lengthOperator | string | Comparison operator specified for the length parameter | One of the following: • LESS • GREATER • EQUAL • LESS_EQUAL • GREATER_EQUAL |
firstTimeAnswer | long | Number of seconds until an agent’s first response in the thread. It is used in conjunction with the firstTimeAnswerOperator parameter | 60 |
firstTimeAnswerOperator | string | Comparing operator specified for the firstTimeAnswer parameter | One of the following: • LESS • GREATER • EQUAL • LESS_EQUAL • G REATER_EQUAL |
messageCount | long | Message count. It is used in conjunction with the messageCountOperator parameter | 10 |
messageCountOperator | string | Comparing operator specified for the messageCount parameter | One of the following: • LESS • GREATER • EQUAL • LESS_EQUAL • GREATER_EQUAL |
states | string | Thread status options. Every option contains several thread statuses as follows: • QUEUED_STATES option: NEW , UNASSIGNED , SUSPENDED • WORKING_STATES option: ASSIGNED , ANSWER_NEEDED , WAITING , IN_PROGRESS , REASSIGNED • CLOSED_STATES option: CLOSED | One of: • QUEUED_STATES • WORKING_STATES • CLOSED_STATES |
channels | long array | List of channel IDs in edna. To get IDs of existing channels, contact our support team or check the ‘channels’ table if edna is hosted on your server. | 1,3,7 |
emailAccounts | long array | Email account ID list. When used in conjunction with the channels parameter, use the OR operator between these parameters. | 1,2,5 |
operators | long array | Agent ID list | 1,5,8 |
tags | long array | Your tag ID list in edna. To get IDs of existing tags, contact our support team or check the tags table if edna is hosted on your server. | 2,4,6 |
client | string | String that is used to find the client by externalClientId , name , username , email or phone . | SomeUserName |
Curl Example
$ curl 'http: //localhost:8080/api/v1/threads/filter?start=2022-02- 03T07%3A59%3A05.290Z&end=2022-02-04T07%3A59%3A05.290Z&length=600&lengthOperator=GREATER&messageCount=3&messageCountOperator=GREATER_EQUAL&firstAnswerTime=1000&firstAnswerTimeOperator=LESS_EQUAL&status=CLOSED_STATES&channelTypes=WEB&channelTypes=MOBILE&operators=1&operators=2&operators=3&tags=1&tags=5&page=1' -i -X GET \ -H 'Authorization: Bearer <integrator_token>'
Request Variables
Parameter | Type | Description |
length | string | Thread duration |
• lengthOperator | string | Comparison operators: • LESS • GREATER • EQUAL • LESS_EQUAL • GREATER_EQUAL |
message count | number | Number of messages |
firstAnswerTime | number | Agent’s response time |
status | string | One of: • QUEUED_STATES • WORKING_STATES • CLOSED_STATES |
tags | number | Tag ID in the database |
HTTP Request
GET /api/v1/threads/filter?start=2022-02-03T07%3A59%3A05.290Z&end=2022-02-04T07%3A59%3A05.290Z&length=600&lengthOperator=GREATER&messageCount=3&messageCountOperator=GREATER_EQUAL&firstAnswerTime=1000&firstAnswerTimeOperator=LESS_EQUAL&status=CLOSED_STATES&channelTypes=WEB&channelTypes=MOBILE&operators=1&operators=2&operators=3&tags=1&tags=5&page=1 HTTP/1.1 Authorization: Bearer <integrator_token> Host: localhost: 8080
Example of a Successful HTTP Response
HTTP/1.1 200 OK Vary: Origin Vary: Access-Control-Request-Method Vary: Access-Control-Request-Headers Content-Type: application/json Content-Length: 2740 { "count": 5, "pages": 1, "threads": [ { "id": 1, "startTime": "2022-02-03T21:00:00.000Z", "clientId": 1, "clientName": "client name", "clientPhone": "8-900-800-7060", "externalClientId": "111", "blocked": false, "blockRequested": false, "operator": { "id": 1, "name": "operator name", "role": "OPERATOR", "freeSlots": 0, "photoUrl": null }, "channel": "WEB", "initialChannel": null, "state": "IN_PROGRESS", "tags": [], "questionAnswer": null }, { "id": 2, "startTime": "2022-02-03T21:00:00.000Z", "clientId": 1, "clientName": "client name", "clientPhone": "8-900-800-7060", "externalClientId": "111", "blocked": false, "blockRequested": false, "operator": { "id": 1, "name": "operator name", "role": "OPERATOR", "freeSlots": 0, "photoUrl": null }, "channel": "WEB", "initialChannel": null, "state": "WAITING", "tags": [], "questionAnswer": null }, { "id": 3, "startTime": "2022-02-03T21:00:00.000Z", "clientId": 2, "clientName": "client name 2", "clientPhone": "8-900-800-7061", "externalClientId": "222", "blocked": false, "blockRequested": true, "operator": { "id": 2, "name": "operator name 2", "role": "OPERATOR", "freeSlots": 0, "photoUrl": null }, "channel": "MOBILE", "initialChannel": null, "state": "REASSIGNED", "tags": [], "questionAnswer": null }, { "id": 4, "startTime": "2022-02-03T21:00:00.000Z", "clientId": 2, "clientName": "client name 2", "clientPhone": "8-900-800-7061", "externalClientId": "222", "blocked": false, "blockRequested": true, "operator": { "id": 2, "name": "operator name 2", "role": "OPERATOR", "freeSlots": 0, "photoUrl": null }, "channel": "MOBILE", "initialChannel": null, "state": "ANSWER_NEEDED", "tags": [], "questionAnswer": null }, { "id": 5, "startTime": "2022-02-03T21:00:00.000Z", "clientId": 3, "clientName": null, "clientPhone": null, "externalClientId": "3", "blocked": true, "blockRequested": false, "operator": { "id": 2, "name": "operator name 2", "role": "OPERATOR", "freeSlots": 0, "photoUrl": null }, "channel": "MOBILE", "initialChannel": null, "state": "WAITING", "tags": [], "questionAnswer": null } ] }