查询文件服务器接口
场景描述
该接口为查询文件服务器接口,便于导入服务器外呼文件时的前置条件。
使用说明
- 前提条件
- 有对应的Ak/Sk鉴权权限。
- 已经申请了开发者账号。
- 注意事项
- 接收请求后,需服务端返回200的响应,其他响应均认为回写失败;
接口方法
该接口仅支持POST方法。
接口URL
https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/file/queryServer
其中,ip为CC-iSales服务器地址,port为CC-iSales服务器的HTTPS端口号。
序号 | 参数名 | 参数类型 | 是否必选 | 说明 |
|---|---|---|---|---|
1 | vdnId | int | True | 虚拟呼叫中心ID。 取值的类型为整数,取值范围为1~9999。 |
请求说明
序号 | 名称 | 参数类型 | 是否必选 | 说明 |
|---|---|---|---|---|
1 | Content-Type | String | True | 固定填 application/json; charset=UTF-8。 |
2 | Authorization | String | True | 生成方式参见C2 监控/系统外呼/话单/知识库类接口鉴权方式。 |
3 | locale | String | False | i18n(internationalization,国际语言代码),如zh_CN表示中文、en_US表示英文等,默认zh_CN。 |
序号 | 参数名 | 参数类型 | 是否必选 | 说明 |
|---|---|---|---|---|
1 | offset | int | True | offset用于确定查询的起始页。 offset取值为:offset=limit*(page-1) page为需要查询的起始页。 |
2 | limit | int | True | 表示每页的查询数量。 取值范围:1~100 |
3 | serverIds | List<String> | False | 文件服务器ID集合 |
响应说明
序号 | 参数名 | 参数类型 | 说明 |
|---|---|---|---|
1 | resultCode | String | 原因码。0200000表示成功,其他表示失败。 具体见表6。 |
2 | resultDesc | String | 描述。 |
3 | server | List<Server> | 文件服务器 |
4 | count | int | 文件总数 |
5 | returnCode | String | 原因码。0200000表示成功,其他表示失败。 具体见表6 |
6 | returnDesc | String | 描述。 |
序号 | 参数名 | 参数类型 | 说明 |
|---|---|---|---|
1 | port | String | port |
2 | ip | String | ip。 |
3 | filePath | String | 文件服务器默认路径 |
4 | userName | String | 用户名 |
5 | serverId | String | 文件服务器ID |
触发事件
无
错误结果码
序号 | 错误码 | 说明 |
|---|---|---|
1 | 0200001 | 参数异常,异常详情在resultDesc中描述。 |
2 | 0200033 | 外呼数据不存在。 |
3 | 0200034 | 子状态与业务结果不匹配。 |
4 | 02000001 | 参数值为空 |
5 | 02000002 | 参数包含非法字符 |
6 | 02000003 | 参数长度不能大于规定长度 |
7 | 02000004 | 参数长度不能小于规定长度 |
8 | 02000005 | 参数长度需要介于规定长度之间 |
9 | 02000006 | 参数值类型不正确 |
10 | 02000007 | 参数值大小不正确 |
11 | 02000008 | 参数转换异常,请检查请求参数 |
12 | 02000009 | 参数组合不正确,请检查请求参数 |
13 | 02000010 | hour和minute必须同时存在 |
14 | 02000011 | 参数个数不能大于规定个数 |
报文样例
- 该接口的请求消息体举例如下:
{ "limit":10, "offset":0 } - 该接口的响应消息体举例如下:
{ "returnCode": "0200000", "server": [ { "port": null, "ip": null, "filePath": null, "userName": "10", "serverId": "164681924997097701747271557174" }, { "port": "22", "ip": "10.21.124.175", "filePath": "/home/sftp", "userName": "isales", "serverId": "164690088271159234793429225848" }, { "port": "22", "ip": "192.168.0.1", "filePath": "/home/sftp", "userName": "huawei", "serverId": "164697340198671566909690908237" }, { "port": "8888", "ip": "1.1.1.1", "filePath": "/sftp/file", "userName": "isales", "serverId": "164765479785832713595318363505" }, { "port": "22", "ip": "10.1.1.1", "filePath": "/home/sftp", "userName": "zhangsan", "serverId": "164765490069279981932006087306" } ], "resultCode": "0200000", "resultDesc": "success", "returnDesc": "success" }

