Edgeweir
Reference

API: Overview, analytics and alerts

Procedures, parameters, responses and errors for the overview, traffic analytics, access logs, usage records, the audit log and alerts.

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

Overview

Behavior: Overview.

ProcedureMethod and pathAccess
overview.getGET /overviewread

overview.get

GET /overview · read

No parameters.

Response:

FieldTypeDescription
clustersintegerNumber of clusters
nodesintegerNumber of nodes (disabled ones included)
onlineNodesintegerNodes with a heartbeat within the last 3 heartbeat intervals (45 seconds), disabled ones included
sitesintegerNumber of sites (disabled ones included)
revisionsarray<revision>The 10 configuration revisions published last across all clusters, newest first
attentionarray<attention item>What needs the operator, in the kind order of the attention item object, clusters by name within a kind; [] when nothing does

Analytics

The data comes from the statistics nodes report every minute and covers existing sites only. Behavior: Overview: Analytics and Statistics dimensions.

rangeLengthBucket width (bucketSeconds)BucketsSource
1h1 hour6060Minute statistics
6h6 hours30072Minute statistics
24h24 hours600144Minute statistics
7d7 days3600168Hourly rollups
30d30 days21600120Hourly rollups
  • Buckets are aligned to the Unix epoch (UTC); the last bucket of a range contains the current time (still filling up), and the response's to is the current time.
  • Procedures with siteId: 404 SITE_NOT_FOUND when the site does not exist.
ProcedureMethod and pathAccess
analytics.trafficGET /analytics/trafficread
analytics.breakdownGET /analytics/breakdownread
analytics.topSitesGET /analytics/top-sitesread
analytics.topNodesGET /analytics/top-nodesread
analytics.topRequestsGET /analytics/top-requestsread
analytics.dimensionsGET /analytics/dimensionsread

analytics.traffic

GET /analytics/traffic · read

ParameterInTypeRequiredConstraints and defaultDescription
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hTime range
siteIdqueryuuidno—Only this site; omitted: every site

Response: traffic object.

ErrorStatusCondition
SITE_NOT_FOUND404The siteId site does not exist

analytics.breakdown

GET /analytics/breakdown · read

ParameterInTypeRequiredConstraints and defaultDescription
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hTime range
siteIdqueryuuidno—Only this site; omitted: every site
byqueryenumyessite / node / status / block_reasonBreak down by site, edge node, HTTP status code or block reason (requests refused or challenged)
metricqueryenumnorequests / bytesSent, default requestsWhat items are ranked and plotted by; applies to site and node only, status and block_reason always count requests
statusClassqueryintegerno1–5With by: status only: keeps the codes that start with this digit (4 → 4xx)
limitqueryintegerno1–20, default 10Number of items returned

