Version 2.1.1792967583 · latest Download OpenAPI Markdown

Tiered origin (L2)

Edges fetch through L2 nodes in their region first, so cached content no longer hits the origin. Paid feature l2; inactive when not licensed.

l2Tiered originAuthentication: Admin only25 endpoints

Add L2 nodes in batch

POST/api/v2/l2/enable-batch
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
apply_sitesboolean— Also enable on existing sites (only those never set; sites turned off manually, or whose tenant package does not include tiered origin, stay unchanged).
node_idsinteger[]Required Edge node IDs to turn into L2.

List L2 groups

GET/api/v2/l2/groups
Authentication: Admin only

Create L2 group

POST/api/v2/l2/groups
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
all_regionsboolean— Serve all regions (requires cross_region).
balancestring— Distribution: url_hash pins by URL, rr round-robin.
Values ["url_hash","rr"]
cross_regionboolean— Allow cross-region use (required for nodes outside the regions or all regions; adds about 50-200 ms).
namestringRequired Group name, unique platform-wide.
node_idsinteger[]— Edge node IDs to turn into L2.
regionsinteger[]— Served region IDs; ignored when all_regions is true.
rulesL2Rule[]— Group rules (saved with the group).

Get L2 group

GET/api/v2/l2/groups/{id}
Authentication: Admin only

Update L2 group

PATCH/api/v2/l2/groups/{id}
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
all_regionsboolean— Serve all regions (requires cross_region).
balancestring— Distribution: url_hash pins by URL, rr round-robin.
Values ["url_hash","rr"]
cross_regionboolean— Allow cross-region use (required for nodes outside the regions or all regions; adds about 50-200 ms).
namestring— Group name, unique platform-wide.
node_idsinteger[]— Edge node IDs to turn into L2.
regionsinteger[]— Served region IDs; ignored when all_regions is true.
rulesL2Rule[]— Group rules (saved with the group).

Delete L2 group

DELETE/api/v2/l2/groups/{id}
Authentication: Admin only

Copy L2 group

POST/api/v2/l2/groups/{id}/copy
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
namestringRequired Group name, unique platform-wide.

Reset sites of a group to region default

POST/api/v2/l2/groups/{id}/reset-sites
Authentication: Admin only

List L2 nodes

GET/api/v2/l2/nodes
Authentication: Admin only

Update L2 node

PATCH/api/v2/l2/nodes/{id}
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
access_addrstring— Private address edges use to reach it (IP only, no port; IPv4-mapped IPv6 is stored as IPv4); empty means the public IP.
rolestring— Primary or backup: backups stand by while a primary in the same group is up.
Values ["primary","backup"]
weightinteger— Weight 1-100; multiple primaries share URLs by weight.

Disable L2 node

POST/api/v2/l2/nodes/{id}/disable
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
reasonstring— Reason for disabling.

Enable L2 node

POST/api/v2/l2/nodes/{id}/enable
Authentication: Admin only

Impact before revert or disable

GET/api/v2/l2/nodes/{id}/impact
Authentication: Admin only

Mark origins as allowing the node

POST/api/v2/l2/nodes/{id}/mark-allowed
Authentication: Admin only

Check whether origins allow the node

POST/api/v2/l2/nodes/{id}/probe-access
Authentication: Admin only

Revert to edge node

POST/api/v2/l2/nodes/{id}/revert
Authentication: Admin only

Pause tiered origin network-wide

POST/api/v2/l2/pause
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
auto_resume_atstring— Automatic resume time (must be in the future); omit for manual resume.

One-click enable recommendation

GET/api/v2/l2/recommend
Authentication: Admin only

Resume tiered origin network-wide

POST/api/v2/l2/resume
Authentication: Admin only

License loss impact and fallback window

GET/api/v2/l2/revoke-impact
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
pageinteger— Page number, starting from 1
Default 1
page_sizeinteger— Items per page
Default 20

Tiered origin statistics

GET/api/v2/l2/stats
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
startstringRequired Start time (inclusive), RFC 3339
endstringRequired End time (exclusive), RFC 3339

Statistics by L2 node

GET/api/v2/l2/stats/nodes
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
startstringRequired Start time (inclusive), RFC 3339
endstringRequired End time (exclusive), RFC 3339

Tiered origin statistics by site

GET/api/v2/l2/stats/sites
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
startstringRequired Start time (inclusive), RFC 3339
endstringRequired End time (exclusive), RFC 3339
pageinteger— Page number, starting from 1
Default 1
page_sizeinteger— Items per page
Default 20
domainstring— Substring of the primary domain, case-insensitive.

Tiered origin overview

GET/api/v2/l2/status
Authentication: Admin only

Get L2 task progress

