To retrieve the status of every agent, for each bucket, in the given time interval. The status shown can be available, busy, away, etc.
Required API Scope: SmartAssist Analytics
POST https://{{host}}/agentassist/api/public/analytics/account/{{accountId}}//userstatus
Path Parameters
Parameter | Required/Optional | Description |
---|---|---|
host | Required | Environment URL, for example, https://bots.kore.ai |
accountId | Required | The Account Id |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Content Type
application/json
Sample Request
curl --location --request POST \ 'https://{host}/agentassist/api/public/analytics/account/{{accountId}}//userstatus' --header 'auth: {jwt-code}' \ --header 'Content-Type: application/json' \ --data-raw '{ "filter":{ "agents":["gau@gmail.com","gautham@gmail.com"], "dateFilter":{ "startDate":"2022-08-25T10:30:00.000Z", "endDate":"2022-08-26T12:52:30.652Z", "timeZoneOffSet": -330 } }, "granularity":20 }'
Body Parameters
Parameter | Required/Optional | Description | Type |
---|---|---|---|
filter | Required | Object with the following details to filter the result set | |
agents | Optional | The Email Ids of the agents. | Array |
dateFilter | Required | Object with the following details to filter the result set | |
startDate | Required | The start timestamp from which the records need to be considered. The date format is : yyyy-mm-ddThh:mm:ss.msZ eg: 2022-08-25T10:30:00.000Z |
Date |
endDate | Required | The end timestamp from which the records need to be considered. The date format is : yyyy-mm-ddThh:mm:ss.msZ eg: 2022-08-25T10:30:00.000Z |
Date |
timeZoneOffSet | Required | The time zone offset. eg: -330,630,-500 |
Number |
granularity | Required | The number of minutes from which the records need to be considered. | Number |
Sample Response
{ "u-93735585-7d99-5608-ba6f-a21c71136808": { "emailId": "gau@gmail.com", "firstName": "gautham", "timeInterval": [ { "startTime": "2022-08-26T05:20:00.001Z", "endTime": "2022-08-26T08:40:00.000Z", "status": [ { "metric": "AgentStatus", "value": "AVAILABLE", "stats": { "sum": 2198656 } }, { "metric": "AgentStatus", "value": "BUSY", "stats": { "sum": 63242 } } ] } ] }, "u-22acf441-720c-5f29-8fc7-5a4b74bac596": { "emailId": "gautham@gmail.com", "firstName": "peesapatiGautham", "lastName": "murali", "timeInterval": [ { "startTime": "2022-08-26T05:20:00.001Z", "endTime": "2022-08-26T08:40:00.000Z", "status": [ { "metric": "AgentStatus", "value": "login", "stats": { "sum": "InProgress" } } ] } ] } }