Skip to main content
POST
/
account
/
queryTrafficUsage
cURL
curl --request POST \
  --url https://apiv1.cakeip.com/openapi/account/queryTrafficUsage \
  --header 'Content-Type: application/json' \
  --data '
{
  "appKey": "<string>",
  "type": "5min",
  "startDay": "2025-09-01",
  "endDay": "2025-09-02"
}
'
{
  "code": 0,
  "msg": "success",
  "data": {
    "limit": 99999999,
    "offset": 0,
    "count": 287,
    "total": 287,
    "start_day": "2025-09-01 00:00:00",
    "end_day": "2025-09-02 00:00:00",
    "sum": "60970.744",
    "data_count": {
      "2025-09-01 00:00": "1520.593",
      "2025-09-01 00:05": "1586.993",
      "2025-09-01 00:10": "1201.897"
    }
  }
}

Body

application/json

查询流量消耗请求

appKey
string
required

AppKey密钥

type
enum<string>
required

查询类型

Available options:
5min,
day
Example:

"5min"

startDay
string
required

开始日期

Example:

"2025-09-01"

endDay
string
required

结束日期

Example:

"2025-09-02"

Response

流量消耗查询响应

code
enum<integer>
default:0
required

状态码,0为操作成功

Available options:
0,
-1
Example:

0

msg
string
required

响应消息

Example:

"success"

data
object
required

流量使用数据