Deploy source files to a tenant
Builds source files and deploys them to a tenant you added to an environment. Luna builds the files inside the tenant’s own isolation boundary, previews the change and then deploys it. This is how a platform runs code that its customers write. To deploy to an environment’s default tenant, use POST /_luna/deploy.
/_luna/tenants/{tenant}/deployAuthorizationBearer token · headerrequiredAn account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.
tenants:writetenantstringrequiredThe tenant, by its full name.
application/jsonfilesobjectrequiredEach file's path, relative and separated by /, with its contents as UTF-8 text.
entrystring | nullThe entry module's path. When left out, Luna reads the config file or looks for a default entry module.
confirmbooleanDeploy even though the preview lists changes that need your say-so.
The files are deployed.
deployedbooleanrequiredWhether the files were deployed. The fields about the new version are left out when they were not.
versioninteger<int64> | nullThe version the tenant now runs.
lunasLunaInfo[] | nullThe luna types the version defines.
Show propertiesHide properties
LunaInfonamestringrequiredvisibilitystringrequiredpublic when clients with a publishable key can call it, private otherwise.
keystring[]requiredThe names of the fields of its key.
handlersstring[]requiredThe names of its handlers.
publishableKeystring | nullThe tenant's main publishable key.
apiTokenstring | nullThe tenant's main secret token.
previewDeployPreviewrequiredWhat the deploy changes, and what blocked it when it was not deployed.
Show propertiesHide properties
changesstring[]requiredEvery change, one line each.
blockedstring[]requiredWhy this cannot be deployed. Empty when it can.
confirmstring[]requiredWhat needs your say-so before it is deployed.
deletesstring[]requiredData that deploying leaves behind or deletes.
dryRunDryRun[]requiredA trial of the new version's migration on copies of a sample of each changed luna type's lunas.
Show propertiesHide properties
DryRuntypestringrequiredThe luna type.
reportDryRunReportrequiredHow a migration's trial went.
Show propertiesHide properties
sampledinteger<int64>requiredHow many lunas the migration was tried on.
failuresLunaFailure[]requiredThe lunas it failed on.
Show propertiesHide properties
LunaFailurekeyobjectrequiredThe luna's key.
errorstringrequiredWhat went wrong.
pendingMessagesinteger<int64>requiredMessages that wait for a handler the new version removes or changes.
pendingSchedulesinteger<int64>requiredSchedules that wait for a handler the new version removes or changes.
changedHandlersobjectrequiredThe handlers the new version removes or changes, by luna type.
urlstring | nullThe address the app is served at. Null when the deployment has no app domain.
Nothing was deployed. The preview says what blocks the deploy or needs confirm.
deployedbooleanrequiredWhether the files were deployed. The fields about the new version are left out when they were not.
versioninteger<int64> | nullThe version the tenant now runs.
lunasLunaInfo[] | nullThe luna types the version defines.
Show propertiesHide properties
LunaInfonamestringrequiredvisibilitystringrequiredpublic when clients with a publishable key can call it, private otherwise.
keystring[]requiredThe names of the fields of its key.
handlersstring[]requiredThe names of its handlers.
publishableKeystring | nullThe tenant's main publishable key.
apiTokenstring | nullThe tenant's main secret token.
previewDeployPreviewrequiredWhat the deploy changes, and what blocked it when it was not deployed.
Show propertiesHide properties
changesstring[]requiredEvery change, one line each.
blockedstring[]requiredWhy this cannot be deployed. Empty when it can.
confirmstring[]requiredWhat needs your say-so before it is deployed.
deletesstring[]requiredData that deploying leaves behind or deletes.
dryRunDryRun[]requiredA trial of the new version's migration on copies of a sample of each changed luna type's lunas.
Show propertiesHide properties
DryRuntypestringrequiredThe luna type.
reportDryRunReportrequiredHow a migration's trial went.
Show propertiesHide properties
sampledinteger<int64>requiredHow many lunas the migration was tried on.
failuresLunaFailure[]requiredThe lunas it failed on.
Show propertiesHide properties
LunaFailurekeyobjectrequiredThe luna's key.
errorstringrequiredWhat went wrong.
pendingMessagesinteger<int64>requiredMessages that wait for a handler the new version removes or changes.
pendingSchedulesinteger<int64>requiredSchedules that wait for a handler the new version removes or changes.
changedHandlersobjectrequiredThe handlers the new version removes or changes, by luna type.
urlstring | nullThe address the app is served at. Null when the deployment has no app domain.
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.