Skip to main content

API and settings reference

The API​

Everything except /health needs the X-Api-Key header. The checks answer on an unlicensed installation; what a license changes is described in Licensing.

A call that also carries X-Antelao-Session is made as that account, and is held to its role: 401 when the session has ended, 403 when the role does not allow it. A call with the key alone has full access. See Accounts.

The service's own routes are under /api/v1. Every change there answers 202 Accepted with the job that makes it; see Every change is a job.

MethodRouteWhat it does
GET/healthLiveness. Anonymous
POST/api/v1/checkChecks an address, a domain and a client IP against your own entries and the public lists. See Checks
POST/api/v1/check/batchUp to 100 checks in one call, answered in their order
GET/api/v1/entriesYour own entries and the lists' exceptions, the deployment's first and locked
POST/api/v1/entriesQueues adding an entry. Operators and administrators
DELETE/api/v1/entries/{id}Queues removing an entry. Operators and administrators
GET/api/v1/sourcesEvery public list the license covers, with its terms, its schedule and its state
PUT/api/v1/sources/{key}Queues saving a list's on/off and schedule
POST/api/v1/sources/{key}/refreshQueues a refresh of a list now. Refused for a list the license does not cover, inside a list's least time between downloads, and with 409 while one is queued or running
GET/api/v1/dashboardThe checks per day and the hits per list over the last 7, 30 or 90 days (?days=)
GET/api/v1/jobsThe newest jobs first (?take=, up to 1,000)
GET/api/v1/jobs/{id}One job and how it ended
GET/api/v1/security/rulesEvery door's stored rules, the deployment's locked entries and the policy in force
PUT/api/v1/security/rules/{application}/{surface}Queues saving one door's rules: console/admin for the console, api/admin for the management API, api/checks for the checks
GET/api/v1/security/rules/resolveWhat a host name resolves to (?hostname=), for checking a rule
GET/api/v1/security/log/queryOne page of the firewall log, filtered, with its counts
GET/api/v1/security/log/exportEvery matching row of the firewall log as CSV
GET, PUT, DELETE/api/v1/security/threat/settingsThreat protection's settings in force; queues saving them, or handing them back to the deployment's
GET, POST/api/v1/security/threat/bansThe bans in force (?includePast=true adds the lifted and lapsed ones); queues a ban by hand
DELETE/api/v1/security/threat/bans/{id}Queues lifting a ban
GET/api/v1/security/threat/failuresThe newest failed attempts threat protection counted (?take=)

A few further routes under /api/v1/security serve the console's own door and answer only the console's key.

The routes this service shares with the other Antelao services keep their unversioned paths, and answer directly rather than with a job:

MethodRouteWhat it does
GET, POST/apikeysLists the keys that can reach this API, or issues one
DELETE/apikeys/{id}Revokes an issued key
POST/apikeys/{id}/deleteDeletes a revoked or expired issued key; a live key is refused
GET, POST, DELETE/licenseShows, installs or removes the license
POST/license/activateActivates a license key against the license server
POST, DELETE/license/sponsorAccepts a parent product's license as proof this installation is covered, or removes the stored sponsorship. See Sponsored by an Odoo Host Manager license
GET/optionsThe service's settings, and where each of them came from
PUT, DELETE/options/ratelimitSets the rate limit of the checks, or hands control back to the environment
GET, PUT, DELETE/smtpOutgoing mail settings. The password is never returned
POST/smtp/testSends a test message with the settings in force. Saves nothing
GET/backupThe service's database and the license as one archive. Refused to a read-only key
POST/restoreReads an archive back over them
GET, PUT/support/settingsThe support policy in force
GET, POST, DELETE/support/tracesThe session traces kept on this service; GET /support/traces/download?file= downloads one
GET/release-notesThe release notes built into the running service, newest first

The routes behind the console's accounts:

MethodRouteWhat it does
POST/account/sign-in, /account/sign-in/codeSigns an account in with its password, then its authenticator code, and answers with a session
POST/account/sign-in/passkey/options, /account/sign-in/passkeySigns an account in with a passkey
GET/accountThe signed-in account
POST/account/sign-outEnds this session
PUT/account/profileChanges your own display name and e-mail
POST/account/passwordChanges your own password
POST/account/totp/setup, /account/totp/confirm, /account/totp/disable, /account/recovery-codesThe authenticator app and its recovery codes
GET, POST, DELETE/account/passkeysYour passkeys
GET, DELETE/account/sessionsYour sessions; POST /account/sessions/end-others ends all but this one
GET, POST, PUT, DELETE/usersThe accounts, with /users/{id}/password, /totp/reset and /sessions/end. Reading needs an administrator or read-only administrator, changing needs an administrator
GET/auditThe audit log, newest first, with a search. Administrators and read-only administrators
GET, PUT/ui-memoryYour console preferences

Settings​

The API container:

