SaltDnsWeb.API.RegistrarController (Salt v1.0.0)

The registrar API, /api/v1/registrar (404 unless SALT_DNS_REGISTRAR=on), for a billing system such as Balie. The token needs a registrar level (SaltDns.Credentials.Credential: read or purchase); zone grants do not count. See docs/integrations/registrar.md.

CallLevelHeader X-Salt-Organisation
GET /account, POST /check, GET /pricesreadoptional
GET /domains, GET /domains/{fqdn}, GET /operations/{reference}readrequired
PUT /contacts/{ref}, POST /contacts/{ref}/verificationpurchaserequired
PUT /domains/{fqdn} (register, transfer), POST .../renew, .../restorepurchaserequired
PUT /domains/{fqdn}/name-serverspurchaserequired
POST /domains/{fqdn}/auth-codepurchaserequired

The header names the customer's organisation for a provisioning token. An ordinary token acts in its own organisation and ignores it. The registrar account used is the active provider of the token's own organisation, else the shared one; with neither, the answer is 503 registrar_unavailable.

Only register, transfer, renew and restore spend money: PUT /domains/{fqdn} (kind register or transfer), POST .../renew and POST .../restore. Each takes the caller's reference (the same reference never buys twice), a cost_ceiling_minor (Salt refuses if the price is higher) and answers 200 when done and 202 when pending or still started.

Errors are problem documents (urn:salt-dns:problem:<code>): insufficient_funds 402, name_unavailable 409, price_above_ceiling 409 (with current_cost), reference_reuse 409, invalid 422 (and invalid_contact on contacts, with errors per field), unsupported_extension 422, rate_limited 429 with Retry-After, registrar_unavailable 503, not_found 404, locked 409, provider 502.

Request bodies of contacts and the authorisation code of an answer never reach a log (config :phoenix, :filter_parameters, and the answer carries Cache-Control: no-store).

Summary

Functions

account(conn, params)

auth_code(conn, map)

check(conn, params)

contact_put(conn, map)

contact_verification(conn, map)

domain_index(conn, params)

domain_put(conn, map)

domain_renew(conn, map)

domain_restore(conn, map)

domain_show(conn, map)

name_servers_put(conn, map)

operation_abandon(conn, map)

operation_show(conn, map)

prices(conn, params)