Edgeweir
Reference

API: System and account

Procedures for setup, the caller's account, AccessKeys, service accounts and system settings; 51 in total.

Access levels, authentication, idempotency keys and the error format: API overview.

Setup and status

  • Neither procedure needs a key. The setup wizard: Account.
ProcedureMethod and pathAccess
system.statusGET /system/statuspublic; service account (no scope)
system.setupPOST /system/setuppublic

system.status

GET /system/status · public · service account (no scope)

No parameters.

Response:

FieldTypeDescription
initializedbooleanThe operator's account exists (the demo account does not count)
versionstringConsole version
demobooleanThe demo account is on; the sign-in page offers it

system.setup

POST /system/setup · public

ParameterInTypeRequiredConstraints and defaultDescription
setupTokenbodystringyes1–200 characters after trimmingOne-time setup token the console writes to its log at startup
namebodystringyes1–100 characters after trimmingName
emailbodystringyesE-mail address; lowercasedSign-in e-mail
passwordbodystringyes12–128 charactersPassword

Only while no operator account exists. Creates the only operator account, creates the cluster default when there is no cluster, and spends the token. Creates no session. Audited as system.setup; a wrong token is audited as system.setup_rejected (metadata email). When a step fails, the new account is deleted again and the token stays usable.

Response: { userId }: ID of the new account (string).

ErrorStatusCondition
SETUP_IN_PROGRESS409Another setup request is running
SETUP_DONE403The operator account exists already
SETUP_TOKEN_INVALID403Wrong or spent token

Installer bootstrap and integration authorization

Set EDGEWEIR_BOOTSTRAP_TOKEN_FILE for a new installation: a private regular file (0600, readable by the process, no symlinks), mounted read-only, containing 32 random bytes in base64url or an equally strong 64-character hexadecimal token. This mode suppresses the log setup token and refuses the legacy setup path.

POST /system/bootstrap takes {installationId,requestId,token} (UUID IDs). It atomically creates a passwordless internal operator, the default cluster and a dedicated write AccessKey. Existing operators are refused. The response is {installationId,userId,clusterId,accessKeyId,accessKey,caSha256,recoveryExpiresAt} and belongs only on the backend connection, never in logs, URLs or the browser.

Retries of the same installation/request recover the same master-key-sealed result for 24 hours. POST /system/bootstrap/acknowledge takes the same body plus the issued x-api-key; only proof of holding that credential erases the recovery result. The actual key remains valid. Status checks clear expired results; a client that already persisted the key can still acknowledge it. A lost result outside its recovery window requires explicit deployment-owner authorization, without rebuilding resources.

For an existing instance, its official image ships node dist/server/authorize-integration.js. Redirect prepare <installation UUID> output to a private 0600 file before passing it to authorize on stdin. This is deployment-owner authorization, audited as a local operator; it does not claim browser MFA. POST /system/authorize-integration redeems that saved request; /system/authorize-integration/acknowledge takes the request and the issued x-api-key. Multiple clusters produce a null default cluster. An explicit local renew rotates the previous integration credential for that installation; resume interruptions with the saved request. Existing users, passwords, MFA, passkeys, resources and node identities remain unchanged.

All four endpoints refuse generic Idempotency-Key caching. Another installation/request conflicts. system.status reports bootstrap:{version:1,enabled,phase} and integrationAuthorization:{version:1,phase} without secrets or account identities. Core has no Business/Cloud licensing dependency, and standalone setup remains available when file bootstrap is not enabled.

Account

  • hiddenCards.* read and write a personal preference of the caller's account and are not audited; with an AccessKey they act on the operator's preference. Behaviour: Customize cards.
ProcedureMethod and pathAccess
account.meGET /meread; service account (no scope)
hiddenCards.getGET /hidden-cardsread
hiddenCards.updatePATCH /hidden-cardswrite

account.me

GET /me · read · service account (no scope)

No parameters.

Response:

FieldTypeDescription
user.idstringAccount ID; for a service account its ID
user.namestringName; for a service account its name
user.emailstringSign-in e-mail; empty for a service account
user.twoFactorEnabledbooleanTwo-factor authentication is on; false for a service account
serviceAccountobject{ id, name, scopes } when the caller is a service account, else null
demobooleanThe caller is the demo account

hiddenCards.get

GET /hidden-cards · read

No parameters.

Response:

FieldTypeDescription
overviewarray<enum>Card IDs hidden on the overview, in page order
sitearray<enum>Card IDs hidden on a site's Analytics tab (shared by all sites), in page order

Every card not listed shows. Both are [] until first saved. Saved IDs the current version does not know are left out.

hiddenCards.update

PATCH /hidden-cards · write

