Skip to content

查询每天流量使用 ​

按起止日期查询用户每日流量使用情况。请先完成 登录获取 token。

接口描述 ​

项目说明
方法POST
地址https://api2.ipmart.io/ipmart/common/usageByDay

输入参数 ​

参数名称必选类型描述
token是String请求头中的用户访问令牌(可通过 登录接口 获取)
startDate是String请求体 JSON 中的开始日期
endDate是String请求体 JSON 中的结束日期

发送示例 ​

json
{
  "startDate": "2024-09-01",
  "endDate": "2024-09-23"
}

token 放在请求头中传递。

返回示例 ​

json
{
  "status": 200,
  "errorMsg": null,
  "data": [
    {
      "userId": "6699df3bce86cf36c9003eb6",
      "totalRequests": 11795347,
      "successCount": 11274223,
      "requestDay": "2024-09-23 08:00:00",
      "length": 213968538459
    },
    {
      "userId": "6699df3bce86cf36c9003eb6",
      "totalRequests": 36070512,
      "successCount": 34442944,
      "requestDay": "2024-09-22 08:00:00",
      "length": 646666471905
    }
  ]
}

返回说明 ​

字段说明
totalRequests当天总请求次数
successCount当天请求成功次数
length当天发生的总流量(单位:字节)