GET/api/v2/l2/tasks/{id}
Authentication: Admin only

Tiered origin (L2) object

FieldTypeRequiredDescription
access_addrstring— Private address edges use to reach it (IP only, no port; IPv4-mapped IPv6 is stored as IPv4); empty means the public IP.
all_regionsboolean— Serve all regions (requires cross_region).
allowstring— Origin allowlisting: empty if not applicable, pending (cacheable requests only), or allowed.
allow_sincestring— Pending since; turns allowed after 24 hours.
apply_sitesboolean— Also enable on existing sites (only those never set; sites turned off manually, or whose tenant package does not include tiered origin, stay unchanged).
auto_resume_atstring— Automatic resume time (must be in the future); omit for manual resume.
balancestring— Distribution: url_hash pins by URL, rr round-robin.
Values ["url_hash","rr"]
checked_atstring— Checked at.
created_atstring— Started at.
cross_regionboolean— Allow cross-region use (required for nodes outside the regions or all regions; adds about 50-200 ms).
defaultsL2Defaults— Defaults (change via PUT /configs/l2.defaults).
disabled_atstring— Disabled at.
disabled_reasonstring— Reason for disabling.
edge_origin_requestsinteger— Edge origin requests (hit rate denominator).
empty_groupinteger[]— Groups left without a serving L2 (their sites will bypass temporarily).
enabledboolean— Enabled; a disabled node stays L2 and keeps its cache.
featurestring— Paid feature l2 level: on; limited when frozen, being revoked, or in the fallback window after the license lapses (still pushed, management only; see GET /l2/revoke-impact); off when not licensed (not pushed).
Values ["on","limited","off"]
finished_atstring— Finished at.
groupsinteger[]— IDs of L2 groups containing it.
hit_ratenumber— Hit rate 0-1; 0 when there were no origin requests.
hoststring— Primary domain of the site.
idinteger— Group ID.
ipstring— Public IP.
is_region_defaultboolean— Region default group (one per region; cannot be deleted, only its distribution can change).
itemsL2Group[]— L2 groups.
kindstring— Task kind: enable adds L2, revert returns to edge.
Values ["enable","revert"]
l2_group_idinteger— L2 group chosen by the site; null means region default.
l2_group_namestring— L2 group name; empty for region default.
l2_hit_requestsinteger— Origin requests served by L2 (hit rate numerator).
l2_pickstring— Effective L2 pick method (site value, else the default): region or near.
Values ["region","near"]
low_hitboolean— Hit rate below 30% with at least 1000 origin requests (mostly dynamic content; consider turning L2 off).
manual_off_sitesinteger— Sites whose tiered origin was turned off manually (left alone when enabling on existing sites; IP sites excluded).
namestringRequired Group name, unique platform-wide.
node_idinteger— Node ID.
node_idsinteger[]Required Edge node IDs to turn into L2.
nodes_pendinginteger— L2 nodes awaiting origin allowlisting.
nodes_servinginteger— L2 nodes serving (enabled and not reverting).
nodes_totalinteger— Total L2 nodes (including disabled and reverting).
onlineboolean— Online (heartbeat within 2 minutes).
only_blockboolean— Some sites allow only L2 at the origin (revoke its allowlisting after revert).
only_block_sitesinteger— Sites with origin allowing only L2 (greater than 0 when only_block is true).
origin_l2_onlyboolean— Origin allows only L2; after the window ends the site goes down unless the origin allows edge nodes.
origin_requestsinteger— Requests that reached the origin.
origin_requests_estinteger— Estimate without tiering (= edge origin requests).
owner_idinteger— Owner user ID.
owner_namestring— Owner username.
pausedboolean— Paused network-wide.
paused_atstring— Paused at.
progressinteger— Progress 0-100.
reasonstring— Reason for disabling.
region_idinteger— Region of a region default group; 0 for custom groups.
region_lastboolean— It is the last enabled L2 in its region.
regionsinteger[]— Served region IDs; ignored when all_regions is true.
revert_atstring— Revert started at.
rolestring— Primary or backup: backups stand by while a primary in the same group is up.
Values ["primary","backup"]
rulesL2Rule[]— Group rules (saved with the group).
saved_bytesinteger— Origin traffic saved (bytes served from L2 cache).
site_idinteger— Site ID.
sitesinteger— Number of sites using this group; for a region default group, the sites with L2 enabled and no group chosen (same number for every region default group).
sites_only_l2integer— Sites with origin allowing only L2 (shown in the pause and add-node warnings).
statestring— State: active, or reverting to edge.
Values ["active","reverting"]
thresholdsL2Thresholds— Detection thresholds (read-only).
updated_atstring— Last modified time.
weightinteger— Weight 1-100; multiple primaries share URLs by weight.