方法路径摘要认证
GET/v1/node-trafficRead interval node traffic, not cumulative lifetime counters登录会话

契约文件:api/control-node-realtime.openapi.yaml

接口详情

GET /v1/node-traffic

Read interval node traffic, not cumulative lifetime counters

operationId
getNodeTraffic
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires nodes.read or platform.admin in a platform scope. external_only differences each NIC before selecting the current sample's default-route devices. A route change therefore cannot create a lifetime-counter spike. At least two known snapshots with a baseline for each selected NIC are required. Missing evidence is not a zero. Explicitly excluded NICs are omitted after automatic selection. This is monitoring, not billable usage.

参数

getNodeTraffic 参数
名称位置类型必填说明
nodequerystring(uuid)是—
external_onlyqueryboolean否Literal true or false, at most once. Default false preserves old API callers. The management UI explicitly sends true by default. Filters bandwidth/traffic by each sample's reported network_selection; missing or unavailable selection never means all interfaces. Other metric types are unchanged. False exposes all original NIC facts for manual diagnostics.
startquerystring(date-time)否Start of a window no longer than 31 days; defaults to one hour ago for realtime and one day ago for traffic.
endquerystring(date-time)否Defaults to now; must not precede start.
limitqueryinteger否—
excl_nicquerystring否Space-separated interface names to exclude. excluded_nic is a compatible alias; both sets are combined.

响应

getNodeTraffic 响应
状态码说明
200Interval bytes at each sample time, without billing settlement claims.

字段:msg: string code: integer count: integer data: array<object>

400Invalid parameters; validation_error.
401Authentication required.
403Platform scope and nodes.read or platform.admin required.
404Node absent from the caller scope; node_metrics_not_found.
503Metrics runtime unavailable; node_metrics_unavailable.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表