ParameterInTypeRequiredConstraints and defaultDescription
overviewbodyarray<enum>noAt most 21, values below; duplicates removed; unchanged when omittedReplaces the overview's hidden cards
sitebodyarray<enum>noAt most 14, values below; duplicates removed; unchanged when omittedReplaces the site analytics' hidden cards

Omitting both answers 400 BAD_REQUEST. An empty array shows every card of that page.

PageCard IDs
overviewlive-requests, live-egress, live-hit-ratio, live-nodes, requests, data-transfer, edge-network, hit-ratio, peak-bandwidth, 4xx-rate, 5xx-rate, status-codes, top-sites, top-nodes, top-countries, top-urls, top-ips, revisions, recents, sites, nodes
siterequests, data-transfer, hit-ratio, peak-bandwidth, 4xx-rate, 5xx-rate, status-codes, top-urls, top-ips, countries, asns, referers, clients, protocols

Response: as hiddenCards.get.

AccessKey

  • Manages the caller's account's AccessKeys; with an AccessKey, the operator's keys. Usage: Access keys.
  • A key is ewk_ followed by 64 letters and is returned once, in the response of accessKeys.create; prefix is its first 6 characters. scope is read (read-level procedures) or write (every procedure); older keys without recorded permissions count as write.
  • requestsPerMinute: 1–100000, or null (unlimited). Each key is counted in 60-second windows; a window starts with the key's first request after the previous window ended. Over the limit within a window: 429 API_KEY_RATE_LIMITED, data.retryAfterSeconds until the window ends. Counts live in the console process and start over on restart; changing the limit starts the count over.
  • Audited as api_key.create, api_key.update (metadata: name and requestsPerMinute before and after), api_key.revoke; the metadata never holds the key.
ProcedureMethod and pathAccess
accessKeys.listGET /access-keysread
accessKeys.createPOST /access-keyswrite; session only
accessKeys.updatePATCH /access-keys/{id}write; session only
accessKeys.revokeDELETE /access-keys/{id}write

accessKeys.list

GET /access-keys · read

No parameters.

Response: AccessKey[], oldest first, including revoked keys (enabled is false).

accessKeys.create

POST /access-keys · write · session only · refuses Idempotency-Key

ParameterInTypeRequiredConstraints and defaultDescription
namebodystringyes1–64 characters after trimmingName
scopebodyenumnoread / write, default writeScope
requestsPerMinutebodyintegerno1–100000 or null, default 600Requests per minute; null is unlimited

Only with a signed-in console session.

Response: AccessKey plus key (string): the full key, returned this once.

ErrorStatusCondition
ACCESS_KEY_SESSION_REQUIRED403Called with an AccessKey

accessKeys.update

PATCH /access-keys/{id} · write · session only

ParameterInTypeRequiredConstraints and defaultDescription
idpathstringyes1–128 charactersKey ID
namebodystringno1–64 characters after trimming; unchanged when omittedName
requestsPerMinutebodyintegerno1–100000 or null; unchanged when omittedRequests per minute; null is unlimited

Only with a signed-in console session. A changed limit starts the key's count over.

Response: AccessKey.

ErrorStatusCondition
ACCESS_KEY_SESSION_REQUIRED403Called with an AccessKey
ACCESS_KEY_NOT_FOUND404The caller's account has no such key
ACCESS_KEY_REVOKED409The key is revoked

accessKeys.revoke

DELETE /access-keys/{id} · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathstringyes1–128 charactersKey ID

Sets enabled to false; the key stays in the list. Requests with it answer 401 from then on. Revoking a revoked key succeeds again and writes another audit entry.

Response: { ok: true }.

ErrorStatusCondition
ACCESS_KEY_NOT_FOUND404The caller's account has no such key

Service accounts

  • Behaviour: Service accounts. Service accounts cannot call the procedures of this section.
  • A key is ews_ followed by 43 base64url characters and is returned once, in the response of serviceAccounts.createKey; the console keeps only its SHA-256. prefix is its first 12 characters. Keys of a disabled account and revoked keys answer 401. Service account keys have no request limit.
  • Audited as service_account.create, service_account.update, service_account.delete, service_account.key_create, service_account.key_revoke.
  • Procedures that need no scope: system.status, account.me, dns.catalog. The procedures each scope allows:
ScopeProcedures
system:readsettings.get
clusters:readclusters.list, clusters.get
sites:readsites.list, sites.get, sites.launch, dns.siteTarget
sites:writesites.setEnabled
usage:readusage.list, usage.changes
ProcedureMethod and pathAccess
serviceAccounts.listGET /service-accountsread
serviceAccounts.createPOST /service-accountswrite
serviceAccounts.updatePATCH /service-accounts/{id}write
serviceAccounts.deleteDELETE /service-accounts/{id}write
serviceAccounts.createKeyPOST /service-accounts/{id}/keyswrite
serviceAccounts.revokeKeyPOST /service-accounts/{id}/keys/{keyId}/revokewrite

