Generated @harmont/cloud reference for the Billing endpoints.
getBillingBalance
GET /api/v0/billing/balance/{org}
Get an organization's balance
Returns the organization's current balance in cents — the sum of every ledger entry (credits positive, debits negative). May be negative.
import { getBillingBalance } from "@harmont/cloud";getBillingBalance(options): RequestResult<GetBillingBalanceResponse>| Parameter | In | Type | Description |
|---|---|---|---|
org | path | string | The organization slug. |
Returns GetBillingBalanceResponse
See GET /api/v0/billing/balance/{org} for the full request and response schema.
getBillingUsage
GET /api/v0/billing/usage/{org}
Get an organization's VM usage
Aggregates the organization's VM-lease usage over the half-open window [from, to) (both ISO-8601 timestamps): resource-seconds per dimension and the total billed cost in cents. Both from and to are required.
import { getBillingUsage } from "@harmont/cloud";getBillingUsage(options): RequestResult<GetBillingUsageResponse>| Parameter | In | Type | Description |
|---|---|---|---|
org | path | string | The organization slug. |
from | query | string | Window start (inclusive), ISO-8601. |
to | query | string | Window end (exclusive), ISO-8601. |
Returns GetBillingUsageResponse
See GET /api/v0/billing/usage/{org} for the full request and response schema.
getBillingUsageBreakdown
GET /api/v0/billing/usage/{org}/breakdown
Per-build VM usage breakdown
Returns the organization's VM usage over the half-open [from, to) window (both ISO-8601), grouped by build (newest first) and broken down per job lease — pipeline, build number, job, VM handle, resource shape, duration and cost — so a charge can be traced to its source.
import { getBillingUsageBreakdown } from "@harmont/cloud";getBillingUsageBreakdown(options): RequestResult<GetBillingUsageBreakdownResponse>| Parameter | In | Type | Description |
|---|---|---|---|
org | path | string | Organization slug. |
from | query | string | ISO-8601 window start (inclusive). |
to | query | string | ISO-8601 window end (exclusive). |
Returns GetBillingUsageBreakdownResponse
See GET /api/v0/billing/usage/{org}/breakdown for the full request and response schema.
getBillingUsageSeries
GET /api/v0/billing/usage/{org}/series
Per-day usage time-series
import { getBillingUsageSeries } from "@harmont/cloud";getBillingUsageSeries(options): RequestResult<GetBillingUsageSeriesResponse>| Parameter | In | Type | Description |
|---|---|---|---|
org | path | string | Organization slug. |
from | query | string | ISO-8601 window start (inclusive). |
to | query | string | ISO-8601 window end (exclusive). |
Returns GetBillingUsageSeriesResponse
See GET /api/v0/billing/usage/{org}/series for the full request and response schema.
listBillingTransactions
GET /api/v0/billing/transactions/{org}
List an organization's ledger entries
Returns the organization's ledger entries, newest first, cursor-paginated.
import { listBillingTransactions } from "@harmont/cloud";listBillingTransactions(options): RequestResult<ListBillingTransactionsResponse>| Parameter | In | Type | Description |
|---|---|---|---|
org | path | string | The organization slug. |
limit | query | number | Page size (1–100, default 50). |
cursor | query | string | Opaque cursor from a previous page's next_cursor. |
Returns ListBillingTransactionsResponse
See GET /api/v0/billing/transactions/{org} for the full request and response schema.