Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Get what is in use now

Returns what an organisation is using right now against what its plan allows. It is the inUse part of the billing summary on its own, which is cheap enough to ask for every few seconds.

GET/_luna/orgs/{org}/billing/in-use
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:billing:read
Path parameters
orgstringrequired

The organisation, by its slug.

Responses
200

What is in use now.

coresnumber<double>required

The cores its lunas used over the last half minute or so, with the sizes of the lunas that reserve and of its running sandboxes.

memoryMibinteger<int64>required

The memory in use, counted the same way, in MiB.

min 0
activeLunasinteger<int64>required

The lunas awake now.

min 0
sandboxesinteger<int64>required

The sandboxes running now.

min 0
limitsInUseLimitsrequired

What the plan allows of each. Null means no limit.

Show properties
coresnumber<double> | null
memoryMibnumber<double> | null
activeLunasinteger<int64> | null
min 0
sandboxesinteger<int64> | null
min 0
default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://luna.example.com/_luna/orgs/string/billing/in-use' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "cores": 0.1,
  "memoryMib": 0,
  "activeLunas": 0,
  "sandboxes": 0,
  "limits": {
    "cores": 0,
    "memoryMib": 0,
    "activeLunas": 0,
    "sandboxes": 0
  }
}

Was this page helpful?