serviceAccounts.list

GET /service-accounts · read

No parameters.

Response: Service account[], by name.

serviceAccounts.create

POST /service-accounts · write · 201

ParameterInTypeRequiredConstraints and defaultDescription
namebodystringyes1–64 characters after trimming; unique (case-sensitive)Name
scopesbodyarray<enum>yes0–5 of clusters:read / system:read / sites:read / sites:write / usage:read; duplicates removed, sortedScopes
enabledbodybooleannoDefault trueEnabled

Response: Service account with keys [].

ErrorStatusCondition
SERVICE_ACCOUNT_NAME_TAKEN409The name is in use; data.name

serviceAccounts.update

PATCH /service-accounts/{id} · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Service account ID
namebodystringnoAs in create; unchanged when omittedName
scopesbodyarray<enum>noAs in create; replaces the list; unchanged when omittedScopes
enabledbodybooleannoUnchanged when omittedEnabled

Response: Service account.

ErrorStatusCondition
SERVICE_ACCOUNT_NOT_FOUND404No such service account
SERVICE_ACCOUNT_NAME_TAKEN409Another service account uses the name; data.name

serviceAccounts.delete

DELETE /service-accounts/{id} · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Service account ID

Deletes all of its keys with it.

Response: { ok: true }.

ErrorStatusCondition
SERVICE_ACCOUNT_NOT_FOUND404No such service account

serviceAccounts.createKey

POST /service-accounts/{id}/keys · write · 201 · refuses Idempotency-Key

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Service account ID
namebodystringnoAt most 64 characters after trimming, default ""Key name

Disabled service accounts can get keys too.

Response: { key, secret }: key is a Service account key, secret (string) the full key, returned this once.

ErrorStatusCondition
SERVICE_ACCOUNT_NOT_FOUND404No such service account

serviceAccounts.revokeKey

POST /service-accounts/{id}/keys/{keyId}/revoke · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Service account ID
keyIdpathuuidyes—Key ID

A revoked key is returned as it is, without another audit entry.

Response: Service account key.

ErrorStatusCondition
SERVICE_ACCOUNT_NOT_FOUND404No such service account
SERVICE_ACCOUNT_KEY_NOT_FOUND404No such key, or it belongs to another service account

System information

ProcedureMethod and pathAccess
settings.getGET /settingsread; service account system:read

settings.get

GET /settings · read · service account system:read

No parameters.

Response:

FieldTypeDescription
versionstringConsole version
consoleUrlstringEDGEWEIR_PUBLIC_URL
nodeApiUrlstringNode channel URL in effect, as effectiveUrl of settings.nodeChannel
nodeCaSha256stringSHA-256 of the node channel CA certificate (DER), lowercase hex
analyticsModeenumlite / clickhouse: EDGEWEIR_ANALYTICS
setupCompletedAtdatetimeWhen the setup token was spent, or null

Node channel

  • Behaviour: Node channel and Changing the node channel URL.
  • The three changing procedures are audited as system.node_channel_update (metadata of removeNodeChannelName includes removedName, of closeNodeChannelWebSocket webSocket: closed) and tell every console instance to update its node channel certificate and WebSocket entry.
  • Node and probe counts include only those whose certificate is still valid.
ProcedureMethod and pathAccess
settings.nodeChannelCheckGET /settings/node-channel-checkread
settings.nodeChannelGET /settings/node-channelread
settings.setNodeChannelPUT /settings/node-channelwrite
settings.removeNodeChannelNameDELETE /settings/node-channel/names/{name}write
settings.closeNodeChannelWebSocketDELETE /settings/node-channel/websocketwrite

settings.nodeChannelCheck

GET /settings/node-channel-check · read

No parameters.

Connects to the node channel URL in effect the way a node does: a TLS handshake without client certificate and without a request, 3-second timeout. For wss:// and ws:// URLs, a WebSocket handshake at /node-channel first, then the TLS handshake inside it. A URL saved in system settings is first resolved under the outbound policy (EDGEWEIR_OUTBOUND_ALLOW_CIDRS); the environment's and the default URL are connected to as they are. Each console process caches the result for 30 seconds and checks again when the URL or its source changes. Advisory only. See Node channel connection check.

Response:

FieldTypeDescription
urlstringThe URL checked
resultenumok: the presented chain contains the node channel CA; unreachable: no handshake within the timeout; mismatch: another chain answered, or a WebSocket URL did not upgrade; refused: the saved URL resolves to a special-purpose address the outbound policy does not allow, not connected
candidateobjectAfter unreachable or mismatch, the WebSocket entry candidate { url, result } (checked also while the entry is closed; with ok, saving its url as the node channel URL switches to it), otherwise null
checkedAtdatetimeTime of the check

settings.nodeChannel

GET /settings/node-channel · read

No parameters.

