Harmont docs
Cloud SDKReference

Billing

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>
ParameterInTypeDescription
orgpathstringThe 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>
ParameterInTypeDescription
orgpathstringThe organization slug.
fromquerystringWindow start (inclusive), ISO-8601.
toquerystringWindow 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>
ParameterInTypeDescription
orgpathstringOrganization slug.
fromquerystringISO-8601 window start (inclusive).
toquerystringISO-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>
ParameterInTypeDescription
orgpathstringOrganization slug.
fromquerystringISO-8601 window start (inclusive).
toquerystringISO-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>
ParameterInTypeDescription
orgpathstringThe organization slug.
limitquerynumberPage size (1–100, default 50).
cursorquerystringOpaque cursor from a previous page's next_cursor.

Returns ListBillingTransactionsResponse

See GET /api/v0/billing/transactions/{org} for the full request and response schema.

On this page