
# 查询座席休息信息
#### 场景描述
查询座席休息信息。
#### 接口方法
设置成"POST"。该接口仅支持POST方法，不支持PUT、GET和DELTE等方法。
#### 内部封装接口
BMS接口：
- /ccbms/ws/monitor/teamrestinfo
- /ccbms/ws/monitor/teamrestagentinfo
 
#### 请求URL
https://ip:port/rest/cmsapp/v1/openapi/agentgroup/agentrestinfo
其中，ip为NSLB的服务器IP地址，port为CC-CMS服务在NSLB映射的HTTPS端口号。
#### 请求说明
表1请求头参数 
| 序号 | 名称            | 参数类型   | 是否必选 | 说明                                                                                                                            |
|:---|:---|:---|:---|:---|
| 1  | Content-Type  | String | True | 固定填 application/json;charset=UTF-8。                                                                                           |
| 2  | Authorization | String | True | 生成方式参见[C2 监控/系统外呼/话单/知识库类接口鉴权方式](https://support.huaweicloud.com/api-ccfs-cec/cec_07_0003.html#ZH-CN_TOPIC_0000002481273406)。 |
   
- 消息头 Content-Type:application/json;charset=UTF-8
  
- 消息体 该接口的请求消息体举例如下：
  ```
  {
      "queryParam":
      {
          "ccId":1, 
          "vdn":1
      }
  }
  ```
  
该接口的请求消息体参数说明请参见[表2](https://support.huaweicloud.com/api-ccfs-cec/cec_07_0633.html#ZH-CN_TOPIC_0000002513073687__zh-cn_topic_0000002477949780_zh-cn_topic_0274247515_table135621715174216)。
表2消息体参数说明 
| 参数名  | 数据类型 | 是否必选 | 说明                                                                                                                              |
|:---|:---|:---|:---|
| ccId | int  | True | 呼叫中心编号。 取值范围：1～65535 |
| vdn  | int  | True | 虚拟呼叫中心编号。 取值范围：1～5000  |
   
#### 响应消息
该接口的响应消息体举例如下：
```
{
  "result": "0",
  "resultDatas": 
  {
    "allowrestnum": 101,
    "onrestnum": 1,
    "waitrestnum": 0,
    "agentsrestdetails": 
    {[
      "agentname": "z1",
      "workno":55001
      "cantrestreason":1
      "begintime":2345
      "restduration":22333
    ]}
  }
}
```
该接口的响应消息体参数说明请参见[表3](https://support.huaweicloud.com/api-ccfs-cec/cec_07_0633.html#ZH-CN_TOPIC_0000002513073687__zh-cn_topic_0000002477949780_zh-cn_topic_0274247515_table391362104311)。
表3消息体参数说明 
| 参数名         | 数据类型   | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|
| result      | string | 查询结果。取值如下： - 0：成功  - 非0：失败   失败的原因说明请参见[错误码参考](https://support.huaweicloud.com/api-ccfs-cec/cec_07_0696.html#ZH-CN_TOPIC_0000002481273824)。 |
| resultDatas | Object | 查询成功后，返回结果信息的对象。 该对象的参数说明请参见[表4](https://support.huaweicloud.com/api-ccfs-cec/cec_07_0633.html#ZH-CN_TOPIC_0000002513073687__zh-cn_topic_0000002477949780_zh-cn_topic_0274247515_table109452218439)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
   
表4resultDatas对象参数说明 
| 参数名               | 数据类型  | 说明                                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|
| allowrestnum      | int   | 已经允许休息人数，但是座席仍然未休息的座席人数                                                                                                                                                                                                                                                                                      |
| onrestnum         | int   | 正在休息的座席数                                                                                                                                                                                                                                                                                                     |
| waitrestnum       | Int   | 申请休息的座席数                                                                                                                                                                                                                                                                                                     |
| agentsrestdetails | array | VDN上休息座席的详情对象列表。 该对象的参数说明请参见[表5](https://support.huaweicloud.com/api-ccfs-cec/cec_07_0633.html#ZH-CN_TOPIC_0000002513073687__zh-cn_topic_0000002477949780_zh-cn_topic_0274247515_table596042104316)。 |
   
表5agentsrestdetails对象参数说明 
| 参数名            | 数据类型   | 说明                                                                                                                                                                                                                                                                |
|:---|:---|:---|
| agentname      | string | 座席名称。                                                                                                                                                                                                                                                             |
| workno         | int    | 座席工号。                                                                                                                                                                                                                                                             |
| cantrestreason | int    | 座席不允许休息的原因，此参数仅对于等待休息的座席有效。 该对象的参数说明请参见[表6]。 |
| begintime      | long   | 开始时间(正在休息指休息开始时间，还未休息指申请或批准休息开始时间) 时间格式：时间戳                                                                                                                                                                                                                       |
| restduration   | long   | 请求休息时长，单位：秒。                                                                                                                                                                                                                                                      |
   
 表6不允许休息原因 
| 不允许休息原因值 | 原因值说明             |
|:---|:---|
| 0        | 等待批准              |
| 1        | 座席示忙              |
| 2        | VDN 休息人数已满。       |
| 3        | 座席不接来话，未签入任何技能队列。 |
| 4        | 签入队列休息人数已满。       |
   
