메인 콘텐츠로 건너뛰기
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).