Skip to main content
GET
Get project 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 project'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 project's usage.

project_id
string<uuid>
required

The project the usage belongs to.

Example:

"9b1d6e2f-4a3c-4f8b-a7e5-0c9d2b4f6e81"

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.