Edgeweir
Reference

API: Sites

The 51 procedures of sites, tags, copies, cache tasks, HTTPS, error pages, access authentication and control, image conversion, usage protection and mitigation.

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

Sites

  • Writes publish a configuration revision of the site's cluster and write the audit entry in the same transaction: create site_created / site.create, update site_updated / site.update (metadata changed lists the parts changed), delete site_deleted / site.delete. When the compiled configuration equals the latest revision no revision is created and the response's revision is the latest one.
  • Writes require every stored rule of the site to compile (otherwise 400 RULE_INVALID). More than 512 enabled sites in a cluster: 409 CLUSTER_SITE_LIMIT.
  • A service account whose change needs a node capability an active node of the cluster lacks gets 409 NODE_CAPABILITY_REQUIRED (data.features, data.nodes) and nothing is saved; the operator's calls are saved.
  • Behaviour: Site management, Origins and cache and Domains.
ProcedureMethod and pathAccess
sites.listGET /sitesread; service account sites:read
sites.getGET /sites/{id}read; service account sites:read
sites.createPOST /siteswrite
sites.updatePATCH /sites/{id}write
sites.deleteDELETE /sites/{id}write
sites.launchGET /sites/{id}/launchread; service account sites:read
sites.originHealthGET /sites/{id}/origin-healthread
sites.originQualityGET /sites/{id}/origins/qualityread
sites.featuresGET /sites/{id}/featuresread
sites.setCnamePrefixPUT /sites/{id}/cname-prefixwrite
sites.starredGET /starred-sitesread
sites.setStarredPUT /sites/{id}/starredwrite

sites.list

GET /sites · read · service account sites:read

ParameterInTypeRequiredConstraints and defaultDescription
searchquerystringnoAt most 100 after trimmingMatches the site name, any domain or any tag name (substring, case-insensitive); a Unicode term also matches by Punycode and by the decoded name
clusterIdqueryuuidno—Only sites of this cluster; an unknown cluster gives an empty result
tagIdsqueryarray<uuid>noAt most 10; tagIds[]=a&tagIds[]=b, one value also as tagIds=aOnly sites with these tags
tagMatchqueryenumnoany / all, any when omittedany: any of the tags; all: every tag
pagequeryintegerno≥1, default 1Page
pageSizequeryintegerno1–100, default 20Items per page

