
# 查询SmartCare群障用户接口 (queryfaultyuser)
#### 场景描述
查询SmartCare群障用户。
#### 接口方法
POST
#### 接口URI
https://域名/apiaccess/CC-Management/v1/smartcare/queryfaultyuser，例如域名是service.besclouds.com
#### 请求说明
表1请求头参数 
| 序号 | 名称            | 参数类型   | 是否必选 | 说明                                                            |
|:---|:---|:---|:---|:---|
| 1  | X-APP-Key     | string | True | appKey字段，用户标识                                                 |
| 2  | Authorization | string | True | 鉴权字段，内容格式为: Bearer +tokenByAKSK接口的返回值中AccessToken（Bearer后有空格） |
   
表2请求体参数 
| 序号 | 名称                | 参数类型   | 是否必选  | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|:---|:---|:---|:---|:---|
| 1  | msisdn            | String | True  | 用户手机号码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 2  | faultTime         | String | True  | 故障时间。 例如1721283133000                                                                                                                                                                                                                                                                                                                                                                                                             |
| 3  | complaintScene    | String | True  | 客户侧投诉场景。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 4  | backtraceDuration | String | False | 从异常时间向回推的回溯时长。 取值范围为\[60, 86400\] 单位为秒。 超过最大值86400s按照86400s处理。 配置为租户级参数"SmartCare异常时间往回推的时长（s）"的值。 |
| 5  | sessionID         | String | False | 客户侧sessionID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 6  | queryFlag         | String | True  | 是否作为投诉用户进行采样。 AICC对接场景，固定配置为"1"。                                                                                                                                                                                                                                                                                                                                                                                                   |
   
#### 响应说明
- **响应状态码: 200**
  表3响应体参数 
  | 序号  | 名称          | 参数类型                | 是否必选  | 说明                                                                                                                                                                                                                                                                                                                                                         |
  |:---|:---|:---|:---|:---|
  | 1   | returnCode  | String              | True  | 响应码。 成功为0，其他的表示失败。 详情请参见[表4]。 |
  | 2   | description | String              | True  | 响应描述信息。 详情请参见[表4]。                                                                                                                   |
  | 3   | data        | List\< JSONObject\> | True  | 查询的数据。                                                                                                                                                                                                                                                                                                                                                     |
  | 3.1 | msisdn      | String              | True  | 用户手机号码。                                                                                                                                                                                                                                                                                                                                                    |
  | 3.2 | ttid        | String              | False | 故障时间。 格式为：yyyy-MM-dd HH:mm:ss                                                                                                                                                                                                                     |
     
   表4响应码描述信息 
  | 响应码 | 响应描述信息                                                 |
  |:---|:---|
  | 0   | Query succeeded. Data is found in the query result.    |
  | 1   | Query succeeded. No data is found in the query result. |
  | 2   | Invalid MSISDN.                                        |
  | 3   | Invalid fault time.                                    |
  | 4   | The scenario does not exist.                           |
  | 5   | DAC query error.                                       |
  | 97  | Other errors.                                          |
  | 101 | Parameter verification failed.                         |
  | 102 | AICC internal system error.                            |
     
  

- **响应状态码: 400**
  错误的请求：请检查请求路径及参数。
  
- **响应状态码: 401**
  未授权：1.请确认是否购买了相关服务。2.请联系客服人员检查您账号的当前状态。
  
- **响应状态码: 404**
  请求的内容未找到：请检查请求的路径。
  
- **响应状态码: 500**
  业务失败：请依次确认您请求中各参数的取值。
  
 
#### 报文样例
请求头:
```
x-app-key:9******************************3  
Authorization:Bearer e******************************e  
Content-Type:application/json
```
请求参数:
```
{
    "msisdn": "6680512100869",
    "faultTime": "1721283133000",
    "complaintScene": "1",
    "backtraceDuration": "3600",
    "sessionID": "20240709",
    "queryFlag": "1"
}
```
响应参数:
```
{
    "returnCode": 0,
    "description": "Query succeeded. Data is found in the query result.",
    "data": [
        {
            "rules": [
                {
                    "reflectionRule": "FAILURE_CAUSE=DTAPSMS_CP:CP Error(17 Network Failure)",
                    "ccmSceneCode": "SMS"
                },
                {
                    "reflectionRule": "LAC_TAC=5200504B2007&SAI_CGI_ECGI=5200504B2007",
                    "ccmSceneCode": "DATA"
                }
            ],
            "msisdn": "6680512100869"
        }
    ]
}
```
