坐席状态监控列表

请求URL
GET /apiv2/kchat/monitor/agents.json
Query参数
NameRequiredTypeComment
agent_idsinteger|string指定客服 id,多个客服 id 用英文逗号隔开,默认所有客服
group_idinteger指定客服组 id
status_onlyinteger为 1 时表示仅查询坐席的在线状态,默认为 0
返回示例
GET /apiv2/kchat/monitor/agents.json
{
    "stats": {
        "monitor_table": [
            {
                "chatNum": 7,              // 对话数            
                "messageNum": 31,          // 消息数
                "serveCount": 3,           // 当前设置的最大接待人数      
                "liveChatIds": [34699241], // 正在会话id
                "averageServeTime": 1.8,   // 平均对话时长            
                "averageResponseTime": 80, // 平均响应时长            
                "maxServe": 8,             // 最大接待人数            
                "enabled": 1,              // 客服是否可用            
                "agentId": 13030166,       // 客服 id            
                "agentStatus": "offline",  // 客服在线状态            
                "agentName": "客服小叶"    // 客服昵称
             },
            ......
        ],
        "monitor_overview": {
            "chatNum": 7,              // 对话数            
            "messageNum": 31,          // 消息数            
            "serveCount": 3,           // 有效沟通数            
            "sumResponseTime": 241,    // 总响应时长(秒)            
            "sumServeTime": 326,       // 总持续时长(分钟)            
            "averageResponseTime": 80, // 平均响应时长(秒)            
            "averageServeTime": 1.8    // 平均持续时长(分钟)        
        }
    }
}

GET /apiv2/kchat/monitor/agents.json?status_only=1
{
    "stats": {
        "monitor_table": [
            {
                "agentId": 13030166,
                "agentName": "客服小叶",
                "enabled": 1,
                "agentStatus": "offline"
            },
            ......
        ]
    }
}