GET /v1/node-traffic
Read interval node traffic, not cumulative lifetime counters
说明(契约原文)
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.
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
node | query | string(uuid) | 是 | — |
external_only | query | boolean | 否 | 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. |
start | query | string(date-time) | 否 | Start of a window no longer than 31 days; defaults to one hour ago for realtime and one day ago for traffic. |
end | query | string(date-time) | 否 | Defaults to now; must not precede start. |
limit | query | integer | 否 | — |
excl_nic | query | string | 否 | Space-separated interface names to exclude. excluded_nic is a compatible alias; both sets are combined. |
响应
| 状态码 | 说明 |
|---|---|
200 | Interval bytes at each sample time, without billing settlement claims. 字段: |
400 | Invalid parameters; validation_error. |
401 | Authentication required. |
403 | Platform scope and nodes.read or platform.admin required. |
404 | Node absent from the caller scope; node_metrics_not_found. |
503 | Metrics runtime unavailable; node_metrics_unavailable. |
失败时怎么办
400按字段说明修正参数或请求体再发;不要原样重试。401检查凭据格式、是否过期或被轮换。403检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404资源不存在或不属于当前租户。503依赖暂不可用:稍后用原 Idempotency-Key 重试。