Required permission
Organisation > Admin > Billing > Read
Path parameters
timestamp
string requiredUnix timestamp of the billing hour
Query parameters
teamId
stringThe ID of the team to filter by. Not accepted from a token that can only read one team — a team billed in its own right, or a team token reading an org's billing — since those responses already cover that team and no other, and start at the project level without it.projectId
stringThe ID of the project to filter by.resourceType
stringThe resource type to filter by (e.g. service, job, harness, addon, volume).one ofjob, service, harness, addon, volumeremoveLegacyFields
booleanFor a billing entity temporarily receiving the legacy billing API contract, return the current contract instead. Use the current query parameters with this option.teamsPage
integerThe page number of teams to access.teamsPerPage
integerThe number of teams to return per page. Maximum of 100.projectsPage
integerThe page number of projects to access.projectsPerPage
integerThe number of projects to return per page. Maximum of 100.resourcesPage
integerThe page number of resources to access.resourcesPerPage
integerThe number of resources to return per page. Maximum of 100.
Response body
- {object}Response object.
data
{object} requiredResult data.timestamp
numberThe Unix timestamp of the billing hour.currency
stringThe currency code.total
numberTotal spend for this hour, across every category it reports. Summed before rounding, so it can differ from adding the categories below by a sub-cent amount. It tracks `paas.price`, so a `teamId`/`projectId`/`resourceType` filter does NOT reduce it — the filter narrows the breakdown under `paas.teams[]` while `paas.price` stays the hour's full PaaS total, and only the customer-level categories drop out. For a team-scoped caller it is that team's own spend, since no customer-level figures are reported at all. (The `/usage` list differs: a filter there replaces the PaaS figure with the filtered slice.)scope
{object}Present when the response is narrowed to the caller's own entity.entityType
stringThe entity the response is limited to.one ofteamentityId
stringIdentifier of that entity.paas
{object}The PaaS usage breakdown for this hour. The drill-down depth follows the active filters, but `price` and `usage` above the breakdown remain the customer-level totals — a filter narrows `teams[]`, not the figures it sits under. A team-scoped caller instead gets its own team as those totals.price
{object}total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberteams
[array] requiredAn array of teams with price and usage totals. Projects are included when a teamId, projectId or resourceType filter is applied. Resources are included when a projectId or resourceType filter is applied. Depth and the paged unit follow the active filters alone, never the number of teams, so an unfiltered response is always teams-only. The paged unit is reported as `pagination.unit`; page through it with that level's page parameters (e.g. `teamsPage`/`teamsPerPage`) until `pagination.hasNextPage` is false.- {object}
id
stringIdentifier for the team.name
stringThe name of the team.price
{object}The team's PaaS price. When a projectId or resourceType filter is applied, this reflects only the filtered slice (e.g. one project, or one resource type across the team).total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberprojects
[array]An array of projects for this team. Present when a teamId, projectId or resourceType filter is applied.- {object}
id
stringIdentifier for the project.name
stringThe name of the project.price
{object}The project's PaaS price. When a resourceType filter is applied, this reflects only that resource type's spend within the project.total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberresources
[array]Resources grouped by type. Present when a projectId or resourceType filter is applied.- {object}
resourceType
stringThe type of the resource (service, job, harness, addon, volume, etc.).price
{object}total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberitems
[array]The resources of this type.- {object}
id
stringIdentifier for the resource.name
stringThe name of the resource.price
{object}total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberduration
numberSeconds the resource was billed for.byoc
{object}Customer-level BYOC usage. Omitted when a team, project or resourceType filter is active, or for a team-scoped caller.price
{object}The customer-level BYOC price total. Always reflects the full customer total, regardless of drill-down filters.total
numberThe total BYOC price, rounded to 2 decimal places.vcpu
numberThe vCPU usage price.memory
numberThe memory usage price.gpuMemory
numberThe GPU memory usage price.cluster
numberThe cluster usage price.usage
{object}Customer-level BYOC usage hours.vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.clusterHours
numberCluster hours consumed.gpuMemoryGiBHours
numberGPU memory GiB-hours consumed.clusters
[array]Cluster-level BYOC usage and allocated spend. Present on invoice and hourly usage detail responses.- {object}
id
stringIdentifier for the cluster.name
stringThe cluster name.price
{object}Allocated BYOC spend for this cluster. The customer-level rate is apportioned by each resource component’s share of the customer total, so this is a reporting allocation rather than an independently billed cluster price. Its total is not rounded so all cluster totals remain reconcilable with the customer total.vcpu
numberThe vCPU usage price.memory
numberThe memory usage price.gpuMemory
numberThe GPU memory usage price.cluster
numberThe cluster usage price.total
numberThe allocated cluster BYOC price. Kept unrounded so cluster totals reconcile with the customer BYOC total.usage
{object}BYOC resource-hours consumed by this cluster.vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.clusterHours
numberCluster hours consumed.gpuMemoryGiBHours
numberGPU memory GiB-hours consumed.egressIp
{object}Egress IP spend. Customer-level, so omitted when a team, project or resourceType filter is active, or for a team-scoped caller.price
{object}total
numberThe total price, rounded to 2 decimal places.usage
{object}hours
numberHours consumed.loadBalancer
{object}Load balancer spend. Customer-level, so omitted when a team, project or resourceType filter is active, or for a team-scoped caller.price
{object}total
numberThe total price, rounded to 2 decimal places.usage
{object}hours
numberHours consumed.pagination
{object} requiredData about the endpoint pagination.hasNextPage
boolean requiredIs there another page of results available?cursor
stringThe cursor to access the next page of results.count
number requiredThe number of results returned by this request.unit
stringWhat this page counts.one ofteams, projects, resources, hours, days, months, total
GET /v1/billing/usage/{timestamp}
GET /v1/teams/{teamId}/billing/usage/{timestamp}
Example response
200 OK
JSON
{
"data": {
"currency": "usd",
"total": 69.22,
"paas": {
"price": {
"total": 69.22
},
"teams": [
{
"price": {
"total": 69.22
},
"projects": [
{
"price": {
"total": 69.22
},
"resources": [
{
"price": {
"total": 69.22
},
"items": [
{
"price": {
"total": 69.22
}
}
]
}
]
}
]
}
]
}
},
"pagination": {
"hasNextPage": false,
"count": 1,
"unit": "days"
}
}