Skip to main content
GET
Get organization usage

Authorizations

Authorization
string
header
required

A personal access token (POST /v1/auth/tokens) or a machine identity token (POST /v1/projects/{project_id}/identities/{identity_id}/tokens), both prefixed qumo_pat_. A token's scopes cap what it can do; see Scopes and permissions. A personal token names no organization: on a route whose path names no project or organization, pass ?organization_id=.

Path Parameters

id
string<uuid>
required

The organization's id.

Query Parameters

metric
string
required

The metric to report, e.g. gateway.egress_bytes or gateway.ingress_bytes. A metric with no usage reads zero in every bucket.

granularity
enum<string>
default:hour

Bucket size.

Available options:
hour,
day
start
string<date-time>

Start of the window, RFC 3339. Defaults to 24 hours before end for hourly buckets and 30 days before it for daily ones.

end
string<date-time>

End of the window, RFC 3339. Defaults to now; must be after start.

Response

The organization's usage.

organization_id
string<uuid>
required

The organization the usage belongs to.

Example:

"3f8c2a1e-7b4d-4e9a-9c61-2d5e8f0a1b7c"

metric
string
required

The metric queried.

Example:

"gateway.egress_bytes"

granularity
enum<string>
required

Bucket size of periods.

Available options:
hour,
day
Example:

"day"

periods
object[]
required

The buckets, oldest first.