该页面提供了一个从REST API获取代理时间的示例。 有两种获取代理时间的方法。
代理在线/登录时间列表
此API调用返回代理的在线时间列表。 https://developers.chatvisor.com/#operation/getAgentLoggedInTimesUsingPOST
要求
回复
POST https://api.chatvisor.com/rest/v1/report/agent/times/online?access_token=<TOKEN>
BODY:
{
"grouping": "LAST_7_DAYS"
}
代理在线/登录时间汇总
此API调用返回代理时间的汇总统计信息(以秒为单位)。https://developers.chatvisor.com/#operation/getUsingPOST
要求
回复
POST https://api.chatvisor.com/rest/v1/report/agent?access_token=<TOKEN>
BODY:
{
"metrics": [
{
"metricName": "ONLINE_TIME", # or LOGGED_IN_TIME
"groupBy": "AGENT" # optional group by agent
}
],
"dateFilter": {
"grouping": "LAST_7_DAYS"
}
}