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

List tenants

Returns the tenants of an environment, in order of name. Name the environment in parent. Only a key that reaches every tenant can leave it out.

GET/_luna/tenants
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:tenants:read
Query parameters
parentstring

An environment, by the full name of its default tenant. Lists that tenant and the tenants added to it.

labelstring

Only tenants with all of these tags, as key:value,key:value.

limitinteger

How many tenants to return.

min 0
afterstring

The cursor of the last page, to read the next one.

Responses
200

A page of tenants.

tenantsTenantItem[]required
Show properties
Array of TenantItem
namestringrequired

The tenant's full name.

versioninteger<int64>required

The version it runs. 0 before its first deploy.

min 0
defaultbooleanrequired

Whether it is an environment's default tenant.

urlstring | null

The address its app is served at, when the deployment has an app domain.

labelsobject

Its tags. Left out when it has none.

cursorstring | null

Pass this as after to read the next page. Null on the last page.

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/tenants' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "tenants": [
    {
      "name": "string",
      "version": 0,
      "default": true,
      "url": "string",
      "labels": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "cursor": "string"
}

Was this page helpful?