Space Balance

Retrieve the balance

Returns the current balance, the low balance threshold, and whether auto top-up is enabled. Each amount is given in microdollars (millionths of a US dollar) and again in dollars.

The balance is read from the billing service, so the response is 502 when that service is unavailable.

Permissions

Authenticate with a Personal access token whose holder is an owner or admin of the space. A project API token is not accepted on this endpoint, and a Personal access token has no scopes: the holder's role in the space is the whole authorization decision.

get/api/space/balance

Response

The request has succeeded.

type'balance' required

The object type. Always balance.

balance_in_microdollarsinteger required

The current balance in microdollars.

current_balancenumber double required

The current balance in US dollars. The same value as balance_in_microdollars.

low_balance_threshold_in_microdollarsinteger required

The low balance threshold in microdollars.

low_balance_thresholdnumber double required

The low balance threshold in US dollars. The same value as low_balance_threshold_in_microdollars.

auto_topup_enabledboolean required

Whether auto top-up is enabled.

Example response

{
  "type": "balance",
  "balance_in_microdollars": 12000000,
  "current_balance": 12,
  "low_balance_threshold_in_microdollars": 5000000,
  "low_balance_threshold": 5
}

Changes

Changed in 1 of the 161 revisions of this API.1

Of the 161 revisions, 3 have a changelog that could not be searched.