Response: { items: [Site](#site-object)[], total }, oldest first; total counts every matching site.

sites.get

GET /sites/{id} · read · service account sites:read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Site.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

sites.create

POST /sites · write · 201

The body is a site input. A new site has no certificate and gets a random 8-character CNAME prefix.

Response: Site mutation result (without certificateReissue).

ErrorStatusCondition
NO_CLUSTER412clusterId omitted and no cluster exists yet
CLUSTER_NOT_FOUND404clusterId does not exist
DOMAIN_INVALID400A host name UTS #46 refuses, or more than 10 pattern domains; data.domain
DOMAIN_IN_USE409A domain belongs to another site; data.domains
SITE_PORT_UNAVAILABLE400A port is not 80, 443 or an extra listener port of the cluster; data.port
SITE_HTTPS_PORT_NEEDS_CERTIFICATE400ports.https has a port other than 443 (a new site has no certificate); data.port
SITE_PORTS_EMPTY400ports.http is empty
ORIGIN_HOST_HEADER_INVALID400An origin's hostHeader is not a host name or IP nodes accept; data.hostHeader
ORIGIN_ADDRESS_FORBIDDEN400An origin address is a special-purpose IP the platform does not allow, or localhost; data.address, data.range
ORIGIN_PROXY_PROTOCOL_S3400An S3 origin has proxyProtocolVersion other than 0
S3_SECRET_REQUIRED400An S3 origin lacks secretAccessKey; data.accessKeyId
ORIGIN_GRPC_REQUIRES_HTTP2400originSettings.grpc is true and protocol is not http2
ORIGIN_TLS_TRUST_REQUIRES_VERIFY400tlsTrust is originCa and tlsVerify is false
ORIGIN_CA_S3400tlsTrust is originCa and an origin is S3
ORIGIN_CA_NOT_FOUND409tlsTrust is originCa and the Origin CA has not been created
ORIGIN_CLIENT_CA_NOT_FOUND409originSettings.clientCertificate is true and the origin client CA has not been created
PURGE_KEY_REQUIRED400The PURGE method is enabled without a key
CACHE_RULE_PRIORITY_DUPLICATE400Two cache rules share a priority; data.priority
RULE_INVALID400A cache rule's condition does not compile
CLUSTER_SITE_LIMIT409More than 512 enabled sites in the cluster; data.limit

sites.update

PATCH /sites/{id} · write

Changes only the fields present in the request; field details in site input.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
namebodystringno1–100 after trimming; unchanged when omittedName
domainsbodyarray<string>noAs in site input; unchanged when omittedReplaces the domains. Domains the HTTPS redirect leaves alone that the site no longer has are dropped
originsbodyarray<Origin input>noAs in site input; unchanged when omittedReplaces the origins. An origin with the same scheme, address and port keeps its ID
cacheRulesbodyarray<Cache rule input>noAt most 64; unchanged when omittedReplaces the cache rules; an unchanged rule keeps its ID
originSettingsbodyOrigin pool settingsnoUnchanged when omittedReplaced as a whole: omitted fields take their defaults, except activeHealthCheck, sessionAffinity, protocol, grpc, tries, statusRetry, tlsTrust and clientCertificate, which stay as they are
cacheSettingsbodyCache settingsnoUnchanged when omittedReplaced as a whole: omitted fields take their defaults, except keepCacheTag, xCache and purgeMethod, which stay as they are
contentSettingsbodyContent settingsnoUnchanged when omittedReplaced as a whole: omitted fields take their defaults, except rulesBodyLimit, which stays as it is
portsbodyobjectnoAs in site input; unchanged when omittedReplaces the listener ports; the HTTPS redirect's redirectPort must be 443 or one of the HTTPS ports

When domains changes and the site's first certificate is an auto-renewing ACME certificate, the certificate takes the new domains and is reissued at once, and the response carries certificateReissue; any other certificate must cover every domain.

Response: Site mutation result.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
DOMAIN_INVALID400As for sites.create
DOMAIN_IN_USE409As for sites.create
CERTIFICATE_DOMAIN_MISMATCH400The site's certificate does not cover a new domain and cannot be extended; data.domains
CERTIFICATE_BUSY409A certificate request for the site is already running
SITE_PORT_UNAVAILABLE400As for sites.create
SITE_HTTPS_PORT_NEEDS_CERTIFICATE400The site has no certificate and ports.https has a port other than 443; data.port
SITE_PORTS_EMPTY400The site would be served on no port
HTTPS_REDIRECT_PORT_INVALID400The HTTPS redirect port is not in the new ports.https; data.port
ORIGIN_HOST_HEADER_INVALID, ORIGIN_ADDRESS_FORBIDDEN, ORIGIN_PROXY_PROTOCOL_S3, S3_SECRET_REQUIRED400As for sites.create
ORIGIN_GRPC_REQUIRES_HTTP2400The resulting grpc is true and protocol is not http2
ORIGIN_TLS_TRUST_REQUIRES_VERIFY, ORIGIN_CA_S3400As for sites.create, checked on the resulting settings and origins
ORIGIN_CA_NOT_FOUND, ORIGIN_CLIENT_CA_NOT_FOUND409As for sites.create
PURGE_KEY_REQUIRED400The PURGE method is enabled with neither a stored key nor a key
CACHE_RULE_PRIORITY_DUPLICATE400As for sites.create
RULE_INVALID400A cache rule's condition does not compile, or the new origins drop an origin group a rule uses

sites.delete

DELETE /sites/{id} · write

Deletes the site with its settings; the usage of windows not computed yet is computed first; alert subscriptions left without any site are deleted.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: { revision: [Revision](#revision-object) }.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

sites.launch

GET /sites/{id}/launch · read · service account sites:read

Looks up every domain of the site now (in parallel, up to a few seconds) and reports certificate coverage and delivery. Behaviour: Launch check.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Launch check.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

sites.originHealth

GET /sites/{id}/origin-health · read

Health of the site's origins as the nodes report it (passive and active checks).

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Origin health[].

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

sites.originQuality

GET /sites/{id}/origins/quality · read

Fetches from each origin over a range, with failures and time to the response header (node capability origin-stats-v1). Behaviour: Origin quality.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hRange

Response: Origin quality.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

sites.features

GET /sites/{id}/features · read

Whether each feature can be turned on for the site now: available when every active node of its cluster reports the node capability.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Site features.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

sites.setCnamePrefix

PUT /sites/{id}/cname-prefix · write

Sets the first label of the site's CNAME target <prefix>.<cluster domain>; without prefix, a new random one. The replaced prefix keeps resolving for 24 hours (unless the automatic DNS never published it). Publishes the cluster's DNS revision (reason cname), no configuration revision; audits site.cname_update. Behaviour: CNAME prefixes.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
prefixbodystringnoAfter trimming and lowercasing 1–30 of [a-z0-9-], not starting or ending with -; or a UUIDThe new prefix. A UUID is accepted only as the site's own ID prefix from before CNAME prefixes while it still resolves: its current prefix (no change) or a replaced one still in its 24-hour transition (taking it back)

Response: { prefix, retired: [{ prefix, expiresAt }] }: the current prefix and the replaced ones still in transition (expiresAt is a datetime).

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
CNAME_PREFIX_INVALID400A UUID that is not a prefix of the site still resolving; data.prefix
CNAME_PREFIX_CONFLICT409The prefix is used by a site or layer-4 application (replaced prefixes in transition included), is all, all-<n> or a record name of a DNS binding, or the automatic DNS zone already holds a record at that name the cluster does not manage; data.prefix

sites.starred

GET /starred-sites · read

The sites the caller (the signed-in user or the AccessKey's user) starred.

No parameters.

Response: [{ id, name, domains }], most recently starred first; domains is array<string>.

sites.setStarred

PUT /sites/{id}/starred · write

Stars or un-stars the site for the caller; not audited, not published.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
starredbodybooleanyes—true stars, false un-stars

Response: { ok: true }.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

Enabling and disabling sites

  • A disabled site is not shipped to nodes; its DNS records stay. Purge and prefetch tasks for a disabled site return 409 SITE_DISABLED.
  • A change of state publishes a revision and writes the audit entry: for one site site_enabled / site_disabled, site.enable / site.disable.
  • Enabling a site while usage protection holds disable as its action lifts that action and pauses usage protection until the end of its period (see Usage protection).
  • Behaviour: Site enabling.
ProcedureMethod and pathAccess
sites.setEnabledPUT /sites/{id}/enabledwrite; service account sites:write
sites.batchSetEnabledPOST /sites/batch/enabledwrite

sites.setEnabled

PUT /sites/{id}/enabled · write · service account sites:write

When the site already has the requested state, returns the site and its cluster's latest revision without comparing expectedUpdatedAt, creating a revision or writing an audit entry.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
enabledbodybooleanyes—true enables, false disables
expectedUpdatedAtbodydatetimeno—The site's updatedAt the caller read

Response: Site mutation result (without certificateReissue); site.enabled is the current state.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
UPDATED_AT_MISMATCH409expectedUpdatedAt differs from the site's current updatedAt; data.updatedAt
CLUSTER_SITE_LIMIT409Enabling would leave more than 512 enabled sites in the cluster; data.limit
NODE_CAPABILITY_REQUIRED409A service account calls and the configuration needs a capability an active node of the cluster lacks; data.features, data.nodes

sites.batchSetEnabled

POST /sites/batch/enabled · write

Enables or disables several sites in one transaction. Sites already in the state stay as they are and are not audited; every other site gets an audit entry (metadata batch: the number of sites requested), and each cluster is published once (reason sites_enabled / sites_disabled with count; site_enabled / site_disabled when one site of the cluster changed).

ParameterInTypeRequiredConstraints and defaultDescription
idsbodyarray<uuid>yes1–100, repeats droppedSite IDs
enabledbodybooleanyes—Target state

Response: Batch result.

ErrorStatusCondition
SITE_NOT_FOUND404A site does not exist; nothing changes
CLUSTER_SITE_LIMIT409Enabling would leave more than 512 enabled sites in a cluster; data.limit

Site tags and batch operations

  • Tags are the console's own: nothing is published. A tag name is 1–32 characters after trimming and NFC normalization (at most 256 as sent), without control characters; names compare case-insensitively, a name matching an existing tag keeps that tag's spelling, a new name creates a tag. A site carries at most 10 tags.
  • A change of a site's tags is audited as site.tags_update (metadata added, removed, tags); renaming as site_tag.rename, deleting as site_tag.delete.
  • Batch operations change all sites or none. Behaviour: Tags and Batch actions; purging several sites is cacheTasks.create with type site.
ProcedureMethod and pathAccess
sites.setTagsPUT /sites/{id}/tagswrite
siteTags.listGET /site-tagsread
siteTags.renamePATCH /site-tags/{id}write
siteTags.deleteDELETE /site-tags/{id}write
sites.batchTagsPOST /sites/batch/tagswrite
sites.batchDeletePOST /sites/batch/deletewrite

sites.setTags

PUT /sites/{id}/tags · write

Replaces the site's tags.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
tagsbodyarray<string>yesAt most 10; case-insensitive repeats droppedTag names

Response: { tags: [{ id, name }] }.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

siteTags.list

GET /site-tags · read

No parameters.

Response: [{ id, name, sites }] by name (case-insensitive), tags without sites included; sites is the number of sites with the tag.

siteTags.rename

PATCH /site-tags/{id} · write

Renames the tag on every site. A name another tag has (any case) merges the two: the sites with this tag get that tag, which takes the name as given, and this one is deleted.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Tag ID
namebodystringyesTag name rulesNew name

Response: { id, name, sites }; after a merge, the merged tag.

ErrorStatusCondition
SITE_TAG_NOT_FOUND404The tag does not exist

siteTags.delete

DELETE /site-tags/{id} · write

Takes the tag off every site and deletes it; audit metadata sites is the number of sites affected.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Tag ID

Response: { ok: true }.

ErrorStatusCondition
SITE_TAG_NOT_FOUND404The tag does not exist

sites.batchTags

POST /sites/batch/tags · write

Adds and removes tags on several sites.

ParameterInTypeRequiredConstraints and defaultDescription
idsbodyarray<uuid>yes1–100, repeats droppedSite IDs
addbodyarray<string>noAt most 10, default []Tag names to add
removebodyarray<string>noAt most 10, default []Tag names to remove

At least one of add and remove is non-empty; a name (any case) cannot be in both.

Response: Batch result; changed lists the sites whose tags changed, revisions is [].

ErrorStatusCondition
SITE_NOT_FOUND404A site does not exist
SITE_TAG_LIMIT400A site would carry more than 10 tags; data.site, data.limit

sites.batchDelete

POST /sites/batch/delete · write

Deletes several sites as sites.delete does; each site is audited as site.delete (metadata batch) and each cluster is published once (reason sites_deleted with count; site_deleted for a cluster with one site).

ParameterInTypeRequiredConstraints and defaultDescription
idsbodyarray<uuid>yes1–100, repeats droppedSite IDs

Response: Batch result.

ErrorStatusCondition
SITE_NOT_FOUND404A site does not exist

Copying settings and cloning

  • Values of parts: cacheRules, cacheKey (cache key and slicing), cacheTag, compression, https (the HTTPS options without the certificates and the domains the redirect leaves alone), rules (with rulesBodyLimit), bulkRedirects, errorPages, waf, protection (Under Attack, CC policy and challenge settings), accessControl, authRules (secrets sealed anew for the target), originSettings (origin pool settings without the origins), logs (sample rate, log options and JA4 logging), imageConvert, markdown (Markdown for Agents), aiCrawl (AI crawl control: crawler actions, the managed robots.txt, pay per crawl). A copied part replaces the target's part as a whole; a part equal to the target's is not written.
  • The change of a list part (cacheRules, rules, bulkRedirects, errorPages, authRules) is told as item counts before and after, of any other part as the number of settings that change.
  • A target that lacks what the settings name fails, for example: an origin group a rule chooses ORIGIN_GROUP_UNKNOWN, the HTTPS redirect / HSTS / client certificates copied to a target without a certificate HTTPS_REQUIRES_CERTIFICATE, a redirect port that is not an HTTPS port of the target HTTPS_REDIRECT_PORT_INVALID, client certificates together with HTTP/3 CLIENT_CERTIFICATE_HTTP3, a bulk redirect source host that is not a domain of the target BULK_REDIRECT_HOST_UNKNOWN, an access authentication scope domain that is not a domain of the target AUTH_DOMAIN_UNKNOWN, a missing IP list IP_LIST_NOT_FOUND.
  • Behaviour: Copying settings and Cloning a site.
ProcedureMethod and pathAccess
sites.copySettingsPreviewGET /sites/{id}/copy-settingsread
sites.copySettingsPOST /sites/{id}/copy-settingswrite
sites.clonePOST /sites/{id}/clonewrite

sites.copySettingsPreview

GET /sites/{id}/copy-settings · read

Runs the copy on each target and rolls it back: nothing is saved, published or audited.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Source site ID
targetIdsqueryarray<uuid>yes1–100, repeats dropped, not id; targetIds[]=a&targetIds[]=bTarget sites
partsqueryarray<enum>yes1–15, values above; parts[]=a&parts[]=bParts to copy

Response: Copy preview.

ErrorStatusCondition
SITE_NOT_FOUND404The source site does not exist (a missing target only gets error SITE_NOT_FOUND)

sites.copySettings

POST /sites/{id}/copy-settings · write

Copies parts of the source's settings to each target, one transaction per target: a failed target keeps its settings, the others are saved. Each target that succeeds publishes its cluster (reason site_settings_copied with site, source) and is audited as site.settings_copied (metadata source, parts, changed, revision).

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Source site ID
targetIdsbodyarray<uuid>yes1–100, repeats dropped, not idTarget sites
partsbodyarray<enum>yes1–15, values above, applied in the order listed thereParts to copy

Response: Copy result.

ErrorStatusCondition
SITE_NOT_FOUND404The source site does not exist (a missing target only fails itself)

sites.clone

POST /sites/{id}/clone · write · 201

Creates a site in the source's cluster with every copyable part of the source, its origins (S3 credentials sealed anew), PURGE method and key, content settings, maintenance mode and tags. Certificates stay behind; the settings that need one (HTTPS redirect, HSTS, client certificates, HTTPS ports other than 443) and the domains the redirect leaves alone are turned off or dropped. Publishes (reason site_cloned with site, source) and audits site.clone.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Source site ID
namebodystringno1–100 after trimming; the first 100 characters of the first domain when omittedName of the new site
domainsbodyarray<string>yesAs domains in site inputDomains of the new site
tagsbodyarray<string>noAt most 10; the source's tags when omittedTag names

Response: Site mutation result (without certificateReissue).

ErrorStatusCondition
SITE_NOT_FOUND404The source site does not exist
DOMAIN_INVALID400As for sites.create
DOMAIN_IN_USE409As for sites.create
ORIGIN_ADDRESS_FORBIDDEN400An origin address of the source is no longer allowed by the platform
AUTH_DOMAIN_UNKNOWN, BULK_REDIRECT_HOST_UNKNOWN, ORIGIN_GROUP_UNKNOWN400A copied setting names a domain or origin group the new site does not have
CLUSTER_SITE_LIMIT409More than 512 enabled sites in the cluster; data.limit

Cache tasks

  • Task types: url, prefix, site, host and tag purge, prefetch and sitemap prefetch. host and tag need node capability purge-tag-v1, sitemap and prefetching the mobile variant need prefetch-v2; when an active node of a cluster involved lacks it, every caller gets 409 NODE_CAPABILITY_REQUIRED.
  • A task goes to every node of the clusters involved; disabled nodes are recorded as skipped. Tasks publish no revision; they are audited as cache.purge or cache.prefetch.
  • Behaviour: Purge and prefetch.
ProcedureMethod and pathAccess
sites.purgeAllPOST /sites/{id}/purgewrite
cacheTasks.listGET /cache-tasksread
cacheTasks.getGET /cache-tasks/{id}read
cacheTasks.createPOST /cache-taskswrite

sites.purgeAll

POST /sites/{id}/purge · write

Purges the whole site: the same as cacheTasks.create with {"type":"site","siteIds":["<id>"]}, but with status 200.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Cache task.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
SITE_DISABLED409The site is disabled

cacheTasks.list

GET /cache-tasks · read

ParameterInTypeRequiredConstraints and defaultDescription
siteIdqueryuuidno—Only tasks involving this site
pagequeryintegerno≥1, default 1Page
pageSizequeryintegerno1–100, default 20Items per page

Response: { items: [Cache task](#cache-task-object)[], total }, newest first.

cacheTasks.get

GET /cache-tasks/{id} · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Task ID

Response: Cache task.

ErrorStatusCondition
CACHE_TASK_NOT_FOUND404The task does not exist

cacheTasks.create

POST /cache-tasks · write · 201

Purges find sites as the nodes route: in each cluster, among its enabled sites, by domain precedence; when several clusters serve a host, the task includes each cluster's site. Prefetch and sitemap tasks go to one cluster: that of the site that comes first by the same precedence among the sites of every cluster.

ParameterInTypeRequiredConstraints and defaultDescription
typebodyenumyesurl / prefix / site / prefetch / host / tag / sitemapTask type
urlsbodyarray<string>noAt most 500, each 1–2048 after trimming, default []; at least one for url, prefix, prefetch, exactly one for sitemapAbsolute http(s) URLs (no credentials; the host a host name). url, prefetch: URLs; prefix: URL prefixes (no query string); sitemap: the sitemap URL. The fragment is dropped
siteIdsbodyarray<uuid>noAt most 100, default []; at least one for site, tagsite: sites purged entirely; tag: sites purged by tag
hostsbodyarray<string>noAt most 500, each 1–253 after trimming, default []; at least one for hosthost: every URL of these host names is purged; no port or wildcard, lowercased, trailing dot dropped
tagsbodyarray<string>noAt most 500, each at most 1024, default []; at least one for tagtag: Cache-Tag values; after trimming and lowercasing ASCII letters 1–128 bytes of printable ASCII without commas
variantsbodyarray<enum>nodesktop / mobile, 1–2, default ["desktop"]prefetch, sitemap: device variants prefetched; mobile only differs for cache keys with the device type
maxUrlsbodyintegerno1–10000, default 1000sitemap: URLs prefetched at most (each in every variant)

Response: Cache task.

ErrorStatusCondition
SITE_NOT_FOUND404A site of siteIds does not exist
SITE_DISABLED409A site the task involves is disabled
CACHE_TASK_URL_INVALID400A URL is not an absolute http(s) URL, has credentials or a host that is not a host name, or a prefix has a query string; data.urls (first 5)
CACHE_TASK_HOST_INVALID400A host has a port or a wildcard, or is invalid; data.hosts
CACHE_TASK_TAG_INVALID400A tag breaks the rules; data.tags
CACHE_TASK_HOST_UNKNOWN400The host of a URL or of hosts belongs to no site; data.hosts
NODE_CAPABILITY_REQUIRED409An active node of a cluster involved lacks purge-tag-v1 or prefetch-v2; data.features, data.nodes

HTTPS

ProcedureMethod and pathAccess
https.getGET /sites/{id}/httpsread
https.updatePUT /sites/{id}/httpswrite
https.checkGET /sites/{id}/https/checkread

https.get

GET /sites/{id}/https · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: HTTPS settings.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

https.update

PUT /sites/{id}/https · write

Replaces the site's certificates, HTTPS and compression settings; omitted fields take their defaults. With certificateId null, redirectPort becomes 443, additionalCertificateIds is emptied and clientCertificate.mode becomes off.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
settingsbodyHTTPS settingsyes—New settings

Response: the saved HTTPS settings.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
CERTIFICATE_NOT_FOUND404A certificate does not exist
CERTIFICATE_UNAVAILABLE409A certificate is not issued yet or expired
CERTIFICATE_CHAIN_EXPLICIT_CURVE, CERTIFICATE_KEY_EXPLICIT_CURVE400Nodes cannot load the certificate (an EC key without a named curve)
CERTIFICATE_DOMAIN_MISMATCH400A domain of the site is covered by none of the certificates; data.domains
CLIENT_CERTIFICATE_HTTP3400Client certificates and http3 are both on
CLIENT_CA_INVALID400clientCertificate.caPem is not 1 to 10 current CA certificates
HTTPS_REDIRECT_PORT_INVALID400redirectPort is neither 443 nor an HTTPS port of the site; data.port
HTTPS_REDIRECT_DOMAIN_INVALID400redirectExcludedDomains has a domain the site does not have; data.domains
SITE_PORTS_EMPTY400Without the certificate the site would be served on no port

https.check

GET /sites/{id}/https/check · read

The certificate request one-click HTTPS would send and everything that stops it. Saves nothing.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
caqueryenumnoletsencrypt / zerossl / google / custom; defaultCa of certificates.settings when omittedThe CA whose CAA permission is checked

Response:

FieldTypeDescription
request.namestringCertificate name (the site name)
request.namesarray<string>Names requested: the site's domains, .a.com as *.a.com, pattern domains left out
request.emailstringE-mail of the last ACME account or request, else the operator's
request.challengeenumhttp01; dns01 when the site has a wildcard or suffix domain
request.dnsCredentialIduuidFor dns01, the first DNS credential whose zone covers every name, or null
blockersarray<object>Every blocker, each a code with parameters: nodes_offline (cluster: no online active node), nodes_lack_http01 (nodes: online nodes without http01-v1), dns_not_pointing (name, pointing: unresolved / elsewhere), dns_credential_missing (names), dns_credential_failed (credential, error: an API error code), caa_forbidden (name), no_certificate_names (the site has only pattern domains)
certificatesarray<object>Issued, unexpired certificates covering every domain of the site, { id, name }
ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

Error pages and maintenance mode

  • errorPages.update publishes the site's cluster (reason site_error_pages_updated) and audits site.error_pages_update; maintenance.update publishes (reason site_maintenance_updated) and audits site.maintenance_update. Audit entries keep statuses and template sizes, not the templates.
  • Node capabilities: template pages for 403, 429, 502, 503 and 504 need error-pages-v1; other statuses, 4xx / 5xx, redirect pages, responseStatus and maintenance mode need site-content-v1; templates with {{time}} or {{path}} need rules-v3.
  • The platform's pages (unknown hosts, disabled sites) are system settings (settings.errorPages, settings.setErrorPages). Behaviour: Error pages and Maintenance mode.
ProcedureMethod and pathAccess
errorPages.getGET /sites/{id}/error-pagesread
errorPages.updatePUT /sites/{id}/error-pageswrite
maintenance.getGET /sites/{id}/maintenanceread
maintenance.updatePUT /sites/{id}/maintenancewrite

errorPages.get

GET /sites/{id}/error-pages · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Error pages.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

errorPages.update

PUT /sites/{id}/error-pages · write

Replaces the site's error pages; a status without a page uses the nodes' built-in page.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
pagesbodyarray<object>yesAt most 13, at most one per statusPages
pages[].statusbodyinteger or enumyes400, 401, 403, 404, 405, 410, 429, 500, 502, 503, 504, or "4xx" / "5xx"Status; 4xx / 5xx serve the statuses of the class without a page of their own
pages[].templatebodystringnoDefault ""; at most 65536 bytes (UTF-8)HTML template; either this or redirectUrl
pages[].redirectUrlbodystringnoTrimmed, default ""; 1–2048 printable ASCII characters without spacesTarget of a 302: an absolute http(s) URL without credentials, or a path starting with a single /; the only placeholders are {{status}} and {{request_id}} (not in the host or port), every % starts an escape of two hex digits
pages[].responseStatusbodyintegerno0 or 200–599, default 0Status a template page is sent with, 0 keeps the response's; must be 0 for a redirect page
interceptOriginErrorsbodybooleannoDefault falseAlso replace origin responses whose status has a page
expectedUpdatedAtbodydatetimeno—The updatedAt the caller read

Response: Error pages.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
ERROR_PAGE_TOO_LARGE400A template is over 65536 bytes; data.status, data.limit
UPDATED_AT_MISMATCH409expectedUpdatedAt differs; data.updatedAt

maintenance.get

GET /sites/{id}/maintenance · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Maintenance.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

maintenance.update

PUT /sites/{id}/maintenance · write

Replaces the maintenance settings; they are kept while off. While on, nodes answer the site's requests with 503 (except requests from allowedCidrs, to paths under allowedPathPrefixes and HTTP-01 requests for the origin) and serve nothing from the cache. Turning maintenance off while usage protection holds maintenance as its action lifts that action and pauses usage protection until the end of its period.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
enabledbodybooleanyes—Maintenance mode on
templatebodystringnoDefault ""; at most 65536 bytes (UTF-8)Page template with the error page placeholders; empty uses the nodes' built-in maintenance page
retryAfterSecondsbodyintegerno0–86400, default 0Retry-After in seconds, 0 sends none
allowedCidrsbodyarray<string>noAt most 64, each at most 64 after trimming, default []Addresses or CIDRs let through; host bits cleared, IPv4-mapped addresses stored as IPv4, mapped prefixes shorter than /96 refused; repeats dropped
allowedPathPrefixesbodyarray<string>noAt most 32, default []; start with /, no whitespace, ?, # or control characters, at most 1024 bytes (UTF-8)Path prefixes let through; repeats dropped
expectedUpdatedAtbodydatetimeno—The updatedAt the caller read

Response: Maintenance.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
ERROR_PAGE_TOO_LARGE400The template is over 65536 bytes; data.status 503, data.limit
UPDATED_AT_MISMATCH409expectedUpdatedAt differs; data.updatedAt

Access authentication

  • Rules match in array order: a request is checked by the first enabled rule whose scope it matches, before the rule phases and the cache lookup. Basic password hashes and URL signing keys are write-only; responses tell only whether they are set.
  • authRules.update and authRules.forgetIdentityHeaders publish the site's cluster (reason site_auth_updated) and audit site.auth_update, site.auth_identity_forget; authRules.signUrl audits site.auth_sign_url (rule, path and expiry, never the signature). Audit entries carry no secret.
  • With an enabled rule the configuration needs node capability access-auth-v1. Behaviour: Access control.
ProcedureMethod and pathAccess
authRules.getGET /sites/{id}/auth-rulesread
authRules.updatePUT /sites/{id}/auth-ruleswrite
authRules.forgetIdentityHeadersPOST /sites/{id}/auth-rules/forget-identity-headerswrite
authRules.signUrlPOST /sites/{id}/auth-rules/{ruleId}/signwrite
authRules.failuresGET /sites/{id}/auth-rules/failuresread

authRules.get

GET /sites/{id}/auth-rules · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Access authentication.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

authRules.update

PUT /sites/{id}/auth-rules · write

Replaces the site's rules. A rule with an id keeps the stored passwords and keys the input leaves out; a rule whose secret changes gets a new secret version.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
rulesbodyarray<Access authentication rule input>yesAt most 16Rules, matched in order
expectedUpdatedAtbodydatetimeno—The updatedAt the caller read

Response: Access authentication.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
UPDATED_AT_MISMATCH409expectedUpdatedAt differs; data.updatedAt
AUTH_RULE_NOT_FOUND404A rule id is not the site's, or repeats
AUTH_DOMAIN_UNKNOWN400scope.domains has a domain the site does not have; data.domain
ORIGIN_ADDRESS_FORBIDDEN400The host of a forward authentication service is a special-purpose address the platform does not allow; data.address, data.range
AUTH_PASSWORD_REQUIRED400A new Basic user without password; data.user
AUTH_KEY_REQUIRED400A URL rule without primaryKey and without a stored primary key

authRules.forgetIdentityHeaders

POST /sites/{id}/auth-rules/forget-identity-headers · write

Nodes stop removing these identity headers of former rules (names in formerIdentityHeaders; names a current rule, disabled ones included, sets are left alone). With no name to forget nothing is published or audited and the current state is returned.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
namesbodyarray<string>yes1–64; lowercased 1–64 token characters, not a protected header, not starting with x-edgeweir-Header names
expectedUpdatedAtbodydatetimeno—The updatedAt the caller read

Response: Access authentication.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
UPDATED_AT_MISMATCH409expectedUpdatedAt differs; data.updatedAt

authRules.signUrl

POST /sites/{id}/auth-rules/{ruleId}/sign · write · no Idempotency-Key

Signs with the primary key of a URL authentication rule; computed by the console, neither stored nor sent to nodes.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
ruleIdpathuuidyes—Rule ID
urlbodystringyes1–4096 after trimmingA path starting with a single /, or an http(s) URL whose host is a domain of the site (no credentials)
validitySecondsbodyintegerno1–31536000; the rule's validitySeconds by defaultValidity, at most the rule's

Response: { url, expiresAt }: the signed URL (with scheme and host when a full URL was given) and its expiry (datetime).

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
AUTH_RULE_NOT_FOUND404The rule is not the site's
AUTH_RULE_NOT_URL400The rule is not URL authentication (url_a–url_d)
AUTH_KEY_REQUIRED400The rule has no primary key
AUTH_SIGN_VALIDITY400validitySeconds is longer than the rule's validity; data.max
AUTH_SIGN_URL_INVALID400url is neither a path nor an http(s) URL of the site's domains

authRules.failures

GET /sites/{id}/auth-rules/failures · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hRange

Response: { requests, unsupportedNodes }: requests access authentication refused over the range (number), and the active nodes of the cluster that do not count them (integer, no access-auth-v1).

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

Access control

  • Site lists, hotlink protection, user agents, CORS, geo, WebSocket origins and idle timeout, security headers and encoded path exceptions. Each part keeps its settings while off; a site that never saved them reads as the defaults.
  • accessControl.update publishes the site's cluster (reason site_access_control_updated) and audits site.access_control_update (metadata parts and each part's switches and counts, never the lists themselves).
  • With a part on the configuration needs node capability access-control-v1; encodedPaths needs encoded-path-exemptions-v1. Behaviour: Access control.
ProcedureMethod and pathAccess
accessControl.getGET /sites/{id}/access-controlread
accessControl.updatePATCH /sites/{id}/access-controlwrite

accessControl.get

GET /sites/{id}/access-control · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Access control.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

accessControl.update

PATCH /sites/{id}/access-control · write

Replaces the parts present in the request, the others stay as they are; a part present is replaced as a whole, its omitted fields take their defaults.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
siteLists, hotlink, userAgents, cors, geo, websocket, securityHeaders, encodedPathsbodyobjectnoFields in Access control; unchanged when omittedThe parts
expectedUpdatedAtbodydatetimeno—The updatedAt the caller read

Response: Access control.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
UPDATED_AT_MISMATCH409expectedUpdatedAt differs; data.updatedAt
CORS_CREDENTIALS_WILDCARD400cors.allowCredentials is true and allowedOrigins has *
IP_LIST_NOT_FOUND404An IP list of siteLists does not exist
SITE_LIST_CONFLICT400A list is in both blockListIds and allowListIds; data.lists

Image format conversion

  • Nodes answer with AVIF, WebP or the original by the request's Accept and convert only JPEG and PNG responses a cache rule caches; when a conversion fails, is over a limit or would not be smaller, they send the original.
  • imageConvert.update publishes the site's cluster (reason site_updated; no new revision when the nodes' configuration does not change, e.g. while off) and audits site.image_convert_update (metadata changed, enabled). Settings that are on need node capability image-convert-v1.
  • Behaviour: Image format conversion.
ProcedureMethod and pathAccess
imageConvert.getGET /sites/{id}/image-convertread
imageConvert.updatePUT /sites/{id}/image-convertwrite
imageConvert.savingsGET /sites/{id}/image-convert/savingsread

imageConvert.get

GET /sites/{id}/image-convert · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: the settings, fields as in the body of imageConvert.update (without id); the defaults when never saved.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

imageConvert.update

PUT /sites/{id}/image-convert · write

Replaces the settings; every field is required and the conditions below are checked also while off. Takes no expectedUpdatedAt.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
enabledbodybooleanyesDefault value falseConversion on
webpbodybooleanyesDefault value true; at least one of webp, avif is trueOffer WebP
avifbodybooleanyesDefault value falseOffer AVIF
webpQualitybodyintegeryes1–100, default value 80WebP quality
avifQualitybodyintegeryes1–100, default value 50AVIF quality
jpegbodybooleanyesDefault value true; at least one of jpeg, png is trueConvert image/jpeg
pngbodybooleanyesDefault value trueConvert image/png
minSizebodyintegeryes0–67108864, default value 1024; at most maxSizeSmallest original converted, in bytes
maxSizebodyintegeryes1–67108864, default value 10485760Largest original converted, in bytes
maxPixelsbodyintegeryes1–50000000, default value 16000000Largest image converted, in pixels

"Default value" is what a site that never saved them returns.

Response: the saved settings (without id).

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

imageConvert.savings

GET /sites/{id}/image-convert/savings · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
rangequeryenumno1h / 6h / 24h / 7d / 30d, default 24hRange

Response: { bytesSaved, unsupportedNodes }: for each complete 200 response to a GET served as a variant (cache hits included) over the range, the original's length minus the variant's, summed (number); and the active nodes of the cluster that do not convert (integer, no image-convert-v1).

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

Usage protection

  • Limits on bytes sent, requests and bandwidth of a site, with an alert at the warning threshold and at 100%, and at 100% optionally maintenance mode or disabling the site. Evaluated every minute from the nodes' statistics; settings apply from the next evaluation (within a minute).
  • Audit: site.usage_guard_update (metadata from, to), site.usage_guard_delete, site.usage_guard_restore; lifting an action publishes a revision (reason usage_limit_released), and deleting the settings also audits site.usage_guard_release. When the system applies and lifts actions: usage_limit_reached / usage_limit_released, site.usage_guard_apply / site.usage_guard_release.
  • Behaviour: Usage protection.
ProcedureMethod and pathAccess
usageGuard.getGET /sites/{id}/usage-guardread
usageGuard.updatePUT /sites/{id}/usage-guardwrite
usageGuard.deleteDELETE /sites/{id}/usage-guardwrite
usageGuard.restorePOST /sites/{id}/usage-guard/restorewrite

usageGuard.get

GET /sites/{id}/usage-guard · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Usage protection.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

usageGuard.update

PUT /sites/{id}/usage-guard · write

Creates or replaces the settings and ends a pause a restore started (pausedUntil cleared).

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
Fields of Usage protection settingsbody——See that tableSettings
expectedUpdatedAtbodydatetimeno—The updatedAt the caller read

Response: Usage protection.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
UPDATED_AT_MISMATCH409expectedUpdatedAt differs; data.updatedAt

usageGuard.delete

DELETE /sites/{id}/usage-guard · write

Removes the settings, lifting the action they hold. Does nothing without settings.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Usage protection (settings null).

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

usageGuard.restore

POST /sites/{id}/usage-guard/restore · write

Lifts the action held and applies none until the end of the period (alerts continue).

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Usage protection; pausedUntil is the end of the period.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
USAGE_GUARD_NOT_HELD409No settings, or no action held

Automatic mitigation

  • When a node's CC level for the site reaches threshold, the system turns on the site's Under Attack (with the site's own challenge type) and publishes (reason auto_mitigation_started, audit site.auto_mitigation_apply); it stays on for durationMinutes after the level was last at the threshold and is then turned off (auto_mitigation_ended, site.auto_mitigation_release). Off until set up.
  • A change that cannot be published (e.g. NODE_CAPABILITY_REQUIRED) is rolled back, its error code kept in lastError and retried the next minute. protection.update changing underAttack counts as the operator's: turning it on takes over, turning it off ends the mitigation and pauses it.
  • Audit: site.auto_mitigation_update (metadata from, to), site.auto_mitigation_restore. Behaviour: Automatic mitigation.
ProcedureMethod and pathAccess
autoMitigation.getGET /sites/{id}/auto-mitigationread
autoMitigation.updatePUT /sites/{id}/auto-mitigationwrite
autoMitigation.restorePOST /sites/{id}/auto-mitigation/restorewrite

autoMitigation.get

GET /sites/{id}/auto-mitigation · read

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Automatic mitigation.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist

autoMitigation.update

PUT /sites/{id}/auto-mitigation · write

Creates or replaces the settings, applied from the next evaluation (within a minute), and clears paused and lastError. While Under Attack is held: disabling turns it off at once (publishes auto_mitigation_ended, audits site.auto_mitigation_release); a shorter durationMinutes moves the expiry to no later than now plus the new duration.

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID
enabledbodybooleannoDefault trueEnabled
thresholdbodyenumnocookie302 / js / pow / captcha, default powCC level that starts it
durationMinutesbodyintegerno5–1440, default 30Minutes it stays on after the level was last at the threshold
expectedUpdatedAtbodydatetimeno—The updatedAt the caller read

Response: Automatic mitigation.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
UPDATED_AT_MISMATCH409expectedUpdatedAt differs; data.updatedAt

autoMitigation.restore

POST /sites/{id}/auto-mitigation/restore · write

Ends it now: turns off the Under Attack the mitigation holds (only audits when it is already off) and starts nothing until the level is below the threshold again (paused true).

ParameterInTypeRequiredConstraints and defaultDescription
idpathuuidyes—Site ID

Response: Automatic mitigation.

ErrorStatusCondition
SITE_NOT_FOUND404The site does not exist
AUTO_MITIGATION_NOT_ACTIVE409The mitigation holds no Under Attack

Development mode

ProcedureEndpointDescription
developmentMode.getGET /sites/{id}/development-mode{ siteId, until, unsupportedNodes }: until is when it ends (null while off or once passed), unsupportedNodes counts the cluster's active nodes without development-mode-v1
developmentMode.setPUT /sites/{id}/development-mode{ "enabled": true } turns it on for three hours, false off now; unchanged, nothing is published or audited (turning it on while on does not extend it). A change publishes the site's cluster (to every node at once, no canary) and audits site.development_mode_on / site.development_mode_off (until). A disabled site cannot turn it on (409 SITE_DISABLED)

The worker checks for expired ones every minute, turns them off, publishes and audits site.development_mode_expire as the system; nodes resumed caching at the deadline already. Sites gain developmentModeUntil. Read-only AccessKeys can call GET only; service accounts cannot call these procedures (403 SERVICE_ACCOUNT_FORBIDDEN). Behavior: Development mode.

curl -fsS -X PUT -H "x-api-key: $EDGEWEIR_API_KEY" -H 'content-type: application/json' \
  -d '{"enabled":true}' https://cdn-admin.example.com/api/v1/sites/<site ID>/development-mode

Markdown for Agents

ProcedureEndpointNotes
markdown.getGET /sites/{id}/markdownThe site's Markdown conversion settings; the defaults (off, every path) until saved
markdown.updatePUT /sites/{id}/markdownReplaces the settings and publishes the site's cluster (hot update; changes while it is off leave the nodes' configuration as it is and create no revision). Prefixes are stored sorted and unique. Audit site.markdown_update (changed, enabled)
markdown.statsGET /sites/{id}/markdown/stats?range={ responses, unsupportedNodes }: over the range (1h, 6h, 24h by default, 7d, 30d), the complete 200 GET responses served as Markdown (cache hits included); unsupportedNodes counts the cluster's active nodes without markdown-v1

Fields of the settings (all required by update, plus id):

FieldTypeDefaultNotes
enabledbooleanfalse
includePrefixesstring array[]Path prefixes converted, empty for every path; ≤ 32, each ≤ 256 bytes, starting with /, visible ASCII only
excludePrefixesstring array[]Path prefixes never converted, winning over includePrefixes; same limits

Anything else (also while it is off) is 400. A read-only AccessKey calls the GETs only; service accounts cannot call these procedures (403 SERVICE_ACCOUNT_FORBIDDEN). sites.features adds markdown (feature markdown-v1); settings that are on require node feature markdown-v1, settings that are off leave the configuration as it is. Copying settings takes the part markdown, and clones copy it. Behaviour: Markdown for Agents.

curl -fsS -X PUT -H "x-api-key: $EDGEWEIR_API_KEY" -H 'content-type: application/json' \
  -d '{"enabled":true,"includePrefixes":["/docs/"],"excludePrefixes":["/docs/private/"]}' \
  https://cdn-admin.example.com/api/v1/sites/<site id>/markdown
curl -fsS -H "x-api-key: $EDGEWEIR_API_KEY" \
  "https://cdn-admin.example.com/api/v1/sites/<site id>/markdown/stats?range=7d"

Tiered Cache

ProcedureEndpointNotes
tieredCache.getGET /tiered-cacheThe console-wide setting { topology, port, upperNodeIds, upperNodeGroupIds }; off and 8444 by default
tieredCache.updatePUT /tiered-cacheReplaces the console-wide setting and publishes the clusters of the sites that follow it. topology: off, smart, generic, regional, custom; port 1–65535, not a listener port; upperNodeIds / upperNodeGroupIds at most 32 together, used by custom only. Audit system.tiered_cache_update
tieredCache.site.getGET /sites/{id}/tiered-cacheThe site's setting { topology, upperNodeIds, upperNodeGroupIds }; topology also takes inherit (the default: the console-wide one)
tieredCache.site.updatePUT /sites/{id}/tiered-cacheReplaces the site's setting and publishes its cluster. Audit site.tiered_cache_update (from, to)
tieredCache.site.selectionGET /sites/{id}/tiered-cache/selection{ topology, inherited, target, idleReason, chosenAt, nodes: [{ nodeId, nodeName, regionName, uppers: [{ nodeId, nodeName, reason, rttMs }] }], unsupportedNodes }: each active node of the cluster with its upper tiers (none: it fetches from the origin) and why (lowest_latency, fallback_region, region_upper, regional_tier, global_upper, custom); idleReason is no_latency, no_upper, single_node or no_custom when the topology is on but there are no upper tiers
tieredCache.site.statsGET /sites/{id}/tiered-cache/stats?range={ fetches, served, hitRatio, fallbacks }: over the range, fetches of lower tiers from upper tiers by the upper tier's cache status (origin: fallbacks), requests answered to lower tiers, the upper tiers' hit ratio (0–1, null without fetches) and the fallbacks

AI crawl control

  • Behavior: AI crawlers. Site settings need the node capability ai-crawlers-v1; the crawler catalogue alone needs none. Audit system.ai_crawl_update, site.ai_crawl_update.
ProcedureMethod and pathAccess
aiCrawl.catalogueGET /ai-crawlersread
aiCrawl.settingsGET /settings/ai-crawlread
aiCrawl.setSettingsPUT /settings/ai-crawlwrite
aiCrawl.getGET /sites/{id}/ai-crawlread
aiCrawl.updatePUT /sites/{id}/ai-crawlwrite
aiCrawl.overviewGET /sites/{id}/ai-crawl/overviewread

GET /api/v1/openapi.json has the request and response fields.

Objects

Site object

FieldTypeDescription
iduuidSite ID
namestringName
enabledbooleanEnabled; a disabled site is not shipped to nodes
usageGuardHeldenumThe action usage protection holds: maintenance / disable, or null
clusterIduuidCluster ID
clusterNamestringCluster name
domainsarray<string>Domains in ASCII (Punycode) form: a.com, *.a.com, .a.com, ~pattern
cnamePrefixstringFirst label of the CNAME target <prefix>.<cluster domain>
tagsarray<object>Tags { id, name }
originsarray<Origin>Origins in saved order
cacheRulesarray<Cache rule>Cache rules
originSettingsOrigin pool settingsEvery field
cacheSettingsCache settingsEvery field; purgeMethod is { enabled, keySet }, the key is never returned
contentSettingsContent settingsEvery field
cacheGenerationintegerCache generation in the nodes' configuration; whole-site purges do not change it
portsobjectListener ports { http: integer[], https: integer[] }; HTTPS ports serve only with a certificate
deliveryDeliveryWhether the site's configuration runs on the online nodes
createdAtdatetimeCreated
updatedAtdatetimeUpdated

Origin object

FieldTypeDescription
iduuidOrigin ID
addressstringHost name or IP
portintegerPort
schemeenumhttp / https
weightintegerWeight
backupbooleanBackup origin
hostHeaderstringHost sent to the origin; empty keeps the request's
snistringTLS server name of an HTTPS origin; empty derives it from the Host or address
s3object{ region, bucket, accessKeyId }, secrets never returned; null for other origins
groupstringOrigin group; empty is the default group
proxyProtocolVersionintegerPROXY protocol version sent, 0 for none

Cache rule object

FieldTypeDescription
iduuidRule ID
priorityintegerPriority, applied in ascending order
expressionstringRequest condition; true matches every request
pathPrefixes, paths, extensionsarray<string>The condition's structured form when it has one, else empty
statusCodesarray<integer>Response statuses; empty for any status the rule may cache
minSizeBytes, maxSizeBytesintegerResponse size bounds, 0 unbounded
actionenumcache / bypass
edgeTtlSecondsintegerEdge TTL
originCacheControlenumoverride / respect
staleWhileRevalidateSeconds, staleIfErrorSecondsintegerHow long stale content is used
cacheAuthorizedbooleanCache responses to requests with Authorization
browserTtlSecondsintegermax-age towards clients, 0 keeps the origin's
cacheSetCookiebooleanCache responses with Set-Cookie

Delivery object

FieldTypeDescription
stateenumdisabled; pending: no online node runs the site yet; partial: some online nodes run an older version or have an unhealthy data plane; live: every online node runs its latest version
totalNodesintegerOnline active nodes of the cluster
servingNodesintegerOf those, nodes whose applied configuration has the site (any version); for a disabled site, the nodes that still run it
currentNodesintegerOf those, nodes running the site's latest version with a healthy data plane
canaryobject{ endsAt, autoPromote } while the cluster's configuration canary holds the latest version back from the nodes outside the canary (when the window ends; whether every node then gets it without the operator), else null

Revision object

FieldTypeDescription
clusterIduuidCluster ID
revisionintegerRevision number
contentHashstringHash of the configuration
siteCountintegerSites in the configuration
reasonstringEnglish reason
reasonCodestringReason code; empty for revisions from before reason codes
reasonParamsobjectReason parameters, values string or number
createdAtdatetimeCreated

Site mutation result

FieldTypeDescription
siteSiteThe site after the write
revisionRevisionThe cluster's revision
certificateReissueobjectsites.update only: { id, name } when the site's ACME certificate is reissued for new domains

Site input

The body of sites.create.

FieldTypeRequiredConstraints and defaultDescription
namestringno1–100 after trimming; the first 100 characters of domains[0] when omittedName
clusterIduuidnoThe oldest cluster when omittedCluster
domainsarray<string>yes1–50, each at most 1024; at most 10 ~pattern; repeats droppeda.com, *.a.com (one label), .a.com (any depth, not a.com) or ~pattern (the whole lowercase host); Unicode hosts are stored as Punycode (UTS #46). Forms: Domain forms
originsarray<Origin input>yes1–32, at least one in the default group (group empty)Origins, saved in order
cacheRulesarray<Cache rule input>noAt most 64, default []Cache rules
originSettingsOrigin pool settingsnoOmitted fields take their defaultsOrigin pool settings
cacheSettingsCache settingsnoOmitted fields take their defaultsCache settings
portsobjectnoDefault { "http": [80], "https": [443] }Listener ports
ports.httparray<integer>yesAt most 17, 1–65535; deduplicated and sorted80 or extra HTTP ports of the cluster
ports.httpsarray<integer>yesAt most 17, 1–65535; deduplicated and sorted443 or extra HTTPS ports of the cluster; ports other than 443 need a certificate
contentSettingsContent settingsnoOmitted fields take their defaultsContent settings
tagsarray<string>noAt most 10, default []; tag name rules in Site tags and batch operationsTag names

Origin input

FieldTypeRequiredConstraints and defaultDescription
addressstringyes1–253 after trimming; a host name or IPv4 / IPv6 literal (no port, no brackets); the last label not numericOrigin address; special-purpose IPs and localhost need the platform allow list
portintegerno1–65535; 80 for http, 443 for https when omittedPort
schemeenumnohttp / https, default httpScheme
weightintegerno1–100, default 1Weight
backupbooleannoDefault falseBackup origin
hostHeaderstringnoAt most 259 after trimming, default ""Host sent to the origin: empty keeps the request's; a host name or IP with an optional port (IPv6 in brackets with a port)
snistringnoA host name of at most 253 after trimming and lowercasing, default ""TLS server name of an HTTPS origin; empty derives it from the Host or address
s3objectnoDefault nullS3-compatible object storage: requests are signed with AWS Signature V4
s3.regionstringyesLowercased, matches [a-z0-9][a-z0-9-]{0,63}Region
s3.bucketstringnoDefault ""; 3–63 of [a-z0-9.-], a letter or digit first and lastPath-style bucket; empty when the origin address names the bucket
s3.accessKeyIdstringyes1–128 after trimmingAccess key ID
s3.secretAccessKeystringno1–256Write-only; omitted keeps the stored secret of the same accessKeyId, required for a new accessKeyId
groupstringno0–32 of [a-z0-9_-], default ""Origin group; empty is the default group, only origin rules send traffic to the others
proxyProtocolVersionintegerno0–2, default 0; must be 0 for an S3 originPROXY protocol version sent at the start of every connection (node capability origin-proxy-protocol-v1)

Cache rule input

FieldTypeRequiredConstraints and defaultDescription
priorityintegerno0–10000, unique in the site; (index + 1) × 10 when omittedApplied in ascending order
expressionstringnoAt most 16384, default ""Request condition (phase cache, on the client's original request); empty: the three lists are the condition
pathPrefixesarray<string>noAt most 32, default []; start with /, at most 1024, no whitespacePath prefixes
pathsarray<string>noAt most 32, default []; same rulesExact paths
extensionsarray<string>noAt most 64, default []; lowercased, leading dot dropped, [a-z0-9]{1,16}Extensions
statusCodesarray<integer>noAt most 16, 100–599, default []Response statuses; empty for any status the rule may cache
minSizeBytesintegerno0–9007199254740991, default 0Smallest response in bytes, 0 unbounded
maxSizeBytesintegerno0–9007199254740991, default 0; when not 0, at least minSizeBytesLargest response in bytes, 0 unbounded
actionenumnocache / bypass, default cacheCache or bypass
edgeTtlSecondsintegerno0–31536000, default 3600Edge TTL
originCacheControlenumnooverride / respect, default respectoverride also caches private and no-store responses
staleWhileRevalidateSecondsintegerno0–2592000, default 0Stale content while revalidating
staleIfErrorSecondsintegerno0–2592000, default 0Stale content while the origin fails
cacheAuthorizedbooleannoDefault falseCache responses to requests with Authorization; off, such requests bypass the cache
browserTtlSecondsintegerno0–31536000, default 0Cache-Control: max-age towards clients, 0 keeps the origin's
cacheSetCookiebooleannoDefault falseCache responses with Set-Cookie (site-content-v1); only the response fetched from the origin carries the cookies

With an expression, the three lists are empty or equal to the expression's structured form (as sites.get returns it); an invalid expression is a validation error.

Origin pool settings

Omitted fields of a request take their defaults (sites.update has exceptions, see there); responses carry every field.

FieldTypeRequiredConstraints and defaultDescription
policyenumnoweighted_random / round_robin / consistent_hash, default weighted_randomLoad balancing
tlsVerifybooleannoDefault trueVerify certificates of HTTPS origins
tlsTrustenumnosystem / originCa, default systemTrust anchors: the node's trust store, or only the Origin CA (origin-ca-v1; needs tlsVerify, no S3 origin)
clientCertificatebooleannoDefault falsePresent the cluster's origin client certificate to HTTPS origins that request one (origin-mtls-v1; not to S3 origins)
maxFailsintegerno1–100, default 3Passive health check: consecutive failures that mark an origin down
recoverySecondsintegerno1–3600, default 30Passive health check: seconds before a down origin is tried again
connectTimeoutMsintegerno100–120000, default 10000Connect timeout
sendTimeoutMsintegerno100–3600000, default 60000Send timeout
readTimeoutMsintegerno100–3600000, default 60000Read timeout
keepalivebooleannoDefault trueReuse upstream connections
keepaliveIdleSecondsintegerno1–3600, default 60Idle connection lifetime
keepaliveMaxRequestsintegerno1–100000, default 1000Requests per connection at most
websocketbooleannoDefault trueProxy WebSocket upgrades
protocolenumnohttp1 / http2, default http1HTTP version towards the origins; http2 (origin-http2-v1) uses ALPN h2 to HTTPS origins and h2c to HTTP ones, never falling back to HTTP/1.1; WebSocket always uses HTTP/1.1
grpcbooleannoDefault false; needs protocol http2Proxy gRPC requests over HTTP/2 end to end (never cached, not inspected by the OWASP CRS)
activeHealthCheckobjectnoOmitted fields take their defaultsActive health check (active-health-v1), kept while off
activeHealthCheck.enabledbooleannoDefault falseOn
activeHealthCheck.typeenumnohttp / grpc, default httpgrpc (active-health-grpc-v1): grpc.health.v1.Health/Check, healthy when the answer is SERVING; path, method and the status range are not used
activeHealthCheck.grpcServicestringno0–255 printable ASCII without spaces, default ""Service asked about by the gRPC check; empty for the server's overall health
activeHealthCheck.pathstringno/ and then up to 1023 printable ASCII without spaces (a query allowed), default /Request path
activeHealthCheck.methodenumnoGET / HEAD, default GETRequest method
activeHealthCheck.expectedStatusMinintegerno100–599, default 200; at most expectedStatusMaxLowest healthy status (inclusive)
activeHealthCheck.expectedStatusMaxintegerno100–599, default 399Highest healthy status (inclusive)
activeHealthCheck.hoststringnoA host name, default ""Host of the probes; empty uses the origin's hostHeader, else its address
activeHealthCheck.intervalSecondsintegerno5–300, default 30Probe interval
activeHealthCheck.timeoutSecondsintegerno1–60, default 5; at most intervalSecondsProbe timeout
activeHealthCheck.healthyThresholdintegerno1–10, default 2Successes in a row that bring an origin back
activeHealthCheck.unhealthyThresholdintegerno1–10, default 3Failures in a row that mark an origin down
sessionAffinityobjectnoOmitted fields take their defaultsCookie-based session affinity (session-affinity-v1), kept while off
sessionAffinity.enabledbooleannoDefault falseOn
sessionAffinity.ttlSecondsintegerno60–604800, default 3600Seconds a client stays pinned to its origin
triesintegerno1–5, default 3Origins a request tries at most (site-content-v1 unless 3)
statusRetrybooleannoDefault trueRetry after 502, 503 and 504 answers (site-content-v1 when off)

Cache settings

Omitted fields of a request take their defaults (sites.update has exceptions, see there). In responses purgeMethod is { enabled, keySet }.

FieldTypeRequiredConstraints and defaultDescription
cacheKeyobjectnoOmitted fields take their defaultsCache key
cacheKey.queryenumnoall / ignore / include / exclude, default allQuery parameters: all, none, only queryParams, all but queryParams (exclude needs site-content-v1)
cacheKey.queryParamsarray<string>noAt most 32, default []; each 1–128 after trimming, without whitespace, &, =, #Parameters kept by include or dropped by exclude; under exclude a name may end in * for a prefix (a lone * may not)
cacheKey.sortQuerybooleannoDefault falseSort parameters
cacheKey.headersarray<string>noAt most 8, default []; lowercased 1–64 token characters, not cookie or hostRequest headers that vary the key
cacheKey.cookiesarray<string>noAt most 8, default []; 1–64 token charactersCookies that vary the key
cacheKey.deviceTypebooleannoDefault falseSeparate mobile and desktop user agents
cacheKey.includeHostbooleannoDefault trueInclude the Host; off, every domain of the site shares cached objects
rangeSlicebooleannoDefault falseFetch and cache large files in 1 MiB slices
keepCacheTagbooleannoDefault falseForward the origin's Cache-Tag header to clients; nodes index it either way
xCachebooleannoDefault trueSend X-Cache (site-content-v1 when off)
purgeMethodobjectnoDefault { "enabled": false }PURGE method (site-content-v1): PURGE <URL> with X-Purge-Key purges the URL
purgeMethod.enabledbooleannoDefault falseOn; needs a stored key or key
purgeMethod.keystringno16–256 printable ASCII without spacesWrite-only; omitted keeps the stored key

Content settings

FieldTypeRequiredConstraints and defaultDescription
charsetobjectnoOmitted fields take their defaultsCharset added to text/*, application/javascript, application/json and application/xml responses
charset.nameenumnooff / utf-8 / gbk / gb18030 / gb2312 / big5 / iso-8859-1 / shift_jis / euc-kr, default offCharset; off adds none
charset.forcebooleannoDefault falseAlso replace a charset the response names
charset.uppercasebooleannoDefault falseSend the name in upper case
requestBodyLimitintegerno0–10737418240, default 104857600Largest request body by Content-Length in bytes, 413 above it; 0 no limit
rulesBodyLimitintegerno1024–1048576, default 65536Largest request body the rules read (rules-body-v1); larger ones count as truncated

Content settings other than the defaults need node capability site-content-v1.

Launch check object

FieldTypeDescription
addressesarray<string>The cluster's edge addresses (values of A / AAAA records): the scheduling addresses configured for its online active nodes, else the public addresses they report
domainsarray<object>One entry per domain
domains[].namestringAs on the site
domains[].probestringThe name looked up: the domain, or edgeweir-check.<suffix> under a wildcard; empty when unchecked
domains[].pointingenumok: every address it resolves to is an active node's of the cluster; elsewhere: some address is not; unresolved: no A or AAAA record; unknown: the lookup failed or no node address is known; unchecked: a .a.com or ~pattern domain, which names no single host
certificate.stateenumnone: no certificate; covered: its chain covers every domain; uncovered: it does not cover uncovered; issuing: an ACME issuance is pending or running; failed: the last one failed or nodes cannot load the certificate; expired
certificate.iduuidCertificate ID, or null
certificate.namestringCertificate name
certificate.uncoveredarray<string>Domains the current chain does not cover (all before the first issuance); .a.com and pattern domains are not checked
certificate.errorstringCertificate error code of a failure
deliveryDeliveryDelivery

Origin health object

FieldTypeDescription
originIduuidOrigin ID
downNodesintegerOnline nodes where either check marks the origin down
onlineNodesintegerOnline nodes of the cluster
lastErrorstringThe node's text of the most recent failure across nodes
lastErrorCodestringIts stable code; empty when unknown
lastErrorParamsobjectThe code's parameters, string values
lastFailureAtdatetimeMost recent failure, or null
nodesarray<object>One entry per node and source; a node's active entry only exists while active checks run
nodes[].nodeId, nodes[].nodeNameuuid, stringNode
nodes[].sourceenumpassive (real traffic) / active (probes)
nodes[].healthybooleanHealthy
nodes[].consecutiveFailuresintegerFailures in a row
nodes[].lastError, nodes[].lastErrorCode, nodes[].lastErrorParams, nodes[].lastFailureAt—That node's and source's latest failure, as above
nodes[].downUntildatetimeEnd of a passive down period; always null for active entries
nodes[].reportedAtdatetimeReported

Origin quality object

FieldTypeDescription
rangeenumThe range asked for
bucketSecondsintegerSeconds per bucket
from, todatetimeBounds of the counts
timesarray<datetime>Start of each bucket, oldest first
itemsarray<object>The site's current origins in pool order; origins deleted since are left out
items[].originIduuidOrigin ID
items[].address, items[].port, items[].scheme, items[].group, items[].backup—The origin's address, port, scheme, group and backup flag
items[].requestsintegerAttempts sent to the origin (retries count again)
items[].failuresobjectFailed attempts by class { connect, timeout, tls, invalid, server }; server counts 5xx answers
items[].errorsintegerAll failures and 5xx answers
items[].errorRatenumbererrors / requests; 0 without attempts
items[].answeredintegerAttempts the origin answered (with a header time)
items[].meanMs, items[].p50Ms, items[].p95Ms, items[].p99MsnumberTime to the response header: mean and percentiles (interpolated in the buckets, approximate), milliseconds; null without answers
items[].seriesobjectPer bucket, aligned with times: { requests: integer[], errors: integer[], p95Ms: (number or null)[] }
unsupportedNodesintegerActive nodes of the cluster without origin-stats-v1; the counts are partial when not 0

Site features object

Each field is { available, reason }: available is a boolean; when an active node of the cluster lacks the capability, available is false and reason is nodes, else reason is null. With available false the operator can still turn the feature on through the API; nodes without the capability keep their configuration.

FieldNode capabilityFeature
brotli, zstdbrotli-v1, zstd-v1Brotli, Zstandard compression
crsmodsecurity-v1OWASP CRS
activeHealthCheckactive-health-v1Active health checks
sessionAffinitysession-affinity-v1 and challenge-v1Session affinity
originHttp2origin-http2-v1HTTP/2 and gRPC towards origins
originProxyProtocolorigin-proxy-protocol-v1PROXY protocol towards origins
activeHealthGrpcactive-health-grpc-v1gRPC active health checks
originMtlsorigin-mtls-v1Origin client certificates
originCaorigin-ca-v1 (and origin-ca-rotation-v1 during a CA rotation)Trusting only the Origin CA
errorPageserror-pages-v1Error pages
purgeByTagpurge-tag-v1Purges by host and Cache-Tag
prefetchVariantsprefetch-v2Prefetching the mobile variant and sitemaps
rulesV2rules-v2Rule engine extensions: functions and new fields, dynamic redirects and rewrites, origin, compression and other config actions, cache rule expressions outside the builder's shape, browser TTLs, bulk redirects and origin groups
rulesV3rules-v3Rule engine additions: new fields, functions and wildcard comparisons, header values and query parameters computed per request, redirect status 303, error page placeholders {{time}} and {{path}}
edgePortsedge-ports-v1Ports besides 80 and 443 and the HTTPS redirect's status, port and excluded domains
clientIpclient-ip-v1Rule field ip.peer
siteContentsite-content-v1Cache keys that drop parameters, caching responses with Set-Cookie, the PURGE method, hiding X-Cache, error pages for more statuses and redirects, maintenance, charsets, the gzip level and largest compressed response, request body limits and origin tries
domainsV2domains-v2.a.com and ~pattern domains
multiCertificatemulti-certificate-v1Several certificates
clientCertificateclient-cert-v1Client certificates and the tls.client.* fields
accessAuthaccess-auth-v1Access authentication
accessControlaccess-control-v1Access control
encodedPathsencoded-path-exemptions-v1Encoded path exceptions
wafV2waf-v2WAF actions ban, respond, close and skip, access log lines from log rules, rate limit bans, the config rules' CRS override, CRS exclusions by path or target
rulesBodyrules-body-v1Request body fields and form_value / json_value in rules
challengeV2challenge-v2Verified crawlers, challenge page texts and challenge failure bans
accessLogsV2access-logs-v2Access log options: always logging blocked requests, the query string, request headers and the peer address
imageConvertimage-convert-v1Image format conversion
challengeV3challenge-v3The managed challenge and third-party interactive challenges
markdownmarkdown-v1Markdown for Agents
aiCrawlai-crawlers-v1AI crawl control: crawler actions, the managed robots.txt and pay per crawl

Batch result

FieldTypeDescription
changedarray<object>Sites that changed { id, name }; sites already as asked are left out
revisionsarray<object>One entry per cluster published, { clusterId, revision, created }; created false: the configuration did not change and revision is the latest

Copy preview object

FieldTypeDescription
sourceobjectSource site { id, name }
targetsarray<object>One entry per target
targets[].id, targets[].nameuuid, stringTarget site
targets[].changesarray<object>One entry per part { part, changed, before, after, fields }: changed is a boolean; before, after are item counts for list parts (null otherwise); fields is the number of settings that would change for other parts (null for list parts)
targets[].errorobject{ code, message, data } (API error code, English message, parameters with string or number values) when the copy would fail, else null; nothing of a failing target would change

Copy result object

FieldTypeDescription
targetsarray<object>One entry per target
targets[].id, targets[].nameuuid, stringTarget site
targets[].okbooleanCopied
targets[].changedarray<enum>Parts whose settings changed
targets[].revisionRevisionThe revision of the target's cluster after the copy; null when it failed
targets[].errorobjectWhy it failed { code, message, data }; null on success

Cache task object

FieldTypeDescription
iduuidTask ID
typeenumurl / prefix / site / prefetch / host / tag / sitemap
targetsarray<string>What was asked for: URLs, prefixes, site names, hosts, normalized tags or the sitemap URL
sitesarray<object>Sites involved { id, name }; deleted sites are left out
variantsarray<enum>Device variants (desktop, mobile) of a prefetch or sitemap task; [] for purges
maxUrlsintegerURL limit of a sitemap task; null for other types
stateenumpending: no node finished; running: some finished; then succeeded or failed. skipped nodes do not count
nodesarray<object>One entry per node
nodes[].nodeId, nodes[].nodeNameuuid, stringNode
nodes[].stateenumpending / running / succeeded / failed / skipped (the node was disabled before it ran the task)
nodes[].messagestringThe node's text of the outcome (English for unknown codes)
nodes[].errorCodestringStable code of the outcome; empty on success
nodes[].errorParamsobjectThe code's parameters, string values
nodes[].succeeded, nodes[].failedintegerItems that succeeded and failed
nodes[].finishedAtdatetimeFinished, or null
nodes[].recoveredAtdatetimeWhen a missed purge (task_expired, node_disabled) was made up with a whole-site purge, or null
sourceenumuser: created in the console or the API; recovery: a whole-site purge the console sent a node that missed purges; purge_method: a PURGE request a node accepted (createdByName is the node)
createdByNamestringCreator's name
createdAtdatetimeCreated
finishedAtdatetimeFinished, or null

HTTPS settings

settings of https.update and the response of https.get. Omitted fields of a request take their defaults.

FieldTypeRequiredConstraints and defaultDescription
certificateIduuidnoDefault nullThe site's first certificate; null for HTTP only
additionalCertificateIdsarray<uuid>no0–3, default []; need certificateId, distinct, not certificateIdFurther certificates (multi-certificate-v1); every domain of the site is covered by one of them, handshakes pick by SNI
forceHttpsbooleannoDefault false; needs a certificateRedirect HTTP to HTTPS
hstsMaxAgeintegerno0–63072000, default 0; not 0 needs a certificateHSTS max-age, 0 sends none
hstsIncludeSubdomainsbooleannoDefault falseHSTS includeSubDomains
hstsPreloadbooleannoDefault falseHSTS preload
minimumVersionenumno1.2 / 1.3, default 1.2Minimum TLS version
cipherProfileenumnomodern / compatible, default modernCipher suites
http2booleannoDefault trueHTTP/2
http3booleannoDefault falseHTTP/3
brotlibooleannoDefault falseBrotli compression (brotli-v1)
brotliLevelintegerno1–11, default 6Brotli level
brotliMinLengthintegerno1–1048576, default 256Smallest response compressed, in bytes
brotliTypesarray<string>noAt most 32 MIME types (type/subtype, lowercase, no parameters); default text/html, text/plain, text/css, application/javascript, application/json, image/svg+xmlTypes compressed
zstdbooleannoDefault falseZstandard compression (zstd-v1)
zstdLevelintegerno1–19, default 3Zstandard level
zstdMinLength, zstdTypesinteger, array<string>noAs brotliMinLength, brotliTypesZstandard's smallest size and types
gzipbooleannoDefault truegzip compression
gzipMinLength, gzipTypesinteger, array<string>noAs brotliMinLength, brotliTypesgzip's smallest size and types
gzipLevelintegerno0–9, default 0gzip level; 0 keeps the nodes' default (1), other values need site-content-v1
compressMaxLengthintegerno0–9007199254740991, default 0Largest response, by its known length, any coding compresses; 0 no limit (site-content-v1 otherwise); responses of unknown length are compressed
ocspStaplingbooleannoDefault falseOCSP stapling
redirectStatusintegerno301 / 302 / 303 / 307 / 308, default 301Status of the redirect of forceHttps and of config rules' forceHttps
redirectPortintegerno1–65535, default 443; 443 or an HTTPS port of the sitePort of the redirect's target URL
redirectExcludedDomainsarray<string>noAt most 50 domains, default []; deduplicated and sorted; exact or *. domains of the siteDomains forceHttps leaves alone (a config rule still redirects them)
clientCertificateobjectnoOmitted fields take their defaultsClient certificates (client-cert-v1)
clientCertificate.modeenumnooff / optional / required, default off; not off needs a certificate and caPemoptional verifies a certificate the visitor presents; required answers requests without a valid one (plain HTTP included) with the 403 error page
clientCertificate.caPemstringnoAt most 65536 bytes, default ""Client CA (PEM), re-encoded by the server
clientCertificate.depthintegerno1–5, default 2Verification depth
clientCertificate.forwardHeadersbooleannoDefault falseSend X-Client-Verify, X-Client-Cert-SHA256, X-Client-Cert-Subject and X-Client-Cert-Serial to the origin; visitors' own headers of these names are always removed

Clients that accept several encodings at equal q-values get zstd, then br, then gzip.

Error pages object

FieldTypeDescription
siteIduuidSite ID
pagesarray<object>At most one page per status; 4xx and 5xx first, then by status
pages[].statusinteger or enumStatus, or "4xx" / "5xx"
pages[].templatestringHTML template; empty for a redirect page
pages[].redirectUrlstringTarget of the 302; empty for a template page
pages[].responseStatusintegerStatus a template page is sent with; 0 keeps the response's
interceptOriginErrorsbooleanAlso replace origin responses whose status has a page
updatedAtdatetimeUpdated; null until first saved

Maintenance object

FieldTypeDescription
siteIduuidSite ID
enabledbooleanOn
templatestringPage template; empty for the nodes' built-in page
retryAfterSecondsintegerRetry-After in seconds, 0 sends none
allowedCidrsarray<string>Addresses or CIDRs let through
allowedPathPrefixesarray<string>Path prefixes let through
updatedAtdatetimeUpdated; null until first saved

Access authentication object

FieldTypeDescription
siteIduuidSite ID
rulesarray<object>Rules in matching order
rules[].iduuidRule ID
rules[].kindenumbasic / forward / url_a / url_b / url_c / url_d
rules[].enabledbooleanEnabled
rules[].scopeobject{ domains, pathPrefixes, extensions, excludePathPrefixes }, each array<string>
rules[].basicobject{ realm, keepAuthorization, userHeader, users: [{ name }] }, user names only; null for other kinds
rules[].forwardobject{ url, method, timeoutMs, requestHeaders, responseHeaders, cacheSeconds, passRedirects, allowUnavailable }; null for other kinds
rules[].urlobject{ validitySeconds, skewSeconds, signParam, timeParam, backupKey }, backupKey telling whether a backup key is set (boolean); null for other kinds
updatedAtdatetimeUpdated; null until first saved
formerIdentityHeadersarray<string>Identity headers of former rules (disabled ones count as current) that nodes still remove from every request of the site, oldest first

Access authentication rule input

FieldTypeRequiredConstraints and defaultDescription
iduuidno—An existing rule: its stored passwords and keys are kept; omitted for a new rule
kindenumyesbasic / forward / url_a / url_b / url_c / url_dKind; carries only the matching basic, forward or url
enabledbooleannoDefault trueEnabled
scopeobjectnoEvery list empty by defaultRequests the rule checks; empty lists do not narrow it
scope.domainsarray<string>noAt most 50, default []Domains of the site, as written on the site
scope.pathPrefixesarray<string>noAt most 32, default []; start with /, no whitespace, ?, # or control characters, at most 1024 bytes (UTF-8)Path prefixes
scope.extensionsarray<string>noAt most 64, default []; lowercase without the dot, [a-z0-9]{1,16}Extensions
scope.excludePathPrefixesarray<string>noAt most 32, default []; as pathPrefixesExcluded path prefixes
basic.realmstringyes1–64 characters after trimming, without ", \ and control charactersRealm of WWW-Authenticate
basic.keepAuthorizationbooleannoDefault falseKeep Authorization towards the origin; off, it is removed
basic.userHeaderbooleannoDefault falseAdd X-Auth-User towards the origin (replacing a visitor's own)
basic.usersarray<object>yes1–100, distinct namesUsers
basic.users[].namestringyes1–64 printable ASCII without spaces and :User name
basic.users[].passwordstringno8–128 characters, no control charactersWrite-only; omitted keeps the user's stored password, required for a new user
forward.urlstringyesAt most 2048 after trimming; an http(s) URL whose host is a host name, IPv4 or bracketed IPv6, without credentials, fragment, spaces or \Authentication service
forward.methodenumnoGET / HEAD, default GETRequest method
forward.timeoutMsintegerno100–10000, default 5000Timeout
forward.requestHeadersarray<string>noAt most 16, default ["authorization", "cookie"]; not host, hop-by-hop headers, content-length, x-original-*, x-real-ip, x-forwarded-for or x-edgeweir-*Visitor's request headers sent to the service
forward.responseHeadersarray<string>noAt most 8, default []; 1–64 token characters, not a protected header or x-edgeweir-*Headers of a 2xx answer copied to the request towards the origin
forward.cacheSecondsintegerno0–300, default 0Seconds a result is cached, 0 off
forward.passRedirectsbooleannoDefault falsePass a 3xx answer's status and Location on to the visitor
forward.allowUnavailablebooleannoDefault falseWhen the service is unavailable (5xx, connection failure, timeout), the request continues without authentication
url.validitySecondsintegerno1–31536000, default 1800Signature validity
url.skewSecondsintegerno0–600, default 300Clock skew allowed
url.signParamstringno[A-Za-z0-9_-]{1,32}, default signSignature parameter
url.timeParamstringno[A-Za-z0-9_-]{1,32}, default t; for url_d not equal to signParamTime parameter
url.primaryKeystringno16–128 printable ASCII without spacesWrite-only; omitted keeps the stored primary key, required for a new rule
url.backupKeystringnoAs primaryKey; or nullWrite-only; omitted keeps it, null removes the backup key

Access control object

The responses of accessControl.get and accessControl.update also carry siteId (uuid) and updatedAt (datetime; null until first saved). Omitted fields of a part in a request take the defaults below.

FieldTypeConstraints and defaultDescription
siteLists.blockListIdsarray<uuid>At most 16, default []; deduplicatedIP lists whose addresses get 403 on this site
siteLists.allowListIdsarray<uuid>At most 16, default []; deduplicatedIP lists whose addresses skip this site's block lists, bans, geo, hotlink, user agent checks and challenges
hotlink.enabledbooleanDefault falseHotlink protection on
hotlink.allowEmptybooleanDefault trueLet requests without Referer through
hotlink.allowSiteDomainsbooleanDefault trueLet requests from the site's own domains through
hotlink.allowed, hotlink.deniedarray<string>At most 200 each, default []; a.com, *.a.com, .a.com or *, at most 256, lowercased, deduplicatedSources allowed and denied
hotlink.checkOriginbooleanDefault falseCheck Origin as well when the request has one
hotlink.extensionsarray<string>At most 64; default 49 common image, audio, video and download typesExtensions checked
hotlink.pathPrefixes, hotlink.excludePathPrefixesarray<string>At most 32 each, default []; start with /, no whitespace, ?, # or control characters, at most 1024 bytesPath prefixes checked and excluded
hotlink.actionenumdeny / redirect, default denydeny: 403 with the error page; redirect: 302 to redirectUrl
hotlink.redirectUrlstringAt most 2048 after trimming, default ""; required for redirectA site path or an http(s) URL
userAgents.rulesarray<object>At most 200, default []{ pattern, action }: pattern is empty or a wildcard of 1–512 printable ASCII (at most 8 *, escaping only * and \); action is allow / deny
userAgents.pathPrefixes, userAgents.excludePathPrefixesarray<string>As hotlink.pathPrefixesPath prefixes checked and excluded
cors.enabledbooleanDefault false; when on, at least one allowedOriginsCORS on
cors.allowedOriginsarray<string>At most 100, default []; scheme://host[:port], https://*.a.com or *, at most 300Origins allowed
cors.allowCredentialsbooleanDefault false; not together with *Access-Control-Allow-Credentials
cors.allowedMethodsarray<string>1–16, uppercased; default GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONSMethods allowed
cors.allowedHeaders, cors.exposedHeadersarray<string>At most 64 each, default []; lowercased 1–64 token charactersHeaders allowed and exposed
cors.echoRequestHeadersbooleanDefault falseAnswer preflights with their Access-Control-Request-Headers
cors.maxAgeSecondsinteger0–86400, default 600Preflight cache seconds
cors.preflightToOriginbooleanDefault falsePreflights go to the origin instead of being answered at the edge
cors.keepOriginHeadersbooleanDefault falseWhen the origin's response has Access-Control-Allow-Origin, no Access-Control-* header is changed
cors.pathPrefixesarray<string>As hotlink.pathPrefixesPath prefixes it applies to
geo.enabledbooleanDefault false; when on, at least one of countries, subdivisions, asnsGeo access control on
geo.modeenumallow / deny, default denyallow: only matching clients pass; deny: matching clients get 403
geo.countriesarray<string>At most 256, default []; two letters, uppercasedCountry codes
geo.subdivisionsarray<string>At most 256, default []; CC-subdivision, e.g. US-CASubdivisions
geo.asnsarray<integer>At most 256, 1–4294967295, default []ASNs
geo.pathPrefixes, geo.exceptPathPrefixesarray<string>As hotlink.pathPrefixesPath prefixes it applies to and excepts
websocket.allowAllOriginsbooleanDefault true; when false, at least one originsWebSocket from any origin
websocket.originsarray<string>At most 100, default []; https://a.com[:port] or https://*.a.com, at most 300Origins allowed
websocket.idleTimeoutSecondsinteger60–86400, default 3600Idle timeout
securityHeaders.nosniffbooleanDefault falseX-Content-Type-Options: nosniff
securityHeaders.frameOptionsenumoff / DENY / SAMEORIGIN, default offX-Frame-Options
securityHeaders.referrerPolicyenumoff, no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url, default offReferrer-Policy
securityHeaders.permissionsPolicystringAt most 1024 printable ASCII after trimming, default ""Permissions-Policy; empty sets none
securityHeaders.hideServerbooleanDefault falseHide Server
securityHeaders.removePoweredBybooleanDefault falseRemove X-Powered-By
encodedPaths.exemptionsarray<object>At most 32, default []; distinct prefix{ prefix, encodedSlash, semicolon }: requests whose raw path starts with prefix may carry %2F (encodedSlash) and / or ; (semicolon) as they are, at least one true (both default false); prefix is 1–256 printable ASCII starting with /, without %, ;, \, #, ?, // or dot segments

Usage protection settings

The request fields of usageGuard.update and settings of usageGuard.get. At least one of bytesLimit, requestsLimit and bandwidthBps is not null.

FieldTypeRequiredConstraints and defaultDescription
periodenumnoday / month, default monthCalendar day / month
timeZonestringyesIANA time zone name of 1–64 after trimmingThe period starts at midnight there
bytesLimitstringnoA positive decimal integer of 1–38 digits (no leading zero), or null; default nullBytes sent to visitors per period
requestsLimitstringnoAs bytesLimitRequests per period
bandwidthBpsintegerno1000–10000000000000, or null; default nullBandwidth limit (bit/s, the average of the last 5 complete minutes across every node)
warnPercentintegerno1–99, or null; default 80Warning threshold in percent; null for no warning
actionenumnoalert / maintenance / disable, default maintenanceAt 100%: alert only, maintenance mode, disable the site
recoveryenumnoauto / manual, default autoauto: the action is lifted once the period is no longer over a limit (next period, a higher limit, or bandwidth after its hold time); manual: only by restoring
bandwidthHoldMinutesintegerno5–1440, default 30With auto, how long an action for bandwidth holds after the last time it was over

Usage protection object

FieldTypeDescription
siteIduuidSite ID
settingsUsage protection settingsSettings; null when not set
updatedAtdatetimeUpdated, or null
periodobjectThe current period { start, end } (datetime); null when not set
usageobjectUsage of the current period { bytes, requests, bandwidthBps, bandwidthPeakBps }: bytes, requests are decimal strings; bandwidthBps is the average of the last 5 complete minutes, bandwidthPeakBps the highest of the period (number, bit/s); null when not set
heldobjectThe action usage protection applied and still holds { action, metric, since }: action maintenance / disable, metric bytes / requests / bandwidth; null when none
pausedUntildatetimeAfter a restore, no action until then (the end of that period), or null
lastErrorstringError code of the last action that could not be published; empty when none

Automatic mitigation object

FieldTypeDescription
siteIduuidSite ID
settingsobject{ enabled, threshold, durationMinutes }; null when never set up (off)
updatedAtdatetimeUpdated, or null
levelenumThe highest CC level any online node holds for the site now: normal / cookie302 / js / pow / captcha
activeobjectUnder Attack as the mitigation turned it on and still holds it { since, expiresAt, level }; expiresAt moves while the level stays at the threshold; null when none
pausedbooleanThe operator took over: nothing starts until the level is below the threshold again
lastErrorstringError code of the last change that could not be published; empty when none
Edit on GitHub

On this page

Sitessites.listsites.getsites.createsites.updatesites.deletesites.launchsites.originHealthsites.originQualitysites.featuressites.setCnamePrefixsites.starredsites.setStarredEnabling and disabling sitessites.setEnabledsites.batchSetEnabledSite tags and batch operationssites.setTagssiteTags.listsiteTags.renamesiteTags.deletesites.batchTagssites.batchDeleteCopying settings and cloningsites.copySettingsPreviewsites.copySettingssites.cloneCache taskssites.purgeAllcacheTasks.listcacheTasks.getcacheTasks.createHTTPShttps.gethttps.updatehttps.checkError pages and maintenance modeerrorPages.geterrorPages.updatemaintenance.getmaintenance.updateAccess authenticationauthRules.getauthRules.updateauthRules.forgetIdentityHeadersauthRules.signUrlauthRules.failuresAccess controlaccessControl.getaccessControl.updateImage format conversionimageConvert.getimageConvert.updateimageConvert.savingsUsage protectionusageGuard.getusageGuard.updateusageGuard.deleteusageGuard.restoreAutomatic mitigationautoMitigation.getautoMitigation.updateautoMitigation.restoreDevelopment modeMarkdown for AgentsTiered CacheAI crawl controlObjectsSite objectOrigin objectCache rule objectDelivery objectRevision objectSite mutation resultSite inputOrigin inputCache rule inputOrigin pool settingsCache settingsContent settingsLaunch check objectOrigin health objectOrigin quality objectSite features objectBatch resultCopy preview objectCopy result objectCache task objectHTTPS settingsError pages objectMaintenance objectAccess authentication objectAccess authentication rule inputAccess control objectUsage protection settingsUsage protection objectAutomatic mitigation object