Get a tenant
Returns a tenant: the version it runs, its settings, the limits that hold for it, its usage counters and the luna types its code defines.
/_luna/tenants/{tenant}AuthorizationBearer token · headerrequiredAn account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.
tenants:readtenantstringrequiredThe tenant, by its full name.
The tenant.
tenantstringrequiredThe tenant's full name.
urlstring | nullThe address its app is served at. Null when the deployment has no app domain.
routesUrlstring | nullWhere its handlers' HTTP routes are served. Left out when it has none, or the deployment has no app domain.
versioninteger<int64>requiredThe version it runs. 0 before its first deploy.
runningbooleanrequiredWhether its workers are running on the server that answered.
configTenantSettingsrequiredIts settings. The headers of a telemetry export are masked.
Show propertiesHide properties
quotasTenantQuotasThe most a tenant can use. A limit that is null or left out is not set here, so the plan's limit holds.
Show propertiesHide properties
requestsPerSecondnumber<double> | nullThe most requests a second.
cpuPercentinteger<int32> | nullThe most CPU the tenant's microVM can use, as a percent of one core.
storageBytesinteger<int64> | nullThe most storage, in bytes.
sandboxesinteger<int32> | nullThe most sandboxes running at once.
lunaMemoryMibinteger<int64> | nullThe most memory one luna can declare or use, in MiB.
lunaCpunumber<double> | nullThe most cores one luna can declare or use.
lunaDefaultMemoryMibinteger<int64> | nullThe memory a luna has when it declares none, in MiB.
lunaDefaultCpunumber<double> | nullThe cores a luna has when it declares none.
tenantMemoryMibinteger<int64> | nullThe most memory the tenant's microVM can grow to, in MiB.
lunaReserveboolean | nullWhether the tenant's lunas can reserve their limits. The plan decides when left out.
hostnamesstring[]Custom routes to the tenant, each as host or host/first-path-segment.
grantsobjectThe platform luna types the tenant's code can call, each under the service name the code uses.
outboundOutboundHandler | nullShow propertiesHide properties
lunastringrequiredThe platform's luna type.
keyobjectrequiredThe key of the luna to call.
handlerstringrequiredThe handler to call.
nullretentionDaysinteger<int32> | nullHow many days the tenant's logs and traces are kept. The deployment's setting holds when left out.
historyDaysinteger<int32> | nullHow many days back the tenant's lunas can be restored or forked. At most what its plan keeps, which is the default. A change takes effect when its workers next start.
otlpOtlpConfig | nullShow propertiesHide properties
endpointstringrequiredThe base URL of an OTLP collector. Luna adds /v1/logs and the other OTLP paths to it.
headersobjectHeaders sent with every request, usually an API key. A response shows each value as ***.
nulllabelsobjectYour own tags, for finding and grouping tenants. Left out of a response when there are none.
hostLabelstring | nullThe label of the tenant's public hostname, <label>.<app domain>. Luna sets it once. A request cannot change it.
ceilingsTenantCeilingsrequiredThe limits that hold for a tenant, all things considered: the lowest of its own settings, its environment's and its plan's. A limit that is left out is not set at any level.
Show propertiesHide properties
lunaMemoryMibinteger<int64> | nullThe most memory one luna can declare or use, in MiB.
lunaCpunumber<double> | nullThe most cores one luna can declare or use.
tenantMemoryMibinteger<int64> | nullThe most memory the tenant's microVM can grow to, in MiB.
lunaDefaultMemoryMibinteger<int64> | nullThe memory a luna has when it declares none, in MiB.
lunaDefaultCpunumber<double> | nullThe cores a luna has when it declares none.
lunaReserveboolean | nullWhether lunas can reserve their limits.
historyDaysinteger<int32> | nullThe days of history the plan keeps.
usageTenantCountersrequiredA tenant's live counters on the server that answered. For billed usage, read the usage routes.
Show propertiesHide properties
requestsinteger<int64>requiredRequests the tenant has answered.
storageBytesinteger<int64> | nullThe storage it uses, in bytes. Null when it has not been measured yet.
outboundRequestsinteger<int64>requiredOutgoing requests its code has made.
outboundBytesinteger<int64>requiredBytes its outgoing requests have moved.
lunaTypesLunaTypeItem[]requiredThe luna types its deployed version defines. Empty before a first deploy.
Show propertiesHide properties
LunaTypeItemnamestringrequiredindexbooleanrequiredWhether the type is an index, which Luna keeps from other types' data.
languagestringrequiredtypescript or python.
packagestring | nullThe package the type comes from, when it comes from one.
visibilitystringrequiredpublic when clients with a publishable key can call it, private otherwise.
keystring[]requiredThe names of the fields of its key.
handlersintegerrequiredHow many handlers it has.
handlerNamesstring[]requiredThe names of its handlers.
cronsintegerrequiredHow many schedules it has.
streamsintegerrequiredHow many streams it has.
memoryMibinteger<int64> | nullThe memory the type declares for a luna, in MiB. Null when it declares none.
cpunumber<double> | nullThe cores the type declares for a luna. Null when it declares none.
reservebooleanrequiredWhether its lunas reserve their limits.
sizeLunaSizerequiredThe size a luna of a type has: what the type declares, or the default for the tenant.
Show propertiesHide properties
memoryMibinteger<int64> | nullMemory in MiB.
cpunumber<double> | nullCores.
definitionLunaDefinitionrequiredWhat a luna type's code defines, as its manifest says it. Luna's own handlers are left out.
Show propertiesHide properties
keyobject[]requiredThe fields of its key, each with a name and a type.
visibilitystringrequiredpublic when clients with a publishable key can call it, private otherwise.
idleTimeoutMsinteger<int64>requiredHow long a luna stays awake when nothing calls it, in milliseconds.
handlersobject[]requiredIts handlers, each with its name, description, args, returns and errors, and whether it is a query, durable or exclusive.
tablesobject[]requiredIts tables, each with its name, columns, primaryKey, singleRow and search.
sandboxesobject | nullThe sandboxes it declares, by name.
bucketsobject | nullThe buckets of files it declares, by name.
isolatesobject | nullThe isolates it declares, by name.
streamsobjectrequiredIts streams, by name, each with the type of its entries and its retention.
schedulesobject[]requiredIts schedules, each with its name, schedule, handler, tz, args, onMissed and overlap.
listenobject[] | nullWhat it listens to, each entry naming a table's changes or an event.
indexbooleanrequiredWhether the type is an index.
wakesTenantWakesrequiredIts lunas' wake-ups to come (their timers, schedules and retries).
Show propertiesHide properties
nextWakeinteger<int64> | nullWhen the first is due, in ms since the epoch. Null when none is, or when this server does not know (the tenant runs elsewhere).
typesobject[] | nullBy luna type, while its workers run on the server that answered:
{lunaType, lunas, nextWake, deployed}. A type its deployed version
no longer defines (deployed: false) keeps its lunas' times but
wakes none of them. Left out while it is stopped.
The request failed. The status says how and error.message says why.
errorErrorDetailrequiredShow propertiesHide properties
codestring | nullA code for programs to branch on, when the error has one.
messagestringrequiredWhat went wrong, in a sentence a person can read.