メインコンテンツへスキップ
GET
Serverless spend, grouped and bucketed

承認

Authorization
string
header
必須

A workspace-scoped Cloud JWT.

クエリパラメータ

groupBy
enum<string>
デフォルト:deployment

Aggregation key. none collapses every row into a single group. resource answers one group per kind: compute, storage and container_disk. deployment answers one group per deployment, with every release it ran; release answers each release a deployment ran apart.

利用可能なオプション:
deployment,
user,
gpuClass,
resource,
none,
release
granularity
enum<string>
デフォルト:day

Time-bucket size. none returns totals only (breakdown/totals), with an empty buckets array — no series to draw.

利用可能なオプション:
hour,
day,
week,
month,
none
timezone
string

IANA zone name (e.g. America/Los_Angeles), not a fixed offset. Default UTC. Applies to day/week/month bucketing; irrelevant for hour/none. An unrecognized name is a 400.

startingOn
string<date-time>

Inclusive. Default: 30 days before endingBefore (which itself defaults to the request time), truncated down to the granularity boundary in the requested timezone.

endingBefore
string<date-time>

Exclusive. Default the request time.

deploymentId
string[]

Repeatable. OR within the field. At most 100 values.

Maximum array length: 100
userId
string[]

Repeatable. Required by scope=user (identifies whose spend); usable as a plain narrowing filter under scope=workspace. Rejected under scope=self, which is already the caller. At most 100 values.

Maximum array length: 100
buildId
string[]

Repeatable. OR within the field. At most 100 values. Narrows to deployments cut from these builds; a deployment records the release it came from, and the release records its build.

Maximum array length: 100
resource
enum<string>[]

Repeatable. OR within the field. Omitted, or naming all three kinds, returns every kind together; naming only compute and storage leaves container_disk out.

Maximum array length: 100

What a charge is for. compute is GPU time; storage is the deployment's network volume, which bills continuously whether or not anything runs; container_disk is the worker's own local disk, itemised inside the endpoint's bucket by the provider. It is not charged: its rows are recorded at zero charge, though buckets stored before that change carry a charge for it.

利用可能なオプション:
compute,
storage,
container_disk
gpuClass
string[]

Repeatable. OR within the field. At most 100 values.

Maximum array length: 100
scope
enum<string>
デフォルト:workspace

Whose spend to return. workspace (the default) is every row in the workspace, self is the deployments the caller created, user is the rows for the given userId. Spend is visible workspace-wide to every member, so no scope is role-gated; the workspace comes from the caller's identity and is the only boundary.

利用可能なオプション:
self,
workspace,
user
sort
enum<string>
デフォルト:costDesc

Ranks groups by their total charged amount over the whole filtered set, or by group key. Accepted but inert when groupBy=none, since a single group has no order to rank.

利用可能なオプション:
costDesc,
costAsc,
keyAsc,
keyDesc
limit
integer
デフォルト:20
必須範囲: 1 <= x <= 100
offset
integer
デフォルト:0

Pages groups (not buckets). Default 0.

必須範囲: x >= 0

レスポンス

OK

groupBy
enum<string>
デフォルト:deployment
必須

Aggregation key. none collapses every row into a single group. resource answers one group per kind: compute, storage and container_disk. deployment answers one group per deployment, with every release it ran; release answers each release a deployment ran apart.

利用可能なオプション:
deployment,
user,
gpuClass,
resource,
none,
release
granularity
enum<string>
デフォルト:day
必須

Time-bucket size. none returns totals only (breakdown/totals), with an empty buckets array — no series to draw.

利用可能なオプション:
hour,
day,
week,
month,
none
timezone
string
必須

The IANA zone actually used (the request's timezone, or UTC).

startingOn
string<date-time>
必須
endingBefore
string<date-time>
必須
groups
object[]
必須

The selected page of groups, in sort order.

buckets
object[]
必須

Sparse: a period with no matching rows is omitted, not zero-filled. Only covers the groups on this page. Empty when granularity=none.

breakdown
object[]
必須

Per-group totals for the groups on this page, with share.

totalChargedMicroUsd
integer<int64>
必須

What the workspace was charged across every group in the filtered set, not just this page.

totalCredits
integer<int64>
必須
truncated
boolean
必須

True when more groups exist beyond this page (limit/offset).