MethodPathSummaryAuth
GET/v1/admin/package-usage查询指定租户套餐用量Session

Contract file:api/control-package-usage.openapi.yaml

Operation details

GET /v1/admin/package-usage

查询指定租户套餐用量

operationId
queryAdminPackageUsage
Auth
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Parameters

queryAdminPackageUsage Parameters
NameInTypeRequiredDescription
tenant_idquerystring(uuid)NoOptional for platform administrators. When omitted, the control API resolves the subscription's owning tenant from subscription_id before authorizing the usage query.
subscription_idquerystring(uuid)Yes—
site_idquerystring(uuid)No—
fromquerystring(date-time)Yes—
toquerystring(date-time)Yes—
timezonequerystringYes—
bucketquerystring: hour / dayYes—
limitqueryintegerNo—
cursorquerystringNo—

Responses

queryAdminPackageUsage Responses
StatusDescription
200使用冻结数据快照计算的套餐用量

Fields:metric_schema_version: string subscription_id: string(uuid) site_id?: string(uuid) from: string(date-time) to: string(date-time) timezone: string bucket: string: hour / day traffic_bytes: string http_traffic_bytes: string l4_traffic_bytes: string peak_bandwidth_bps: string bandwidth_95th_bps: string connections: string source_watermark: string finalized_through: string(date-time) delayed: boolean series: array<PackageUsagePoint> next_cursor?: string

400稳定错误信封
401稳定错误信封
403稳定错误信封
404稳定错误信封
408稳定错误信封
502稳定错误信封
503稳定错误信封

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list