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

List domains

Returns a tenant’s custom domains: where each stands and the DNS records it needs.

GET/_luna/domains/{tenant}
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
Path parameters
tenantstringrequired

The tenant, by its full name.

Responses
200

The domains.

domainsDomainItem[]required
Show properties
Array of DomainItem
namestringrequired

The domain, in lower case.

stateDomainStaterequired

Where a domain stands.

Allowed:pendingverifiedactivefailed
errorstring | null

Why it is not verified yet, or why Luna could not get its last certificate.

recordsDnsRecord[]required

The records to create. Either proves the domain yours. The CNAME also sends its requests to Luna. For a domain that cannot have a CNAME (an apex domain), create the TXT record and point its A records at the same addresses as the CNAME's target.

Show properties
Array of DnsRecord
typestringrequired

CNAME or TXT.

namestringrequired

The record's name.

valuestringrequired

What it holds.

purposestringrequired

traffic for the record that sends requests to Luna, ownership for one that only proves the domain yours.

createdMsinteger<int64>required

When it was added, in milliseconds since the epoch.

min 0
verifiedMsinteger<int64> | null

When its records were first found, in milliseconds since the epoch.

min 0
notAfterinteger<int64> | null

When its certificate runs out, in seconds since the epoch.

certificatestring | null

Where its certificate came from: acme (Luna got it) or uploaded.

writablebooleanrequired

Whether this request's credentials can add, remove and verify the tenant's domains.

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/domains/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "domains": [
    {
      "name": "string",
      "state": "pending",
      "error": "string",
      "records": [
        {
          "type": "string",
          "name": "string",
          "value": "string",
          "purpose": "string"
        }
      ],
      "createdMs": 0,
      "verifiedMs": 0,
      "notAfter": 0,
      "certificate": "string"
    }
  ],
  "writable": true
}

Was this page helpful?