# 获取应用API调用详情

提供应用日API调用详情文件下载地址查询接口,可获取指定某天的API调用详情

如果获取昨日账单,需要上午十点以后。

# 一、公共参数

# 二、请求参数

名称 类型 是否必须 描述
dayTime String 查询日期 格式为yyyy-MM-dd

请求示例:

https://api.spiderid.cn/api/router/rest?
dayTime=2018-10-20
&<[公共请求参数]>

# 三、响应参数

data 结果信息 类型 描述
incorrect Integer 返回码
message String 返回码描述
url String 返回码为100时,才返回账单地址

# 四、成功示例

JSON示例

{
  "code": 0,
  "requestId": "dsd24...",
  "data": {
    "message": "查询成功",
    "incorrect": 100,
    "url": "https://XXXX"
  },
  "message": "success"
}

# 五、使用步骤

清单文件内容介绍

  • 格式: zip
  • 内部文件格式: csv

文件内容:

字段 类型 描述
requestId String 请求ID
apiKey String 服务方法与版本 格式: 服务方法#版本
createDate String 调用时间
feeType String 费用类型
resourceTimes int 资源次数
fee double 费用
incorrect String 返回码
params String 调用参数
feeType 字段介绍 类型 描述
FEE String 计费
TIMES String 计次
FREE String 免费
TODO String 待计费

CSV 文件内容:

requestId,apiKey,createDate,feeType,resourceTimes,fee,incorrect,params
711af3ad59ad4b3c8c6030d60f720011,realid.idcard.detectionFace#1,2019/07/30 00:00:12,FEE,0,1,100,"谢*,42062619######*11X"
...

# 六、返回码说明(incorrect)

返回码 描述
100 查询成功

# SDK 请求示例

//提供的url

String url = "http://api.spiderid.cn/api/router/rest";

//您的appKey

String appkey = "XXX";

//您的appSecret

String secretKey = "XXX";

try {
    //1.默认客户端
    ApiClient apiClient = new DefaultApiClient(url, appkey, secretKey);

    //2.调用出错自动重试客户端
    //AutoRetryApiClient apiClient = new AutoRetryApiClient(url, appkey, secretKey);

    AppBillRequest req = new AppBillRequest();

    req.setDayTime("2018-10-22");

    AppBillResponse rsp = apiClient.execute(req);

    //通过下载地址下载文件

    File download = DownloadUtils.download(result.getData().url, new File("c:/home"));

    //后续业务处理
} catch (Exception e) {

    e.printStackTrace();

}

最后更新于: 4/16/2020, 1:14:02 PM