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

Deploy an app

Deploys a built app to a tenant as its next version. The request names the entry modules, their manifests and the files. The luna deploy command builds an app and sends this request for you. Running lunas move to the new version as they next wake.

POST/_luna/deploy
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:deploy:write
Request body
requiredapplication/json
tenantstringrequired

The tenant to deploy to, by its full name.

entriesstring[]required

The entry modules, relative to the app's root. At most one for each language. One path as a string works too, and so does the name entry.

manifestsobject

The manifest of each entry module, by its path, as the SDK's build reports it.

filesobject

The files of a small app: each path, relative and separated by /, with its contents as UTF-8 text.

treeobject

The files of an app that were uploaded before this request, each path with its hash and size.

Responses
200

The app is deployed.

tenantstringrequired

The tenant's full name.

versioninteger<int64>required

The version the tenant now runs.

min 0
lunasLunaInfo[]required

The luna types the version defines.

Show properties
Array of LunaInfo
namestringrequired
visibilitystringrequired

public when clients with a publishable key can call it, private otherwise.

keystring[]required

The names of the fields of its key.

handlersstring[]required

The names of its handlers.

publishableKeystringrequired

The tenant's main publishable key, which is safe to ship in a client.

apiTokenstringrequired

The tenant's main secret token. Keep it on your servers.

warningsstring[]

What you should know though the deploy went through. Left out when there is nothing to say.

urlstring | null

The address the app is served at. Left out when the deployment has no app domain.

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
Bodyapplication/json
Request
curl -X POST 'https://luna.example.com/_luna/deploy' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "tenant": "string",
  "entries": [
    "string"
  ],
  "manifests": {
    "property1": {},
    "property2": {}
  },
  "files": {
    "property1": "string",
    "property2": "string"
  },
  "tree": {
    "property1": {
      "sha256": "string",
      "size": 0
    },
    "property2": {
      "sha256": "string",
      "size": 0
    }
  }
}'
Response
{
  "tenant": "string",
  "version": 0,
  "lunas": [
    {
      "name": "string",
      "visibility": "string",
      "key": [
        "string"
      ],
      "handlers": [
        "string"
      ]
    }
  ],
  "publishableKey": "string",
  "apiToken": "string",
  "warnings": [
    "string"
  ],
  "url": "string"
}

Was this page helpful?