Skip to main content
GET
Get usage for a date range

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Query Parameters

start_date
string<date>
required

First UTC day of the range, as YYYY-MM-DD

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Example:

"2026-11-01"

end_date
string<date>
required

Last UTC day of the range, as YYYY-MM-DD. The day itself is included. It cannot be before start_date and the range can cover at most 366 days.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Example:

"2026-11-07"

project_id
string<uuid>

Count only the usage of the services that are in this project now. Usage of a service that was deleted or moved out of the project is not counted, and a project without services gives zero usage. Returns 404 when the company has no such project.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

service_ids
string

Comma-separated identifiers of the services to count: applications, databases, static sites, object storage buckets and load balancers. Up to 100 identifiers. Together with project_id, only the listed services that are in the project are counted. An identifier without usage adds nothing.

Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657,0b9b4e3c-6a0f-4d53-9a55-6f0f4d0f1c2e"

types
string

Comma-separated usage types to count. By default every type is counted. appCompute - running time of application processes. appStorage - persistent disks of applications. appBuild - build time of applications. appBandwidth - bandwidth of applications. staticSiteBuild - build time of static sites. staticSiteBandwidth - bandwidth of static sites. db - running time of databases. objectStorage - data stored in object storage buckets. loadBalancer - running time of load balancers. loadBalancerBandwidth - bandwidth of load balancers.

Example:

"appCompute,db"

include
string

Comma-separated optional parts to add to the response. days - usage per UTC day. services - usage per service, which can be long for a company with many services. By default neither is returned.

Example:

"days,services"

Response

Default Response

period_start
string<date-time>
required

Start of the window the usage is counted for, in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Example:

"2026-10-14T09:23:11.000Z"

period_end
string<date-time>
required

End of the window the usage is counted for, in ISO 8601 format. For a range of days it is the last millisecond of the last day.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Example:

"2026-11-14T09:23:11.000Z"

total_cost
number
required

Sum of the costs of all usage types in USD, before tax, credits and discounts

Example:

20.62

usage_by_type
object[]
required

Usage and cost per usage type. A type without usage is left out.

days
object[]

Usage per UTC day, oldest first. Only returned when include has days. A day without usage is listed with a zero total. Each cost is rounded on its own, so the days do not have to add up to total_cost to the cent.

services
object[]

Usage per service. Only returned when include has services. Each cost is rounded on its own, so the services do not have to add up to total_cost to the cent.