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

Luna API

The HTTP API of a Luna deployment for developers: accounts, organisations, projects, environments, tenants, deploys, secrets, keys, data, telemetry, usage and billing. The luna CLI and the Console call this same API.

Authentication

Send a credential in the Authorization header as Bearer <TOKEN>. Three kinds work:

  • An account key (la_…) acts as your account, with the roles you hold when it is used.
  • An API key (lt_…) holds the permissions it was made with, in one project or across one organisation.
  • A session token (ls_…) is what logging in returns.

Each operation lists the permission it needs. A role is a fixed set of the same permissions. GET /_luna/permissions returns the full list.

Errors

A failed request answers with a 4xx or 5xx status and a JSON body of the form {"error": {"message": "…"}}.

Version 0.0.28
Base URLhttps://{host}

Account

Sign up, log in and manage the keys that act as your account.

Organisations

Organisations own projects, members and billing.

Members

The people in an organisation, their roles and their invitations.

Projects

A project is one app. It holds the app’s environments.

Environments

An environment is one running copy of a project, such as production or staging.

Tenants

Every environment has a default tenant. A platform adds one tenant per customer.

Deploys

Put code into an environment.

Secrets

Values an environment’s code reads at run time. A secret’s value is never read back.

Domains

Your own domains for an environment’s HTTP routes, with certificates Luna gets and renews.

App keys

The keys an app’s clients and servers call it with.

API keys

Scoped keys for scripts and CI that call this API.

Data

Browse and edit what an environment’s lunas hold: tables, files and indexes.

Telemetry

Logs, traces and metrics of an environment.

Usage

What a tenant, a project or an organisation has used.

Billing

An organisation’s plan, spending limits and payment details.

General

The permission catalog and this document.

Was this page helpful?