VariableDefaultWhat it is
Api__Keys__<name>-An accepted API key. At least one is required, and it cannot be revoked through the API
Api__ConsoleKeyNameui or consoleThe name of the configured key the console uses. Only a call with that key may name the signed-in person's address for the audit log and the session list
Api__ActorKeyNames__<n>-Configured keys that act for people: a call with one may name the person in X-Antelao-Actor. See Keys that act for people
Api__TrustedProxies__<n>-A reverse proxy in front of the API, as an address (172.18.0.1) or a network (172.18.0.0/16). Its forwarded address and scheme are believed, and nobody else's, so the rate limit, threat protection and the audit log see the caller behind it. See A proxy that is not trusted
Blocklist__DatabasePath/data/blocklist.dbThe service's database: entries, lists and their downloaded copies, jobs, settings, issued keys as digests, accounts, the firewall's rules and log, threat protection's state and the audit log, mode 600
Blocklist__Entries__<n>-The deployment's own entries: full addresses, and @domain for a domain with its subdomains; several in one value separated by commas or semicolons. Shown locked
Blocklist__ScheduledRefreshtruefalse stops every scheduled refresh of the public lists; they are then refreshed by hand only
Blocklist__TracesDir/data/tracesWhere session traces are kept. Not part of a backup
BLOCKLIST_SEED_ADMIN_PASSgeneratedThe built-in administrator's password, applied when the account is made and whenever the value changes
BLOCKLIST_SEED_ADMIN_TOTP-The built-in administrator's authenticator secret in base32, at least 26 characters; makes two-factor required for it. Applied when the account is made, whenever the value changes and when the account no longer has it, as after a restore. An invalid value stops the API from starting
RateLimit__EnabledfalseWhether the checks are rate limited at all
RateLimit__PermitLimit600Requests one API key may make inside the window
RateLimit__WindowSeconds60The window's length
RateLimit__QueueLimit0Requests over the limit that wait rather than being refused
Smtp__EnabledfalseWhether outgoing mail is sent at all
Smtp__Host / Smtp__Port- / 587The mail server
Smtp__SecurityStartTlsNone, StartTls or SslOnConnect
Smtp__UserName / Smtp__Password-Credentials, or neither to send without authenticating
Smtp__FromAddress / Smtp__FromName- / Antelao BlocklistWho the mail comes from
Smtp__NotifyTo-Who it goes to, separated by commas, semicolons or new lines
Smtp__TimeoutSeconds30How long one send may take
License__Directory/data/licenseLicense files and check-in state
AccessControl__Surfaces__admin__...-The management API's locked firewall entries: AllowedIps__<n>, AllowedHostnames__<n>, AllowedCountries__<n>, AllowedContinents__<n>. See Firewall
AccessControl__Surfaces__checks__...-The same for the checks
AccessControl__GeoDatabasePath-A GeoLite2 country database file, for the firewall's country and continent rules and the log's countries. Unset, location rules are switched off
threatProtection__...see Threat protectionThreat protection's thresholds, whitelist and mail

The mail settings are named as this service and GeoIP read them. Antelao Fail2Ban names three of them differently and has no Smtp__Enabled, so do not copy a mail block from that product's compose file.

The console container:

VariableDefaultWhat it is
BlocklistApi__BaseUrl / BlocklistApi__ApiKey-The API's address and the key the console presents
Ui__SessionHours12How long a sign-in lasts at most. A session unused for two hours ends sooner
Ui__TrustedProxies__<n>-The reverse proxy in front of the console, as an address (172.18.0.1) or a network (172.18.0.0/16). Its forwarded address and scheme are believed, and nobody else's. See A proxy that is not trusted
Ui__AllowPlainHttpfalsetrue lets the console keep a sign-in over plain HTTP on a name other than localhost. The sign-in cookie can then be read by anyone on the network between the browser and the console, and the console warns about it at every start. Only for a trusted network with no HTTPS in front of the console
Turnstile__SiteKey-The site key of the optional Cloudflare Turnstile check on the sign-in page. The check is on only when this and Turnstile__SecretKey are both set. See Cloudflare Turnstile
Turnstile__SecretKey-Its secret key, used only to verify each answer with Cloudflare. The console then needs outbound HTTPS to challenges.cloudflare.com, and refuses a sign-in when Cloudflare cannot be reached
Turnstile__BypassfalseThe emergency bypass: true switches the Turnstile check off although both keys are set. The start argument --Turnstile:Bypass=true does the same. Warned about at every start and noted on every sign-in in the audit log
Turnstile__Hostnames__<n>-The hostnames a Turnstile answer may come from, such as the console's public name. Unset skips that check
DataProtection__KeysPath-Where the console keeps the keys its sessions are protected with. Put it on a volume, so a restart does not drop every open page

The console's own door in the firewall is set on the console container, with AccessControl__Surfaces__admin__AllowedIps__<n> and its siblings and, for location rules, AccessControl__GeoDatabasePath. See Firewall.