Response: Node channel.

settings.setNodeChannel

PUT /settings/node-channel · write

ParameterInTypeRequiredConstraints and defaultDescription
urlbodystringyesEmpty, or https://, wss:// or ws:// with a host and optional port; no credentials, path, query or fragment; at most 2048 charactersNode channel URL

Saved as its origin (host lowercased, trailing / and default port dropped). An empty string clears the saved URL: EDGEWEIR_NODE_API_URL or the default applies. The name of the URL in effect before stays in the certificate (at most 32 such names); when the earlier or the new URL is wss:// or ws://, the WebSocket entry stays open.

Response: Node channel.

settings.removeNodeChannelName

DELETE /settings/node-channel/names/{name} · write

ParameterInTypeRequiredConstraints and defaultDescription
namepathstringyes1–253 characters; case-insensitiveA name from previousNames

Takes the name out of the node channel certificate.

Response: Node channel.

ErrorStatusCondition
NODE_CHANNEL_NAME_NOT_FOUND404Not a name an earlier URL left: not in previousNames, the current URL's name, or a name from the environment or the default
NODE_CHANNEL_NAME_IN_USE409Nodes or probes still connect with the name; data.nodes, data.probes

settings.closeNodeChannelWebSocket

DELETE /settings/node-channel/websocket · write

No parameters.

Closes the WebSocket entry an earlier wss:// or ws:// URL opened.

Response: Node channel.

ErrorStatusCondition
NODE_CHANNEL_WEBSOCKET_REQUIRED409webSocket.closable is false: EDGEWEIR_NODE_API_WEBSOCKET=true, the URL in effect is wss:// or ws://, or no earlier URL of that kind opened the entry
NODE_CHANNEL_WEBSOCKET_IN_USE409Nodes or probes may still connect through the entry; data.nodes, data.probes