Response: breakdown object.

  • items holds only items with a total above 0, largest first; on equal totals sites and nodes are ordered by name, status codes and block reasons by code.
  • total and totalSeries cover everything the breakdown covers (only the class's codes with statusClass); subtracting items gives the remainder.
ErrorStatusCondition
SITE_NOT_FOUND404The siteId site does not exist

analytics.topSites

GET /analytics/top-sites · read

ParameterInTypeRequiredConstraints and defaultDescription
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hTime range
limitqueryintegerno1–50, default 5Number of sites returned

Response: array<top item>: sites with statistics in the range, most requests first, then by name; parentId and parentName are the site's cluster.

analytics.topNodes

GET /analytics/top-nodes · read

ParameterInTypeRequiredConstraints and defaultDescription
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hTime range
limitqueryintegerno1–50, default 5Number of nodes returned

Response: array<top item>: nodes (of every cluster) with statistics in the range, most requests first, then by name; parentId and parentName are the node's cluster.

analytics.topRequests

GET /analytics/top-requests · read

ParameterInTypeRequiredConstraints and defaultDescription
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hTime range
siteIdqueryuuidno—Only this site; omitted: every site
byqueryenumyesurl / ipRank URLs or client IPs
limitqueryintegerno1–50, default 10Number of items returned

limit is validated without converting strings to numbers: a limit in the query string returns 400 BAD_REQUEST. Omit it to get the default 10.

Response: { approximate: true, items: [{ value, requests }] }. value is a URL or client IP, requests the sum of the heavy hitters nodes pre-aggregate per minute; approximate is always true. items are ordered by requests, most first, then by value.

ErrorStatusCondition
SITE_NOT_FOUND404The siteId site does not exist

analytics.dimensions

GET /analytics/dimensions · read

ParameterInTypeRequiredConstraints and defaultDescription
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hTime range
siteIdqueryuuidno—Only this site; omitted: every site

Response: statistics dimensions object. Nodes count the dimensions with node feature stats-dims-v1; they serve statistics only and do not affect publishing.

ErrorStatusCondition
SITE_NOT_FOUND404The siteId site does not exist

Access logs

ProcedureMethod and pathAccess
logs.settingsGET /sites/{siteId}/logs/settingsread
logs.configurePUT /sites/{siteId}/logs/settingswrite
logs.queryGET /sites/{siteId}/logsread
logs.exportGET /sites/{siteId}/logs/exportread

logs.settings

GET /sites/{siteId}/logs/settings · read

ParameterInTypeRequiredConstraints and defaultDescription
siteIdpathuuidyes—Site ID

Response: log settings object.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

logs.configure

PUT /sites/{siteId}/logs/settings · write

ParameterInTypeRequiredConstraints and defaultDescription
siteIdpathuuidyes—Site ID
sampleRatebodyintegerno0–10000, unchanged when omittedSample rate in basis points (10000 every request, 0 none)
logBlockedbodybooleannoUnchanged when omittedBlocked, challenged and authentication-refused requests always get a line
logQuerybodybooleannoUnchanged when omittedLines carry the query string
logHeadersbodyarray<string>noAt most 8; each, trimmed and lowercased, must be 1–64 characters of a-z, 0-9, - and not authorization, cookie or proxy-authorization; deduplicated; unchanged when omittedRequest header names lines carry; replaces the list
logPeerbodybooleannoUnchanged when omittedLines carry the connection's peer address when it differs from the client's

Response: { ok: true }.

  • Publishes a revision of the site's cluster (reason code site_updated); no new revision when the configuration content is unchanged.
  • Audit site.logs_configure; the metadata holds the changed fields (their new values), or { sampleRate } when nothing changed.
  • A configuration with a site whose sampleRate is above 0 requires node feature access-logs-v1; logBlocked, logQuery, logPeer turned on or a non-empty logHeaders require access-logs-v2.
ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

logs.query

GET /sites/{siteId}/logs · read

ParameterInTypeRequiredConstraints and defaultDescription
siteIdpathuuidyes—Site ID
fromquerydatetimeyesMust end in Z (UTC); offsets are refusedStart (inclusive)
toquerydatetimeyesMust end in Z (UTC); offsets are refusedEnd (exclusive)
statusqueryintegerno100–599Status code equals this
statusClassqueryenumno1xx / 2xx / 3xx / 4xx / 5xxStatus class; with status both must hold
ipquerystringno≤64 characters, default "" (no filter)Client IP equals this
cidrquerystringno≤64 characters; an IPv4 or IPv6 network (e.g. 10.0.0.0/8) or a single address; host bits are clearedClient IP within this network
pathquerystringno≤2048 characters, default "" (no filter)Path starts with this
requestIdquerystringno≤128 charactersRequest ID (X-Request-Id) equals this; omitted or empty: no filter
hostquerystringno≤253 characters after trimmingHost equals this, any case
methodquerystringno0–32 letters, _, -Method equals this, any case
cacheStatusqueryenumnoHIT / MISS / BYPASS / EXPIRED / STALE / UPDATING / REVALIDATEDCache status
blockReasonqueryenumnoOne of the block reasons, or anyBlock reason equals this; any matches every request with one
countryquerystringnoEmpty or 2 letters, any caseClient country or region (ISO 3166-1 alpha-2)
asnqueryintegerno1–4294967295AS number of the client's network
uaquerystringno≤256 charactersUser-Agent contains this, any case
refererquerystringno≤256 charactersReferer contains this, any case
minDurationqueryintegerno0–86400000Duration at least this many milliseconds
limitqueryintegerno1–1000, default 100Number of entries returned

Response: { entries: [log entry](#log-entry-object)[], truncated }. entries are newest first (equal times by id, descending); truncated is true when more than limit entries match.

  • Every given filter must hold; omitted filters do not filter.
  • A from before the start of retention (00:00 UTC today minus retentionDays - 1 days) counts as that start; a to later than now plus 5 minutes counts as now plus 5 minutes; when from is then not before to the list is empty.
ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

logs.export

GET /sites/{siteId}/logs/export · read

Parameters: as logs.query.

Response: { csv, truncated }. csv is the CSV text of the same result as logs.query; truncated as in logs.query.

  • The first line holds the column names; lines are separated by CRLF. Columns in order: time, clientIp, method, host, path, status, bytesSent, durationMs, cacheStatus, sampleRate, nodeId, requestId, ja4, wafRuleIds, wafBlocked, ruleIds, userAgent, referer, httpVersion, scheme, country, asn, asName, upstreamAddr, upstreamStatus, upstreamMs, requestBytes, contentType, tlsVersion, blockReason, blockRuleId, query, headers, peerIp.
  • Every cell is in double quotes, an inner " written as ""; arrays are joined by spaces; headers is written as name: value joined by ; ; a cell that starts, after leading whitespace, with =, +, @ or - is prefixed with '.
ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

Usage

  • One usage record per site and UTC 5-minute window [windowStart, windowEnd); the values are the sum of the minute statistics every node reported for the window. Only windows that received statistics have a record. Records outlive their site.
  • Every minute the background worker recomputes closed windows with new statistics: when the values change, revision goes up by 1 and the record gets a new seq; when they do not, neither changes.
  • Records are kept retentionDays days (default 100, 35–400); the offline threshold of completeUntil is offlineThresholdMinutes (default 60, 5–1440). settings.usage / settings.setUsage read and change both; see System settings: Usage.

completeUntil (datetime or null; both procedures return the same value): windows that end at or before it hold the statistics of every node taken into account at the time; statistics for those windows that arrive later appear as a revision (revision + 1).

ItemRule
Node watermarkOnce every statistics batch is acknowledged, the node reports complete_until: the start of the minute in which its last successful drain began; every earlier minute has been uploaded. After the node dropped statistics because its local spool was full, the watermark stays at the first dropped minute for 24 hours. The console truncates the watermark to whole minutes, keeps it at most 1 minute ahead of the console clock, and never lowers it
Nodes taken into accountNodes with status active (enabled) and a heartbeat within the last offlineThresholdMinutes minutes; disabled or deleted nodes and nodes without a heartbeat for longer do not count
Value of a nodeIts watermark; a node that never reported one (older node versions) counts from its enrollment (its creation when there is none); a value earlier than "now − offlineThresholdMinutes" counts as that time, so a node holds completeUntil back by at most the threshold
ComputationThe minimum of the current time, the values of the nodes taken into account, and the start of the earliest window still waiting to be recomputed (the current window included), rounded down to 5 minutes
MonotonicSaved only when later than the saved value; completeUntil only moves forward
FrequencyComputed once a minute, after the worker recomputes windows
nullNot computed yet
ProcedureMethod and pathAccess
usage.listGET /usageread; service account usage:read
usage.changesGET /usage/changesread; service account usage:read

usage.list

GET /usage · read · service account usage:read

ParameterInTypeRequiredConstraints and defaultDescription
fromquerydatetimeyesA multiple of 5 minutes (Unix time)Start; includes the window starting at it
toquerydatetimeyesA multiple of 5 minutes, after fromEnd; excludes the window starting at it
siteIdqueryuuidno—Only this site's records; the ID of a deleted site works too
cursorquerystringno≤200 charactersnextCursor of the previous page
limitqueryintegerno1–5000, default 1000Page size

Response: { items: [usage record](#usage-record-object)[], nextCursor, completeUntil }.

  • items are ordered by (windowStart, siteId), ascending.
  • nextCursor: a string, or null (no next page). The cursor holds the window and site of the page's last record; the next page starts after it. Keep from, to and siteId while paging.
ErrorStatusCondition
USAGE_RANGE_INVALID400from or to is not a multiple of 5 minutes, or to is not after from
USAGE_CURSOR_INVALID400cursor cannot be parsed

usage.changes

GET /usage/changes · read · service account usage:read

ParameterInTypeRequiredConstraints and defaultDescription
afterSeqquerystringnoA non-negative decimal integer without leading zeros, ≤9223372036854775807, default "0"Returns records with a higher seq; "0" starts from the beginning
limitqueryintegerno1–5000, default 1000Number of records returned

Response: { items: [usage record](#usage-record-object)[], lastSeq, completeUntil }.

  • items are the records created or revised after afterSeq, by seq, ascending; a revised record appears again with its new seq.
  • lastSeq: the seq of the last record returned; afterSeq when none was. Pass it as the next afterSeq.
ErrorStatusCondition
USAGE_CURSOR_INVALID400afterSeq is above 9223372036854775807

Audit log

  • Management actions write the audit log in the change's transaction; the audit log is never pruned. Field meanings: Audit log.
  • Every action code and target type: Audit actions.
ProcedureMethod and pathAccess
auditLogs.listGET /audit-logsread
auditLogs.facetsGET /audit-logs/facetsread

auditLogs.list

GET /audit-logs · read

ParameterInTypeRequiredConstraints and defaultDescription
actionquerystringno≤100 characters after trimmingAction code equals this (e.g. site.create)
targetTypequerystringno≤100 characters after trimmingTarget type equals this (e.g. site)
fromquerydatetimeno—occurredAt at or after this time
toquerydatetimeno—occurredAt at or before this time
limitqueryintegerno1–200, default 50Page size
offsetqueryintegerno≥0, default 0Entries skipped

Response: { items: [audit entry](#audit-entry-object)[], total }. items are newest first (by id, descending); total is the number of entries the filters match.

  • Every given filter must hold; an empty action or targetType does not filter.
  • action and targetType are not checked against the known values; an unknown value returns an empty list.

auditLogs.facets

GET /audit-logs/facets · read

No parameters.

Response: { actions, targetTypes }, both array<string>: the action codes and target types present in the audit log, distinct, ascending; targetTypes leaves out the empty string. Older codes that are no longer in Audit actions are included.

Alert channels

  • At most 32 channels. Channel configurations (addresses, tokens, secrets) are encrypted with EDGEWEIR_MASTER_KEY; no procedure returns them.
  • A channel with platform true receives every alert, cluster and DNS alerts included; other channels receive only alerts their subscription covers. locale is the notification language.
  • email channels use the SMTP settings.
  • Behavior: Configure alert channels, SMS channels, SMTP and Delivery behavior.
ProcedureMethod and pathAccess
alerts.channelsGET /alerts/channelsread
alerts.createChannelPOST /alerts/channelswrite
alerts.updateChannelPUT /alerts/channels/{id}write
alerts.deleteChannelDELETE /alerts/channels/{id}write
alerts.testChannelPOST /alerts/channels/{id}/testwrite
alerts.smtpGET /alerts/smtpread
alerts.setSmtpPUT /alerts/smtpwrite

alerts.channels

GET /alerts/channels · read

No parameters.

Response: array<channel>, by name.

alerts.createChannel

POST /alerts/channels · write

ParameterInTypeRequiredConstraints and defaultDescription
namebodystringyes1–100 characters after trimmingName
enabledbodybooleannoDefault trueEnabled
platformbodybooleannoDefault falseReceives every alert
localebodyenumnozh-CN / en, default zh-CNNotification language
configbodyobjectyesSee Channel configurationChannel type (config.kind) and its configuration

Response: channel. Audit alert.channel_create (kind, platform).

ErrorStatusCondition
ALERT_CHANNEL_LIMIT40932 channels exist already

alerts.updateChannel

PUT /alerts/channels/{id} · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Channel ID
namebodystringno1–100 characters after trimming, unchanged when omittedName
enabledbodybooleannoUnchanged when omittedEnabled
platformbodybooleannoUnchanged when omittedReceives every alert
localebodyenumnozh-CN / en, unchanged when omittedNotification language
configbodyobjectnoSee Channel configuration, unchanged when omittedReplaces the configuration; may change the channel type

Response: channel.

  • With config, lastError is cleared and the channel's failed notifications (attempts used up) are queued again with their attempts reset.
  • Audit alert.channel_update (credentialsRotated: whether config was given; previousKind: the type before).
ErrorStatusCondition
ALERT_CHANNEL_NOT_FOUND404The channel does not exist

alerts.deleteChannel

DELETE /alerts/channels/{id} · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Channel ID

Response: { ok: true }. The channel's subscription is deleted with it. Audit alert.channel_delete.

ErrorStatusCondition
ALERT_CHANNEL_NOT_FOUND404The channel does not exist

alerts.testChannel

POST /alerts/channels/{id}/test · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Channel ID

Response: { ok: true }.

  • Sends a test notification now (object name Edgeweir, status firing), also through a disabled channel; on SMS channels the test counts towards the send limits.
  • Audit alert.channel_test_request before sending, alert.channel_test after a successful send.
ErrorStatusCondition
ALERT_CHANNEL_NOT_FOUND404The channel does not exist
ALERT_SMTP_NOT_CONFIGURED412An email channel, and SMTP is not set or has no password
ALERT_RATE_LIMITED429An SMS channel reached its hourly or daily send limit; data.retryAt is when the next send fits
ALERT_SMS_REJECTED502The SMS provider refused the message; data.code is the provider's error code
ALERT_SEND_FAILED502Any other send failure

alerts.smtp

GET /alerts/smtp · read

No parameters.

Response: SMTP settings, or null when not set.

alerts.setSmtp

PUT /alerts/smtp · write

ParameterInTypeRequiredConstraints and defaultDescription
hostbodystringyes1–253 characters after trimmingSMTP server
portbodyintegerno1–65535, default 465Port
securebodybooleannoDefault truetrue: TLS from the start; false: STARTTLS required
frombodystringyesAn e-mail addressSender
usernamebodystringyes1–320 charactersUser name
passwordbodystringno1–4096 charactersPassword; omitted: the saved password is kept
cabodystringno≤65536 characters after trimming, default ""PEM certificates only; they replace the system trust store for this server; empty: EDGEWEIR_SMTP_CA_FILE or the system trust store

Response: { ok: true }.

  • Replaces the settings: an omitted port, secure or ca takes its default.
  • password is required when none is saved, or when host, port, secure, username or ca differ from the saved ones.
  • Audit alert.smtp_update (host; credentialsRotated: whether password was given; customCa: whether ca is non-empty).
ErrorStatusCondition
SMTP_PASSWORD_REQUIRED400A password is required and password is missing
SMTP_CA_INVALID400ca is non-empty and holds anything but PEM certificates, or a certificate does not parse

Alert rules

Triggers and recovery of each alert kind: Set alert rules and Cluster and DNS alerts.

ProcedureMethod and pathAccess
alerts.policyGET /alerts/policyread
alerts.setPolicyPUT /alerts/policywrite

alerts.policy

GET /alerts/policy · read

No parameters.

Response: alert policy object.

alerts.setPolicy

PUT /alerts/policy · write

ParameterInTypeRequiredConstraints and defaultDescription
nodeOfflineSecondsbodyintegerno45–3600, default 90See the alert policy object
certificateHoursbodyintegerno1–720, default 72As above
errorRatiobodynumberno0.01–1, default 0.2As above
minimumRequestsbodyintegerno1–1000000, default 100As above
windowMinutesbodyintegerno1–60, default 5As above
clockSkewSecondsbodyintegerno5–3600, default 30As above

Response: alert policy object.

  • Replaces the policy: omitted fields take their defaults, not their previous values.
  • Audit alert.policy_update; the metadata holds every saved field.

Alert subscriptions

  • Subscriptions belong to the operator's account; a channel has at most one. Only the 8 subscribable alert kinds can be subscribed to.
  • Behavior: Subscribe to alerts.
ProcedureMethod and pathAccess
alerts.subscriptionsGET /alerts/subscriptionsread
alerts.subscribePOST /alerts/subscriptionswrite
alerts.updateSubscriptionPUT /alerts/subscriptions/{id}write
alerts.unsubscribeDELETE /alerts/subscriptions/{id}write

alerts.subscriptions

GET /alerts/subscriptions · read

No parameters.

Response: array<subscription>, by channel name.

alerts.subscribe

POST /alerts/subscriptions · write

ParameterInTypeRequiredConstraints and defaultDescription
channelIdbodyuuidyes—Channel ID
kindsbodyarray<enum>yes1–8 subscribable alert kinds, deduplicatedAlert kinds sent
allSitesbodybooleannoDefault falseEvery site, future ones included
siteIdsbodyarray<uuid>noAt most 1000, default []Sites covered
enabledbodybooleannoDefault trueEnabled

Exactly one of allSites true and a non-empty siteIds must hold; otherwise 400 BAD_REQUEST (siteIds).

Response: subscription.

  • Creates the channel's subscription, or replaces the kinds, sites and enabled of the one it has (the ID stays).
  • Audit alert.subscribe (channelId, kinds, allSites, siteIds, enabled).
ErrorStatusCondition
ALERT_CHANNEL_NOT_FOUND404The channel does not exist or is disabled
SITE_NOT_FOUND404A site in siteIds does not exist

alerts.updateSubscription

PUT /alerts/subscriptions/{id} · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Subscription ID
kindsbodyarray<enum>yes1–8 subscribable alert kinds, deduplicatedAlert kinds sent
allSitesbodybooleannoDefault falseEvery site, future ones included
siteIdsbodyarray<uuid>noAt most 1000, default []Sites covered
enabledbodybooleannoDefault trueEnabled

Exactly one of allSites true and a non-empty siteIds must hold; otherwise 400 BAD_REQUEST (siteIds).

Response: subscription.

  • Replaces the subscription: an omitted allSites, siteIds or enabled takes its default. The channel cannot change.
  • Audit alert.subscription_update (fields as for alert.subscribe).
ErrorStatusCondition
ALERT_SUBSCRIPTION_NOT_FOUND404The subscription does not exist
SITE_NOT_FOUND404A site in siteIds does not exist

alerts.unsubscribe

DELETE /alerts/subscriptions/{id} · write

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Subscription ID

Response: { ok: true }. Audit alert.unsubscribe.

ErrorStatusCondition
ALERT_SUBSCRIPTION_NOT_FOUND404The subscription does not exist

Alert events

  • A condition produces one event when it starts firing and one when it resolves; events are kept 90 days.
ProcedureMethod and pathAccess
alerts.eventsGET /alerts/eventsread

alerts.events

GET /alerts/events · read

ParameterInTypeRequiredConstraints and defaultDescription
siteIdqueryuuidno—Only this site's alerts, plus node_offline and node_clock_skew of the nodes in the site's cluster

Response: array<alert event>, newest first, at most 100. Without siteId: cluster and DNS alerts, node alerts and alerts of existing sites.

ErrorStatusCondition
SITE_NOT_FOUND404The siteId site does not exist

Objects

Revision object

FieldTypeDescription
clusterIduuidCluster ID
revisionintegerRevision number
contentHashstringHash of the configuration content
siteCountintegerSites in the revision
reasonstringPublish reason as English text
reasonCodestringReason code; empty for revisions published before reason codes existed
reasonParamsobjectReason parameters; values are strings or numbers
createdAtdatetimePublish time

Attention item object

FieldTypeDescription
kindenumThe item; values below
clusterIduuidCluster ID
clusterNamestringCluster name
revisioninteger or nullSee below; null when it does not apply
atdatetime or nullSee below; null when it does not apply
countintegerNumber of nodes; 0 when it does not apply
versionstringTarget version; empty when it does not apply

kind, in this order:

kindConditionFields
nodes_unhealthyEnabled nodes that connected before are offline, failed to apply their configuration, had their certificate refused, or report the data plane down after applying a configurationcount
dns_failedThe cluster's DNS binding is not off and its latest DNS revision failedrevision: DNS revision
dns_blockedMass removal protection blocked a DNS publication—
upgrade_failedThe cluster's newest node upgrade failed or has failed nodes, within the last 24 hoursversion
canary_rolled_backThe configuration canary rolled back within the last 24 hoursrevision: candidate revision; at: rollback time
canary_awaiting_promotionThe configuration canary awaits promotionrevision: candidate revision
canary_runningThe configuration canary is being observedrevision: candidate revision; at: end of the observation window (null before the window started)
nodes_laggingEnabled, online, healthy nodes behind their target revision, or needing an upgrade to run itcount
nodes_no_addressThe cluster's DNS binding is not off, and enabled online nodes have no public address DNS can usecount

How each item is determined: Needs attention.

Traffic counters

Every point and total of the traffic object has these fields (all integers), summed over every node and the selected sites:

FieldDescription
requestsRequests
bytesSentBytes sent
bytesReceivedBytes received
cacheHitsCache hits
cacheMissesCache misses
status2xx, status3xx, status4xx, status5xxResponses per status class

Traffic object

FieldTypeDescription
rangeenumThe requested range
bucketSecondsintegerWidth of one point, in seconds
fromdatetimeStart of the first bucket
todatetimeThe current time
pointsarray<object>One point per bucket, oldest first: time (datetime, start of the bucket) and the traffic counters; buckets without statistics are zero
totalsobjectThe traffic counters summed over the range, plus peakBytesPerSecond (number): bytes sent per second in the busiest bucket
previousobjectThe same totals for the same-length period right before from

Top item object

FieldTypeDescription
iduuidSite or node ID
namestringSite or node name
parentIdstringID of its cluster
parentNamestringName of its cluster
requestsintegerRequests
bytesSentintegerBytes sent
cacheHitsintegerCache hits
cacheMissesintegerCache misses

Breakdown object

FieldTypeDescription
rangeenumThe requested range
bucketSecondsintegerBucket width, in seconds
fromdatetimeStart of the first bucket
todatetimeThe current time
timesarray<datetime>Start of each bucket, oldest first
itemsarray<object>The leading items, largest first; fields below
totalintegerThe metric over everything the breakdown covers
totalSeriesarray<integer>The metric per bucket, aligned with times

Elements of items:

FieldTypeDescription
idstringSite or node ID, the status code (e.g. "404") or the block reason (e.g. "cc")
namestringSite or node name; the same as id for status codes and block reasons
parentIdstring or nullID of the site's or node's cluster; null for status codes and block reasons
parentNamestring or nullName of that cluster; null for status codes and block reasons
totalintegerThe item's metric over the range
seriesarray<integer>The item's value per bucket, aligned with times

Statistics dimensions object

FieldTypeDescription
countriesarray<object>{ country, requests, bytesSent }, most requests first, at most 250; country is ISO 3166-1 alpha-2, the empty string is unknown
asnsarray<object>{ asn, name, requests }: client networks, at most 50, approximate; name is empty when unknown
referersarray<object>{ host, requests }: referring hosts, at most 50, approximate
browsersarray<object>{ key, requests }: browsers
osesarray<object>{ key, requests }: operating systems
devicesarray<object>{ key, requests }: devices
httpVersionsarray<object>{ key, requests }: HTTP versions
tlsVersionsarray<object>{ key, requests }: TLS versions
blockReasonsarray<object>{ key, requests }: block reasons
challengesobject{ issued, passed, byKind }: challenges issued and passed; byKind holds, from challenge-v3 nodes, { kind, issued, passed, failed, escalated, fallback } per type (challenge type or provider)
unsupportedNodesintegerEnabled nodes without stats-dims-v1 (those of the site's cluster with siteId, otherwise every node); above 0 the dimensions are partial

Arrays hold only keys with more than 0 requests, most requests first, then by key. Values of key:

DimensionValues
browserschrome, edge, firefox, safari, opera, samsung, uc, qq, wechat, yandex, ie, crawler, tool, other
oseswindows, macos, ios, android, linux, chromeos, harmonyos, other
devicesdesktop, mobile, tablet, crawler, other
httpVersions1.0, 1.1, 2, 3, other
tlsVersions1.2, 1.3, none, other
blockReasonsip_banned, ip_blocked, rule, rate_limit, crs, cc, challenge, auth, referer, user_agent, region, cors, websocket_origin, client_cert, maintenance

What each block reason means: Block reasons.

Log settings object

FieldTypeDescription
sampleRateintegerSample rate in basis points (0–10000)
storageenumlite / clickhouse: the storage in use
retentionDaysintegerDays the storage in use keeps logs
logBlockedbooleanBlocked, challenged and authentication-refused requests always get a line
logQuerybooleanLines carry the query string
logHeadersarray<string>Request header names lines carry (lowercase)
logPeerbooleanLines carry the connection's peer address when it differs from the client's

Log entry object

FieldTypeDescription
idstringLog ID: <node ID>/<batch sequence>/<index in the batch>
timedatetimeRequest time
nodeIdstringNode ID
siteIdstringSite ID
clientIpstringClient IP
methodstringMethod
hoststringHost (≤253 characters)
pathstringPath without query string and fragment (≤2048 characters)
statusintegerStatus code
bytesSentintegerBytes sent
durationMsintegerDuration in milliseconds
cacheStatusstringHIT, MISS, BYPASS, EXPIRED, STALE, UPDATING, REVALIDATED or empty
sampleRateintegerSample rate the line was written with (basis points, 1–10000)
ja4stringJA4 TLS client fingerprint; empty unless the site records it
wafRuleIdsarray<integer>OWASP CRS rules the request matched, ascending, at most 16
wafBlockedbooleanCRS blocked the request
requestIdstringThe request ID the node answered with (X-Request-Id); empty for older nodes
ruleIdsarray<string>Log rules that wrote this line whatever the sample rate, at most 8
userAgentstringUser-Agent (≤512 characters)
refererstringReferer without query string and fragment (≤1024 characters)
httpVersionstring1.0, 1.1, 2, 3 or empty
schemestringhttp, https or empty
countrystringClient country or region (ISO 3166-1 alpha-2); empty when unknown
asnintegerAS number of the client's network; 0 when unknown
asNamestringAS name
upstreamAddrstringThe origin address that answered; empty without the origin
upstreamStatusintegerThe origin's status; 0 without the origin
upstreamMsintegerTime to the origin in milliseconds; 0 without the origin
requestBytesintegerRequest bytes
contentTypestringResponse media type, lowercase, without parameters
tlsVersionstring1.2 or 1.3; empty on plain HTTP
blockReasonstringThe block reason; empty when not blocked
blockRuleIdstringID of the rule behind the block reason (a WAF, rate limit or access authentication rule); empty when none
querystringQuery string (without ?); recorded while the site has logQuery on
headersobjectRecorded request headers (lowercase name → value); recorded while the site sets logHeaders
peerIpstringThe connection's peer when it differs from clientIp; recorded while the site has logPeer on

Usage record object

FieldTypeDescription
idstring<siteId>.<windowStart in Unix seconds>; fixed per site and window
siteIduuidSite ID; kept after the site is deleted
windowStartdatetimeWindow start (UTC, aligned to 5 minutes)
windowEnddatetimeWindow end (windowStart plus 5 minutes)
requestsstringRequests, as a decimal integer string (exact beyond 2^53)
bytesSentstringBytes sent, as a decimal integer string
bytesReceivedstringBytes received, as a decimal integer string
revisionintegerStarts at 1; goes up by 1 when a recomputation changes the values
seqstringDecimal integer string; increases across all records (with gaps), assigned on creation and revision
updatedAtdatetimeLast write

Audit entry object

FieldTypeDescription
idintegerEntry ID, increasing in write order
occurredAtdatetimeTime of the action
actorTypestringuser, api_key, service_account, node, probe or system
actorIdstringActor ID; empty for system
actorNamestringActor name recorded with the action; for older entries without one, the user's or node's current name, empty when not found
ipstringClient address of the request; empty for actions no request carried
userAgentstringUser-Agent of the request; empty for actions no request carried
actionstringAction code; see Audit actions
targetTypestringTarget type; see Audit actions; empty when there is no target
targetIdstringTarget ID
targetNamestringTarget name recorded with the action; for older entries without one, the current name of the user, node, site or cluster, empty when not found
metadataobjectParameters of the action and values before and after

Audit actions

Action codes (action) the console writes:

PrefixActions
accountaccount.passkey_add, account.passkey_delete, account.password_change, account.recover, account.two_factor_disable, account.two_factor_enable
acme_accountacme_account.delete
alertalert.channel_create, alert.channel_delete, alert.channel_test, alert.channel_test_request, alert.channel_update, alert.policy_update, alert.smtp_update, alert.subscribe, alert.subscription_update, alert.unsubscribe
api_keyapi_key.create, api_key.revoke, api_key.update
authauth.sign_in, auth.sign_in_failed
banban.create, ban.delete, ban.update
cachecache.prefetch, cache.purge
certificatecertificate.delete, certificate.issued, certificate.names_extended, certificate.renew, certificate.renewal_rescheduled, certificate.request, certificate.unloadable, certificate.upload
clustercluster.cache_update, cluster.challenge_keys_rotate, cluster.client_ip_update, cluster.connection_limits_update, cluster.create, cluster.delete, cluster.listen_ports_update, cluster.port_pools_update, cluster.rollback, cluster.rollout_abort, cluster.rollout_direct, cluster.rollout_policy_update, cluster.rollout_promote, cluster.rollout_rollback, cluster.session_ticket_keys_rotate, cluster.unknown_hosts_update, cluster.update
dnsdns.applied, dns.binding_update, dns.force_publish, dns.protection_update, dns.provider_create, dns.provider_delete, dns.provider_update, dns.rollback
dns_credentialdns_credential.create, dns_credential.delete, dns_credential.update
enrollment_tokenenrollment_token.create
greylistgreylist.create, greylist.delete, greylist.update
ip_listip_list.create, ip_list.delete, ip_list.update
l4l4.cname_update
l4_appl4_app.create, l4_app.delete, l4_app.disable, l4_app.enable, l4_app.update
nodenode.cache_update, node.certificate_renew, node.debug_logs_pull, node.delete, node.disable, node.enable, node.enroll, node.move, node.set_addresses, node.set_probe, node.update, node.upgrade_cancel, node.upgrade_create, node.upgrade_promote, node.upgrade_result
node_groupnode_group.create, node_group.delete, node_group.update
origin_caorigin_ca.create, origin_ca.retire, origin_ca.rotation_cancel, origin_ca.rotation_start
origin_certificateorigin_certificate.issue, origin_certificate.revoke
origin_client_caorigin_client_ca.activate, origin_client_ca.create, origin_client_ca.retire, origin_client_ca.rotation_cancel, origin_client_ca.rotation_start
origin_client_certificateorigin_client_certificate.rotate
platformplatform.rule_restore, platform.rules_update
probeprobe.certificate_renew, probe.delete, probe.enroll, probe.token_create, probe.update
regionregion.create, region.delete, region.update
schedulingscheduling.activate, scheduling.recover, scheduling.rule_create, scheduling.rule_delete, scheduling.rule_update
service_accountservice_account.create, service_account.delete, service_account.key_create, service_account.key_revoke, service_account.update
sitesite.access_control_update, site.auth_identity_forget, site.auth_sign_url, site.auth_update, site.auto_mitigation_apply, site.auto_mitigation_release, site.auto_mitigation_restore, site.auto_mitigation_update, site.bulk_redirects_update, site.clone, site.cname_update, site.create, site.delete, site.disable, site.enable, site.error_pages_update, site.https_update, site.image_convert_update, site.logs_configure, site.maintenance_update, site.protection_update, site.purge_all, site.rule_restore, site.rules_update, site.settings_copied, site.tags_update, site.update, site.usage_guard_apply, site.usage_guard_delete, site.usage_guard_release, site.usage_guard_restore, site.usage_guard_update, site.waf_update
site_tagsite_tag.delete, site_tag.rename
systemsystem.acme_directory_update, system.bans_update, system.cc_template_update, system.demo_update, system.error_pages_update, system.log_retention_update, system.login_allow_list_update, system.node_channel_update, system.node_log_retention_update, system.origin_allow_list_update, system.probes_update, system.protection_update, system.recompile, system.release_source_update, system.setup, system.setup_rejected, system.usage_update

Target types (targetType): acme_account, alert_channel, alert_subscription, api_key, ban, cache_task, certificate, certificate_authority, cluster, dns_credential, dns_provider, greylist, ip_list, l4_app, node, node_group, node_upgrade, origin_certificate, origin_client_certificate, platform, probe, region, scheduling_rule, service_account, site, site_tag, system, system_setting, user.

Older entries may carry codes that are not in these lists.

Channel object

FieldTypeDescription
iduuidChannel ID
namestringName
kindstringChannel type; see Channel configuration
enabledbooleanEnabled
platformbooleanReceives every alert
localeenumzh-CN / en: notification language
lastErrorstringWhy the last delivery failed: alert_send_failed, alert_smtp_not_configured, alert_rate_limited or alert_sms_rejected:<provider error code>; empty after a successful delivery or a new config

Channel configuration

config.kind determines the other fields:

kindFieldTypeRequiredConstraints and default
webhookurlstringyesAn http or https URL, ≤4096 characters, without user name, password or fragment
webhookbearerstringno≤4096 characters; sent as a Bearer token
emailtoarray<string>yes1–20 e-mail addresses
dingtalkurlstringyesAs webhook.url; the host must be oapi.dingtalk.com
dingtalksecretstringno≤4096 characters; signing secret
wecomurlstringyesAs webhook.url; the host must be qyapi.weixin.qq.com
telegramtokenstringyesBot token: <digits>:<20–200 letters, digits, _, ->
telegramchatIdstringyes1–24 digits with an optional -, or @ followed by 5–32 letters, digits or _ starting with a letter
aliyun_smsaccessKeyIdstringyes1–128 letters or digits
aliyun_smsaccessKeySecretstringyes1–256 characters
aliyun_smssignNamestringyes1–64 characters after trimming; SMS signature
aliyun_smstemplateCodestringyes1–64 letters, digits or _
aliyun_smsmaxParamLengthintegerno1–100, default 35; maximum characters per template variable
tencent_smssecretIdstringyes1–128 letters or digits
tencent_smssecretKeystringyes1–256 characters
tencent_smssdkAppIdstringyes1–20 digits
tencent_smsregionenumnoap-guangzhou / ap-beijing / ap-nanjing, default ap-guangzhou
tencent_smssignNamestringyes1–64 characters after trimming; SMS signature
tencent_smstemplateIdstringyes1–20 digits
tencent_smsmaxParamLengthintegerno1–100, default 6; maximum characters per template variable
aliyun_sms, tencent_smsphoneNumbersarray<string>yes1–20, each 5–15 digits with an optional + (E.164; mainland China numbers may omit +86)
aliyun_sms, tencent_smshourlyLimitintegerno1–100, default 10; sends per sliding hour at most (tests included)
aliyun_sms, tencent_smsdailyLimitintegerno1–1000, default 50; sends per sliding 24 hours at most (tests included)

Alert kinds

ValueNameConcernsSubscribable
node_offlineNode offlineNodeyes
node_clock_skewNode clock skewedNodeyes
certificate_expiringCertificate expiringSiteyes
origin_unavailableOrigin unavailableSiteyes
high_5xxHigh server error ratioSiteyes
cc_mitigationCC mitigation raisedSiteyes
usage_warningUsage near its limitSiteyes
usage_limitUsage limit reachedSiteyes
config_rollout_failedConfiguration canary rolled backClusterno
config_rollout_no_canaryNo canary node online; configuration published to every nodeClusterno
config_rule_invalidStored rule no longer valid; its last compiled form is keptRuleno
dns_mass_removal_blockedDNS mass removal blockedClusterno
scheduling_actionScheduling rule acting on a nodeScheduling rule and nodeno
certificate_unloadableA node cannot load a certificateCertificateno
dns_reconcile_failedDNS reconciliation failingClusterno

Kinds that cannot be subscribed to go only to channels with platform true. Usage alerts: Usage protection: Alerts.

Alert policy object

FieldTypeDescription
nodeOfflineSecondsintegernode_offline fires when an enabled node sends no heartbeat for this many seconds or reports the data plane down; nodes enrolled for less than this are not checked. Also how long origin health and clock skew reports stay valid
certificateHoursintegercertificate_expiring fires when a site's current certificate expires within this many hours
errorRationumberhigh_5xx fires when 5xx responses reach this share of requests in the window (a fraction: 0.2 is 20%)
minimumRequestsintegerhigh_5xx is checked only when the window has at least this many requests
windowMinutesintegerThe high_5xx window, in minutes
clockSkewSecondsintegernode_clock_skew fires when the clock skew a node reports (ahead or behind) reaches this many seconds

SMTP settings object

FieldTypeDescription
hoststringSMTP server
portintegerPort
securebooleantrue: TLS from the start; false: STARTTLS required
fromstringSender
usernamestringUser name
castringSaved PEM certificates; empty: EDGEWEIR_SMTP_CA_FILE or the system trust store
caFilebooleanEDGEWEIR_SMTP_CA_FILE is set

The password is never returned.

Subscription object

FieldTypeDescription
iduuidSubscription ID
channelIduuidChannel ID
channelNamestringChannel name
kindsarray<enum>Alert kinds sent
enabledbooleanEnabled; a disabled subscription sends nothing
allSitesbooleanEvery site, future ones included; sites is then []
sitesarray<object>Sites covered, { id, name }, by name; deleted sites drop out

Alert event object

FieldTypeDescription
iduuidEvent ID
siteIduuid or nullSite ID; null for node alerts and cluster and DNS alerts
kindenumAlert kind
statusenumfiring / resolved
occurredAtdatetimeTime of the event
siteNamestringSite name; for node alerts the node name, for cluster and DNS alerts the name of what the alert concerns (cluster, rule, certificate and so on)

L4 traffic and usage

GET /analytics/l4-traffic?range=24h&appId=<uuid> returns the same bucket shape as /analytics/traffic. range supports 1h, 6h, 24h, 7d, 30d; omit appId for all L4 applications. Optional from and to restrict counted resource ownership timestamps, within the selected range. Only RX/TX bytes contribute; HTTP request, cache and status counters remain zero. The last-hour series reads minute rows; wider ranges read retained five-minute usage records.

GET /usage and /usage/changes accept includeL4=true (default false). L4 records have resourceKind: "l4", siteId set to the app ID and an l4.-prefixed record ID. Site records keep their existing shape. The changes response advertises resourceKinds: ["site", "l4"]. Shared sequence/revision and watermark semantics apply; batch cursor and L4 usage updates are atomic, repeated batches are ignored, and records outlive app deletion. Migration backfills the minute rows still retained by the existing policy.

Edit on GitHub

On this page