Version 2.1.1792967583 · latest Download OpenAPI Markdown

Packages

Base packages for sale, defining quotas such as traffic, bandwidth and domains, and prices.

packagesPackagesAuthentication: Admin only7 endpoints

List packages

GET/api/v2/packages
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
pageinteger— Page number, starting from 1
Default 1
page_sizeinteger— Items per page
Default 20
sortstring— Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id`

Create package

POST/api/v2/packages
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
backup_group_idinteger— Backup node group; null = none.
bandwidth_mbpsinteger— Bandwidth in Mbps, -1 = unlimited.
buy_limitinteger— Maximum copies a tenant may hold, -1 = unlimited.
cname_domain_idinteger— CNAME root domain; null = the package binds no lines.
cname_host_suffixstring— Suffix for newly generated host records; empty = only the 8-character random name.
cname_modePackageCnameMode— CNAME mode. site = one access name per site or stream; package = sites and streams of a purchased package share one access name.
Values ["site","package"]
connectionsinteger— Concurrent connections, -1 = unlimited.
custom_cc_ruleboolean— Allows custom CC rules.
desstring— Description
domainsinteger— Number of domains (each IP site counts as 1), -1 = unlimited.
enabledboolean— Whether enabled
group_idsinteger[]— Package groups it belongs to.
http_portsinteger— Number of non-standard HTTP/HTTPS ports (other than 80/443), -1 = unlimited.
ip_numinteger— Number of selectable IPs ("My IPs"), -1 = unlimited.
ip_pool_idinteger— IP pool used to provision IP sites (IP product line); null = not provisioned.
ip_site_portinteger— IP-site ports: distinct ports across all IP sites of the package (80/443 included), -1 = unlimited; IP-site ports do not count toward non-standard ports.
l2boolean— Includes tiered origin (tenant switch of the paid feature l2): tenants can turn on tiered origin for sites, and nodes use it, only while the master license l2 is active; existing packages are false (on upgrade, purchased packages of tenants already using tiered origin are set to true).
namestringRequired Name
node_group_idinteger— Primary node group; null = the package binds no lines.
origin_ip_limitstring[]— Allowed origin IPs or CIDR ranges; empty = any. When set, origins of sites under the package must fall inside them and domain origins are rejected.
ownersinteger[]— Tenant ids allowed to buy; empty = no restriction.
price_month_centsintegerRequired Monthly price in cents.
price_quarter_centsintegerRequired Quarterly price in cents.
price_year_centsintegerRequired Yearly price in cents.
region_idinteger— Region; null = the package binds no lines.
renew_before_daysinteger— Renewal is only allowed within this many days before expiry, -1 = unlimited.
require_verifiedboolean— Real-name verification is required to purchase.
sale_untilstring— Not sold after this time; omitted/null = no limit.
sortinteger— Display order (smaller first).
stream_portsinteger— Number of TCP/UDP forwarding ports, -1 = unlimited.
traffic_gbinteger— Traffic in GB per billing cycle, -1 = unlimited.
waf_enhancedboolean— Includes WAF Enhanced (tenant switch of the paid feature waf_enhanced): tenants can use standard/strict levels, big screen, deep Bot, anti-tamper and so on only while the master license WAF Enhanced is not degraded; existing packages are false.
websocketboolean— Allows WebSocket.

Batch enable or disable packages

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

Request body application/json

FieldTypeRequiredDescription
enabledbooleanRequired Whether enabled
idsinteger[]Required IDs of the objects to change, at most 100.

Get package

GET/api/v2/packages/{id}
Authentication: Admin only

Update package

PUT/api/v2/packages/{id}
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
backup_group_idinteger— Backup node group; null = none.
bandwidth_mbpsinteger— Bandwidth in Mbps, -1 = unlimited.
buy_limitinteger— Maximum copies a tenant may hold, -1 = unlimited.
cname_domain_idinteger— CNAME root domain; null = the package binds no lines.
cname_host_suffixstring— Suffix for newly generated host records; empty = only the 8-character random name.
cname_modePackageCnameMode— CNAME mode. site = one access name per site or stream; package = sites and streams of a purchased package share one access name.
Values ["site","package"]
connectionsinteger— Concurrent connections, -1 = unlimited.
custom_cc_ruleboolean— Allows custom CC rules.
desstring— Description
domainsinteger— Number of domains (each IP site counts as 1), -1 = unlimited.
enabledboolean— Whether enabled
group_idsinteger[]— Package groups it belongs to.
http_portsinteger— Number of non-standard HTTP/HTTPS ports (other than 80/443), -1 = unlimited.
ip_numinteger— Number of selectable IPs ("My IPs"), -1 = unlimited.
ip_pool_idinteger— IP pool used to provision IP sites (IP product line); null = not provisioned.
ip_site_portinteger— IP-site ports: distinct ports across all IP sites of the package (80/443 included), -1 = unlimited; IP-site ports do not count toward non-standard ports.
l2boolean— Includes tiered origin (tenant switch of the paid feature l2): tenants can turn on tiered origin for sites, and nodes use it, only while the master license l2 is active; existing packages are false (on upgrade, purchased packages of tenants already using tiered origin are set to true).
namestringRequired Name
node_group_idinteger— Primary node group; null = the package binds no lines.
origin_ip_limitstring[]— Allowed origin IPs or CIDR ranges; empty = any. When set, origins of sites under the package must fall inside them and domain origins are rejected.
ownersinteger[]— Tenant ids allowed to buy; empty = no restriction.
price_month_centsintegerRequired Monthly price in cents.
price_quarter_centsintegerRequired Quarterly price in cents.
price_year_centsintegerRequired Yearly price in cents.
region_idinteger— Region; null = the package binds no lines.
renew_before_daysinteger— Renewal is only allowed within this many days before expiry, -1 = unlimited.
require_verifiedboolean— Real-name verification is required to purchase.
sale_untilstring— Not sold after this time; omitted/null = no limit.
sortinteger— Display order (smaller first).
stream_portsinteger— Number of TCP/UDP forwarding ports, -1 = unlimited.
traffic_gbinteger— Traffic in GB per billing cycle, -1 = unlimited.
waf_enhancedboolean— Includes WAF Enhanced (tenant switch of the paid feature waf_enhanced): tenants can use standard/strict levels, big screen, deep Bot, anti-tamper and so on only while the master license WAF Enhanced is not degraded; existing packages are false.
websocketboolean— Allows WebSocket.

Delete package

DELETE/api/v2/packages/{id}
Authentication: Admin only

Sync base package to purchased packages

POST/api/v2/packages/{id}/syncs
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
itemsPackageSyncField[]Required Fields to sync.

Packages object

FieldTypeRequiredDescription
backup_group_idinteger— Backup node group; null = none.
bandwidth_mbpsinteger— Bandwidth in Mbps, -1 = unlimited.
buy_limitinteger— Maximum copies a tenant may hold, -1 = unlimited.
cname_domain_idinteger— CNAME root domain; null = the package binds no lines.
cname_host_suffixstring— Suffix for newly generated host records; empty = only the 8-character random name.
cname_modePackageCnameMode— CNAME mode. site = one access name per site or stream; package = sites and streams of a purchased package share one access name.
Values ["site","package"]
connectionsinteger— Concurrent connections, -1 = unlimited.
created_atstring— Created at
read-only
custom_cc_ruleboolean— Allows custom CC rules.
desstring— Description
domainsinteger— Number of domains (each IP site counts as 1), -1 = unlimited.
enabledboolean— Whether enabled
errorsFieldError[]— Why each remaining item was not changed; field is /ids/<index>, code as in the single-item update (not_found, readonly and so on).
group_idsinteger[]— Package groups it belongs to.
http_portsinteger— Number of non-standard HTTP/HTTPS ports (other than 80/443), -1 = unlimited.
idinteger— Record ID
read-only
idsinteger[]Required IDs of the objects to change, at most 100.
ip_numinteger— Number of selectable IPs ("My IPs"), -1 = unlimited.
ip_pool_idinteger— IP pool used to provision IP sites (IP product line); null = not provisioned.
ip_site_portinteger— IP-site ports: distinct ports across all IP sites of the package (80/443 included), -1 = unlimited; IP-site ports do not count toward non-standard ports.
itemsPackageSyncField[]Required Fields to sync.
l2boolean— Includes tiered origin (tenant switch of the paid feature l2): tenants can turn on tiered origin for sites, and nodes use it, only while the master license l2 is active; existing packages are false (on upgrade, purchased packages of tenants already using tiered origin are set to true).
namestring— Name
node_group_idinteger— Primary node group; null = the package binds no lines.
origin_ip_limitstring[]— Allowed origin IPs or CIDR ranges; empty = any. When set, origins of sites under the package must fall inside them and domain origins are rejected.
ownersinteger[]— Tenant ids allowed to buy; empty = no restriction.
price_month_centsinteger— Monthly price in cents.
price_quarter_centsinteger— Quarterly price in cents.
price_year_centsinteger— Yearly price in cents.
region_idinteger— Region; null = the package binds no lines.
renew_before_daysinteger— Renewal is only allowed within this many days before expiry, -1 = unlimited.
require_verifiedboolean— Real-name verification is required to purchase.
sale_untilstring— Not sold after this time; omitted/null = no limit.
skippedinteger— Number skipped because they do not follow the base package or individually edited at least one changed field (other fields are still synced).
skipped_idsinteger[]— Ids of the skipped purchased packages.
sortinteger— Display order (smaller first).
stream_portsinteger— Number of TCP/UDP forwarding ports, -1 = unlimited.
syncPackageSyncResult— Sync result.
syncedinteger— Number of purchased packages synced (for automatic sync, those where every changed field was synced).
traffic_gbinteger— Traffic in GB per billing cycle, -1 = unlimited.
updatedinteger[]— IDs that were set (including those already in the target state), in request order.
updated_atstring— Updated at
read-only
waf_enhancedboolean— Includes WAF Enhanced (tenant switch of the paid feature waf_enhanced): tenants can use standard/strict levels, big screen, deep Bot, anti-tamper and so on only while the master license WAF Enhanced is not degraded; existing packages are false.
websocketboolean— Allows WebSocket.