跳转到主要内容
GET
获取子用户流量

授权

Authorization
string
header
必填

在控制台(Settings → API Keys)中获取的API密钥,按原样发送,不加 Bearer 前缀。

路径参数

sub_user_id
integer
必填

子用户ID,由 GET /v2/sub-users 返回。

必填范围: x >= 0

查询参数

type
enum<string>
必填

统计流量的时间段。使用 custom 时,请配合 from 和 to 使用;如果不传, 默认分别为子用户的创建日期和当天。

可用选项:
24h,
7days,
month,
custom
from
string<date>

type=custom 时的开始日期(包含当天),格式为 YYYY-MM-DD。

to
string<date>

type=custom 时的结束日期(包含当天),格式为 YYYY-MM-DD。

service_type
enum<string>
默认值:residential_proxies

代理服务类型。也接受旧参数名 serviceType。

可用选项:
residential_proxies,
shared_proxies

响应

该时间段内使用的流量。

traffic
number
必填

总流量,单位为GB。

示例:

4.7

traffic_rx
number
必填

接收流量,单位为GB。

示例:

4.2

traffic_tx
number
必填

发送流量,单位为GB。

示例:

0.5