Gets usage details for a given billing hour.
Required permission
Account > Billing > General > Read
Path parameters
timestamp
string requiredUnix timestamp of the billing hour
Query parameters
teamId
stringThe ID of the team to filter by.projectId
stringThe ID of the project to filter by.resourceType
stringThe resource type to filter by (e.g. service, job, addon, volume).one ofjob, service, addon, volumeper_page
integerThe number of breakdown entries to return per page (teams, projects, or resources depending on the active filters). Maximum of 100.page
integerThe page number of breakdown entries to access.
Response body
- {object}Response object.
data
{object} requiredResult data.timestamp
numberThe Unix timestamp of the billing hour.paasUsage
{object}The PaaS usage breakdown for this hour. The drill-down depth depends on the active filters.price
{object}total
numberThe total PaaS price, in cents.cpu
numberThe CPU usage price, in cents.memory
numberThe memory usage price, in cents.storage
numberThe storage usage price, in cents.gpu
numberThe GPU usage price, in cents.teams
[array] requiredAn array of teams with price totals. Projects are included when a teamId or projectId filter is applied, or when there is only one team. Resources are included when a projectId or resourceType filter is applied. The paged unit follows the deepest scoping filter (teams, projects, or — under a projectId filter — resources); a resourceType filter pages projects with that type embedded in full. Page through the response-level `pagination` object with the `page`/`per_page` query parameters until `pagination.hasNextPage` is false to retrieve every entry.- {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, in cents.cpu
numberThe CPU usage price, in cents.memory
numberThe memory usage price, in cents.storage
numberThe storage usage price, in cents.gpu
numberThe GPU usage price, in cents.projects
[array]An array of projects for this team. Present when a teamId or projectId filter is applied, or when the response contains only one team.- {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, in cents.cpu
numberThe CPU usage price, in cents.memory
numberThe memory usage price, in cents.storage
numberThe storage usage price, in cents.gpu
numberThe GPU usage price, in cents.resourceTypes
[array]An array of resource types. Present when a projectId or resourceType filter is applied.- {object}
resourceType
stringThe type of the resource (service, job, addon, volume, etc.).price
{object}total
numberThe total PaaS price, in cents.cpu
numberThe CPU usage price, in cents.memory
numberThe memory usage price, in cents.storage
numberThe storage usage price, in cents.gpu
numberThe GPU usage price, in cents.resources
[array]An array of resources of this type.- {object}
id
stringIdentifier for the resource.name
stringThe name of the resource.price
{object}total
numberThe total PaaS price, in cents.cpu
numberThe CPU usage price, in cents.memory
numberThe memory usage price, in cents.storage
numberThe storage usage price, in cents.gpu
numberThe GPU usage price, in cents.byocUsage
{object}price
{object}The customer-level BYOC price total. Always reflects the full customer total, regardless of drill-down filters.total
numberThe total BYOC price, in cents.vcpu
numberThe vCPU usage price, in cents.memory
numberThe memory usage price, in cents.gpuMemory
numberThe GPU memory usage price, in cents.cluster
numberThe cluster usage price, in cents.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.
API
CLI
JS Client
GET /v1/billing/usage/{timestamp}
GET /v1/teams/{teamId}/billing/usage/{timestamp}
Example response
200 OK
Hourly usage detail.
JSON
{
"pagination": {
"hasNextPage": false,
"count": 1
}
}