Origin allow list

  • Behaviour: Origin allow list and Origin address restrictions.
  • settings.setOriginAllowList publishes a configuration revision for every cluster (reason origin_allow_list_updated) and is audited as system.origin_allow_list_update (metadata cidrs, added, removed, and each cluster's new revision in revisions).
ProcedureMethod and pathAccess
settings.originAllowListGET /settings/origin-allow-listread
settings.setOriginAllowListPUT /settings/origin-allow-listwrite

settings.originAllowList

GET /settings/origin-allow-list · read

No parameters.

Response: { cidrs }: special-purpose ranges origins may use (string[]), normalized, sorted, without duplicates; [] until first saved.

settings.setOriginAllowList

PUT /settings/origin-allow-list · write

ParameterInTypeRequiredConstraints and defaultDescription
cidrsbodyarray<string>yesAt most 256; each an IPv4 or IPv6 CIDR of at most 64 characters, a bare address being a single host; normalized (10.1.2.3/8 → 10.0.0.0/8)The whole list

Replaces the list; an empty array clears it.

Response: as settings.originAllowList.

ACME directory

  • Behaviour: Certificate authorities. Certificate requests with ca custom use this directory.
  • Each value is the one saved in system settings, else the environment's (EDGEWEIR_ACME_DIRECTORY, EDGEWEIR_ACME_CA_FILE), else none. The EAB HMAC key is sealed with the master key and never returned.
  • Audited as system.acme_directory_update (metadata: url before and after, eabKid, caCertificates; never the key).
ProcedureMethod and pathAccess
settings.acmeDirectoryGET /settings/acme-directoryread
settings.setAcmeDirectoryPUT /settings/acme-directorywrite

settings.acmeDirectory

GET /settings/acme-directory · read

No parameters.

Response: ACME directory setting.

settings.setAcmeDirectory

PUT /settings/acme-directory · write

ParameterInTypeRequiredConstraints and defaultDescription
urlbodystringyesEmpty, or an https:// URL without credentials or fragment, at most 2048 charactersACME directory URL
eabKidbodystringnoAt most 256 characters after trimming, default ""EAB key ID; empty: no EAB
eabHmacKeybodystringnoAt most 1024 characters after trimming, default ""EAB HMAC key; empty keeps the saved key of the same eabKid
caPembodystringnoAt most 65536 characters, default ""CA certificates to trust: 1–10 PEM certificates and no other PEM block; whitespace only means none
  • An empty url clears the whole setting; the other fields have no effect.
  • With an empty eabKid, no EAB is saved and eabHmacKey is ignored.
  • Before saving, the console reads the directory trusting the system roots plus caPem (when empty, the certificates of EDGEWEIR_ACME_CA_FILE): 10 seconds, at most 1 MiB, no redirects; it must answer 200 with JSON holding newNonce, newAccount and newOrder. The directory may be on a private network. Up to 10 names of meta.caaIdentities are saved as caaIdentities.

Response: ACME directory setting.

ErrorStatusCondition
ACME_DIRECTORY_CA_INVALID400caPem is not 1–10 readable PEM certificates, holds another PEM block, or exceeds 65536 bytes
ACME_DIRECTORY_EAB_INCOMPLETE400eabKid given with an empty eabHmacKey, and no key saved for the same eabKid
ACME_DIRECTORY_INVALID400The read failed or did not return an ACME directory

Node release source

  • Behaviour: Node release source. The mirror layout is <url>/v<version>/checksums.txt.
  • Audited as system.release_source_update (metadata before, after).
ProcedureMethod and pathAccess
settings.releaseSourceGET /settings/release-sourceread
settings.setReleaseSourcePUT /settings/release-sourcewrite

settings.releaseSource

GET /settings/release-source · read

No parameters.

Response:

FieldTypeDescription
urlstringURL saved in system settings; empty when none is saved
effectiveUrlstringURL node upgrades use: the saved one, else EDGEWEIR_NODE_RELEASE_BASE_URL, else https://github.com/marvinli001/edgeweir-node/releases/download
sourceenumsetting / environment / default: where effectiveUrl comes from

settings.setReleaseSource

PUT /settings/release-source · write

ParameterInTypeRequiredConstraints and defaultDescription
urlbodystringyesEmpty, or an https:// or http:// URL without credentials, query or fragment, at most 2048 charactersMirror URL

Before saving, the host is resolved (10 seconds): every answer must be a public address or one EDGEWEIR_OUTBOUND_ALLOW_CIDRS allows; http:// is allowed for non-public addresses only. The mirror's content is not read. An empty string clears the saved URL.

Response: as settings.releaseSource.

ErrorStatusCondition
RELEASE_SOURCE_REFUSED400The host does not resolve, resolves to an address not allowed, or a public address uses http://

Usage and log retention

  • Behaviour: Usage, access log retention and Node log retention.
  • All three PUTs replace the whole setting; audited as system.usage_update, system.log_retention_update, system.node_log_retention_update (metadata: the values before and after).
ProcedureMethod and pathAccess
settings.usageGET /settings/usageread
settings.setUsagePUT /settings/usagewrite
settings.logRetentionGET /settings/log-retentionread
settings.setLogRetentionPUT /settings/log-retentionwrite
settings.nodeLogRetentionGET /settings/node-log-retentionread
settings.setNodeLogRetentionPUT /settings/node-log-retentionwrite

settings.usage

GET /settings/usage · read

No parameters.

Response: { retentionDays, offlineThresholdMinutes }, fields as in settings.setUsage; 100 and 60 until first saved.

settings.setUsage

PUT /settings/usage · write

ParameterInTypeRequiredConstraints and defaultDescription
retentionDaysbodyintegeryes35–400Days usage records are kept
offlineThresholdMinutesbodyintegeryes5–1440Nodes without a heartbeat for longer no longer hold back completeUntil

Response: as settings.usage.

settings.logRetention

GET /settings/log-retention · read

No parameters.

Response:

FieldTypeDescription
postgresDaysintegerDays PostgreSQL storage keeps access logs; 7 until first saved
clickhouseDaysintegerDays ClickHouse storage keeps access logs; 7 until first saved
storageenumlite / clickhouse: the storage in use (EDGEWEIR_ANALYTICS), which decides which of the two applies

settings.setLogRetention

PUT /settings/log-retention · write

ParameterInTypeRequiredConstraints and defaultDescription
postgresDaysbodyintegeryes1–30Days for PostgreSQL storage
clickhouseDaysbodyintegeryes1–90Days for ClickHouse storage

With clickhouse storage in use, the TTL of the ClickHouse access_log table changes right after saving.

Response: as settings.logRetention.

settings.nodeLogRetention

GET /settings/node-log-retention · read

No parameters.

Response: { days, perNode }, fields as in settings.setNodeLogRetention; 7 and 10000 until first saved.

settings.setNodeLogRetention

PUT /settings/node-log-retention · write

ParameterInTypeRequiredConstraints and defaultDescription
daysbodyintegeryes1–30Days node logs are kept
perNodebodyintegeryes1000–100000Entries kept per node at most

Response: as settings.nodeLogRetention.

Ban and protection settings

  • Behaviour: Protection, Bans, CC template, Bans and Challenges and CC mitigation.
  • All three PUTs replace the whole setting; audited as system.bans_update, system.protection_update, system.cc_template_update (metadata: the values before and after).
  • Revision reasons: platform_protection_updated (settings.setProtection), cc_template_updated (settings.setCcTemplate).
ProcedureMethod and pathAccess
settings.bansGET /settings/bansread
settings.setBansPUT /settings/banswrite
settings.protectionGET /settings/protectionread
settings.setProtectionPUT /settings/protectionwrite
settings.ccTemplateGET /settings/cc-templateread
settings.setCcTemplatePUT /settings/cc-templatewrite

settings.bans

GET /settings/bans · read

No parameters.

Response: { maxTotal, shareAutoBans }, fields as in settings.setBans; 10000 and true until first saved.

settings.setBans

PUT /settings/bans · write

ParameterInTypeRequiredConstraints and defaultDescription
maxTotalbodyintegeryes100–100000Active manual bans across the platform, site and platform bans together
shareAutoBansbodybooleanyes—Automatic bans are sent to the other nodes of the cluster

Response: as settings.bans.

settings.protection

GET /settings/protection · read

No parameters.

Response: { underAttack, underAttackChallenge, eventRetentionDays }, fields as in settings.setProtection; false, js and 30 until first saved.

settings.setProtection

PUT /settings/protection · write

ParameterInTypeRequiredConstraints and defaultDescription
underAttackbodybooleanyes—Under Attack for every site of every cluster
underAttackChallengebodyenumyescookie302 / js / pow / captchaChallenge type of platform Under Attack
eventRetentionDaysbodyintegeryes7–365Days security events are kept

When underAttack changes, or underAttackChallenge changes while underAttack is true, every cluster gets a configuration revision.

Response: as settings.protection.

settings.ccTemplate

GET /settings/cc-template · read

No parameters.

Response: the CC template, fields as in settings.setCcTemplate.

settings.setCcTemplate

PUT /settings/cc-template · write

ParameterInTypeRequiredConstraints and defaultDescription
maxLevelbodyenumyescookie302 / js / pow / captcha; captcha until savedHighest level the policy may reach
highPowInsteadOfCaptchabodybooleanyesfalse until savedAt the captcha level, challenge with the high-difficulty proof of work instead
windowSecondsbodyintegeryes5–60; 10 until savedSliding window in seconds
siteQpsbodyintegeryes0–1000000; 1000 until savedRequests per second of the site
urlQpsbodyintegeryes0–1000000; 200 until savedRequests per second of one path; only attacked paths are escalated
ipQpsbodyintegeryes0–1000000; 50 until savedRequests per second of one address; addresses over it are banned for ipBanSeconds
ipBanSecondsbodyintegeryes60–86400; 600 until savedDuration of the automatic ban
originErrorPercentbodyintegeryes0–100; 50 until savedOrigin errors (5xx and failed attempts) in percent of origin requests
originErrorMinRequestsbodyintegeryes0–1000000; 100 until savedOrigin requests in the window before the error rate counts
escalateAfterSecondsbodyintegeryes1–3600; 10 until savedA trigger that holds this long raises the level by one step
cooldownSecondsbodyintegeryes1–86400; 60 until savedWithout triggers for this long, the level falls by one step

A threshold of 0 turns its trigger off. Each node decides locally, so thresholds apply per node. Saving publishes the clusters with sites whose enabled CC policy follows the template.

Response: as settings.ccTemplate.

Probe settings

  • Behaviour: Probe settings.
  • Audited as system.probes_update (metadata: the values before and after).
ProcedureMethod and pathAccess
settings.probesGET /settings/probesread
settings.setProbesPUT /settings/probeswrite

settings.probes

GET /settings/probes · read

No parameters.

Response: the probe settings, fields as in settings.setProbes.

settings.setProbes

PUT /settings/probes · write

ParameterInTypeRequiredConstraints and defaultDescription
intervalSecondsbodyintegeryes5–60; 10 until savedSeconds between probe rounds
timeoutMsbodyintegeryes500–10000, at most intervalSeconds × 1000; 3000 until savedMilliseconds one attempt may take
attemptsbodyintegeryes1–10; 3 until savedAttempts per target and round
lossPercentbodyintegeryes1–100; 50 until savedShare of lost attempts (percent) that makes an address fail
ipDownSecondsbodyintegeryes5–3600; 30 until savedHow long an address fails before the node switches to its next level
ipUpSecondsbodyintegeryes5–3600; 60 until savedHow long a failed address answers again before the node switches back

Replaces the whole setting. timeoutMs over intervalSeconds × 1000 answers 400 BAD_REQUEST.

Response: as settings.probes.

Platform error pages

  • Behaviour and placeholders: Platform error pages and Templates.
  • settings.setErrorPages publishes a configuration revision for every cluster (reason error_pages_updated) and is audited as system.error_pages_update (metadata changed, bytes, and each cluster's new revision in revisions).
ProcedureMethod and pathAccess
settings.errorPagesGET /settings/error-pagesread
settings.setErrorPagesPUT /settings/error-pageswrite

settings.errorPages

GET /settings/error-pages · read

No parameters.

Response: { unknownHost, siteDisabled }, fields as in settings.setErrorPages; both empty until first saved.

settings.setErrorPages

PUT /settings/error-pages · write

ParameterInTypeRequiredConstraints and defaultDescription
unknownHostbodystringnoAt most 65536 bytes of UTF-8, default ""Page for hosts no site serves (404)
siteDisabledbodystringnoAt most 65536 bytes of UTF-8, default ""Page for hosts of disabled sites (503)

Replaces both pages: an omitted field is saved as an empty string. An empty string uses the nodes' built-in page. A template with {{time}} or {{path}} makes the clusters' configuration require the node capability rules-v3.

Response: as settings.errorPages.

ErrorStatusCondition
ERROR_PAGE_TOO_LARGE400A template exceeds 65536 bytes; data.status is 404 or 503, data.limit is 65536

Demo account

  • Behaviour: Demo account.
  • A change of state is audited as system.demo_update (metadata from, to); no entry when the state stays.
ProcedureMethod and pathAccess
settings.demoGET /settings/demoread
settings.setDemoPUT /settings/demowrite

settings.demo

GET /settings/demo · read

No parameters.

Response: { enabled }: the demo account is on (boolean).

settings.setDemo

PUT /settings/demo · write

ParameterInTypeRequiredConstraints and defaultDescription
enabledbodybooleanyes—Turns the demo account on or off

Turning it on creates the account demo@edgeweir.com (password demo); turning it off deletes the account with all of its sessions. The operator's account is left as it is.

Response: as settings.demo.

ErrorStatusCondition
DEMO_EMAIL_TAKEN409Turning it on while the operator's e-mail is demo@edgeweir.com

Login IP allow list

  • Behaviour and what the list limits: Login IP allow list.
  • Audited as system.login_allow_list_update (metadata cidrs, added, removed).
ProcedureMethod and pathAccess
settings.loginAllowListGET /settings/login-allow-listread
settings.setLoginAllowListPUT /settings/login-allow-listwrite

settings.loginAllowList

GET /settings/login-allow-list · read

No parameters.

Response:

FieldTypeDescription
cidrsarray<string>Ranges allowed to sign in, normalized, sorted, without duplicates; [] while the list is off. The demo account sees each range cut to at most IPv4 /24 or IPv6 /48
currentIpstringThe client address the console resolved for this request
proxyHintbooleancurrentIp may be a proxy's: it is a special-purpose address, or the request carried forwarding headers from a peer outside EDGEWEIR_TRUSTED_PROXIES

settings.setLoginAllowList

PUT /settings/login-allow-list · write

ParameterInTypeRequiredConstraints and defaultDescription
cidrsbodyarray<string>yesAt most 64; each an IPv4 or IPv6 CIDR of at most 64 characters, a bare address being a single host; normalizedThe whole list

Replaces the list; an empty array turns it off. IPv4-mapped IPv6 addresses and ranges compare as the IPv4 ones they map.

Response: as settings.loginAllowList.

ErrorStatusCondition
LOGIN_ALLOW_LIST_EXCLUDES_CURRENT_IP400The list is not empty and leaves out this request's client address (checked with an AccessKey too); data.ip

Node extensions

ProcedureEndpoint
extensionKeys.list, extensionKeys.add, extensionKeys.removeGET, POST /extension-keys, DELETE /extension-keys/{kid}
extensions.verifyPOST /extensions/verify
extensions.installPOST /extensions
extensions.list, extensions.get, extensions.update, extensions.uninstallGET /extensions, GET, PATCH, DELETE /extensions/{id}
extensions.activate, extensions.deleteVersionPOST /extensions/{id}/activate, DELETE /extensions/{id}/versions/{version}
extensions.settings, extensions.updateSettingsGET, PUT /extensions/settings (kill switch)
extensions.forSite, extensions.updateSiteGET /sites/{siteId}/extensions, PUT /sites/{siteId}/extensions/{id}
extensions.rotateSecretPOST /extensions/{id}/rotate-secret (manifest secret: true): a new current secret, the old one kept as previous, secretVersion + 1; publishes the clusters that get the extension; audit extension.rotate_secret
extensions.listSiteData, extensions.putSiteData, extensions.deleteSiteDataGET /sites/{siteId}/extensions/{id}/data → [{ name, sha256, size, updatedAt }], PUT, DELETE /sites/{siteId}/extensions/{id}/data/{name} (manifest data); publish the site's cluster; audit site.extension_data_put, site.extension_data_delete
RequestFields
POST /extension-keyspublisher, key (public JWK JSON or its base64url x), label
POST /extensions/verify, POST /extensionspackage (the .ewx bytes, base64), signature (the .ewx.sig compact JWS); requests up to 96 MiB (packages with a sidecar)
PATCH /extensions/{id}enabled, failureMode (open, closed), config (the manifest's global schema)
PUT /sites/{siteId}/extensions/{id}enabled, config (the manifest's site schema)
PUT /sites/{siteId}/extensions/{id}/data/{name}content (base64; requests up to 34 MiB). name ^[a-z0-9][a-z0-9._-]{0,63}$; limits from the active manifest's data (max_bytes per item, max_items and max_total_bytes per site and extension)

Errors: EXTENSION_PACKAGE_INVALID, EXTENSION_SIGNATURE_INVALID, EXTENSION_KEY_UNTRUSTED, EXTENSION_PUBLISHER_MISMATCH, EXTENSION_CONFIG_INVALID, EXTENSION_IN_USE (rules read its fields), EXTENSION_KEY_IN_USE, EXTENSION_VERSION_ACTIVE, EXTENSION_SECRET_NOT_SUPPORTED, EXTENSION_DATA_NOT_SUPPORTED (the manifest has no data), EXTENSION_DATA_TOO_LARGE (limit: max_bytes, max_items or max_total_bytes; max), EXTENSION_DATA_NOT_FOUND, NODE_CAPABILITY_REQUIRED (extensions-v1, extensions-v2). extensions.get carries secretVersion (never the secret) and node states with details (what the node reports, such as sidecar.state); extensions.forSite carries dataLimits. Configuration values marked x-secret come back masked; sending the mask keeps the stored value. Access logs carry block reason extension with rule id ext:<id> and the field ext (the extensions' log fields and verdicts). Format and runtime: Node extensions; usage: Extensions.

Objects

AccessKey object

FieldTypeDescription
idstringKey ID
namestringName
prefixstringFirst 6 characters of the key
scopeenumread / write
enabledbooleanfalse: revoked
requestsPerMinuteintegerRequests per minute, or null (unlimited)
createdAtdatetimeCreation time
lastUsedAtdatetimeLast use (updated at most once a minute), or null

Service account object

FieldTypeDescription
iduuidService account ID
namestringName
scopesarray<enum>Scopes, sorted
enabledbooleanEnabled
keysarray<Service account key>All keys, revoked ones included, oldest first
createdAtdatetimeCreation time
updatedAtdatetimeLast change

Service account key object

FieldTypeDescription
iduuidKey ID
namestringKey name, may be empty
prefixstringFirst 12 characters of the key
createdAtdatetimeCreation time
lastUsedAtdatetimeLast use (updated at most once a minute), or null
revokedAtdatetimeRevocation time, or null

Node channel object

FieldTypeDescription
urlstringURL saved in system settings; empty when none is saved
effectiveUrlstringURL in effect: the saved one, else EDGEWEIR_NODE_API_URL, else the default. New install commands carry it; enrolled nodes and probes switch to it
sourceenumsetting / environment / default: where effectiveUrl comes from
serverNamestringCertificate name nodes verify at effectiveUrl (host name or IP)
previousNamesarray<object>Names earlier URLs left in the certificate, without the current name and the names from the environment or the default
previousNames[].namestringName
previousNames[].nodesintegerNodes still connecting with the name: they verified it on their latest connection, or report it as the address they use; a fallback a node keeps does not count
previousNames[].probesintegerThe same for probes. Removable once nodes and probes are both 0
webSocket.openbooleanThe WebSocket entry is open: EDGEWEIR_NODE_API_WEBSOCKET=true, the URL in effect is wss:// or ws://, or such a URL was in effect before
webSocket.closablebooleanThe entry is open only because of an earlier URL and can be closed with settings.closeNodeChannelWebSocket
webSocket.nodesintegerNodes that may still connect through the entry
webSocket.probesintegerProbes that may still connect through the entry
adoption.nodesintegerNodes whose certificate is still valid
adoption.nodesCurrentintegerOf those, nodes on effectiveUrl
adoption.probesintegerProbes whose certificate is still valid
adoption.probesCurrentintegerOf those, probes on effectiveUrl

The default URL is https://<host name of EDGEWEIR_PUBLIC_URL>:<NODE_API_PORT>; with EDGEWEIR_NODE_API_WEBSOCKET=true, wss://<host and port of EDGEWEIR_PUBLIC_URL> (ws:// when the console URL is http://).

ACME directory setting object

FieldTypeDescription
urlstringSaved directory URL; empty when none is saved
effectiveUrlstringDirectory URL in effect: the saved one, else EDGEWEIR_ACME_DIRECTORY; empty when neither
sourceenumsetting / environment / default: where effectiveUrl comes from; default means no custom directory
eabKidstringSaved EAB key ID; empty without EAB or without a saved directory
eabHmacKeySetbooleanAn EAB HMAC key is saved
caPemstringSaved CA certificates (PEM); empty when none is saved
caSourceenumsetting / environment / default: where the CA certificates in effect come from; default is the system roots
caaIdentitiesarray<string>CAA issuer domains from the saved directory's meta.caaIdentities (lowercase, at most 10); empty: CAA is not checked. [] when the directory comes from the environment
Edit on GitHub

On this page