Version 2.1.1792967583 · latest Download OpenAPI Markdown

Purchased packages

Packages a tenant has bought: purchase, renew, change, add upgrade packs and view usage.

user-packagesPackagesAuthentication: User (some parameters admin only)16 endpoints

List purchased packages

GET/api/v2/user-packages
Authentication: User (some parameters 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`
tenant_idinteger— Admin only: filter by tenant. Ignored for tenant credentials, which only see their own tenant's data
idsstring— Only list these IDs: comma-separated positive integers, at most 200 after deduplication (same as the page_size limit; more returns 400); an empty value is the same as omitting it. Combined with other filters as an intersection; IDs you cannot see are silently left out. Pagination is unchanged: set page_size to at least the number of IDs to get them in one page
package_idinteger— Only list purchased packages of this base package.
expire_within_daysinteger— Only list purchased packages expiring within this many days (including already expired ones).
namestring— Purchased package name contains (% and _ match literally).
customizedboolean— true lists only purchased packages with individually edited quotas or not following the base package; false lists only those following it unchanged.

Purchase package

POST/api/v2/user-packages
Authentication: User (some parameters admin only)

Query parameters

FieldTypeRequiredDescription
tenant_idinteger— Admin only: filter by tenant. Ignored for tenant credentials, which only see their own tenant's data

Request body application/json

FieldTypeRequiredDescription
dry_runboolean— Quote only, do not save.
durationstring— Duration: month/quarter/year (adds 1/3/12 months; at month end the last day of the target month is used).
Values ["month","quarter","year"]
end_atstring— Expiry time of the purchased package.
namestring— Name
package_idintegerRequired Base package id.

Get purchased package

GET/api/v2/user-packages/{id}
Authentication: User (some parameters admin only)

Update purchased package

PUT/api/v2/user-packages/{id}
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
backup_group_idinteger— Backup node group; null = none.
bandwidth_mbpsinteger— Bandwidth in Mbps, -1 = unlimited.
cname_domain_idinteger— CNAME root domain; null = the package binds no lines.
cname_hostnamestring— Host record of the shared access name (used by sites and streams in per-package mode); empty = none yet.
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.
domainsinteger— Number of domains (each IP site counts as 1), -1 = unlimited.
end_atstring— Expiry time of the purchased package.
follow_baseboolean— Follows the base package; quota changes on the base package are synced here automatically (except fields in overrides).
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).
namestring— Name
node_group_idinteger— Primary node group; null = the package binds no lines.
price_month_centsinteger— Monthly price locked at purchase.
price_quarter_centsinteger— Quarterly price locked at purchase.
price_year_centsinteger— Yearly price locked at purchase.
region_idinteger— Region; null = the package binds no lines.
reset_to_baseboolean— Admin only; true = reset quota fields to the base package values, clear overrides and follow again (cannot be combined with other fields).
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 purchased package

DELETE/api/v2/user-packages/{id}
Authentication: User (some parameters admin only)

Change package (upgrade or downgrade)

POST/api/v2/user-packages/{id}/changes
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
dry_runboolean— Quote only, do not save.
package_idintegerRequired Base package id.

My IPs

GET/api/v2/user-packages/{id}/ips
Authentication: User (some parameters admin only)

Select IPs

POST/api/v2/user-packages/{id}/ips
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
ip_idsinteger[]Required IDs of the pool IPs to select.

Update note of selected IP

PUT/api/v2/user-packages/{id}/ips/{ip_id}
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
remarkstringRequired Remark

Remove selected IP

DELETE/api/v2/user-packages/{id}/ips/{ip_id}
Authentication: User (some parameters admin only)

Node groups of a purchased package

GET/api/v2/user-packages/{id}/node-groups
Authentication: User (some parameters admin only)

Renew purchased package

POST/api/v2/user-packages/{id}/renewals
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
dry_runboolean— Quote only, do not save.
durationstringRequired Duration: month/quarter/year (adds 1/3/12 months; at month end the last day of the target month is used).
Values ["month","quarter","year"]

List purchased upgrade packs

GET/api/v2/user-packages/{id}/upgrades
Authentication: User (some parameters admin only)

Buy upgrade pack

POST/api/v2/user-packages/{id}/upgrades
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
amountinteger— Number of units, default 1.
dry_runboolean— Quote only, do not save.
upgrade_idintegerRequired Id of the upgrade pack to buy.

Reduce or remove purchased upgrade pack

DELETE/api/v2/user-packages/{id}/upgrades/{upgrade_id}
Authentication: User (some parameters admin only)

Query parameters

FieldTypeRequiredDescription
amountinteger— Number of units to reduce; omitted = remove the whole item.

Purchased package usage

GET/api/v2/user-packages/{id}/usage
Authentication: User (some parameters admin only)

Purchased packages object

FieldTypeRequiredDescription
actionstring— Operation: buy, renew, change or upgrade.
Values ["buy","renew","change","upgrade"]
addedinteger[]— IDs of the pool IPs newly selected by this call.
amountinteger— Number of units, default 1.
amount_centsinteger— Positive = charged, negative = refunded to balance (downgrade), 0 = no charge (including admin operations).
backup_group_idinteger— Backup node group; null = none.
bandwidth_mbpsinteger— Bandwidth in Mbps, -1 = unlimited.
cert_autoIpCertState— Platform IP certificate status.
cname_domain_idinteger— CNAME root domain; null = the package binds no lines.
cname_hostnamestring— Host record of the shared access name (used by sites and streams in per-package mode); empty = none yet.
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.
cycle_endstring— End of the current billing cycle.
cycle_startstring— Start of the current billing cycle.
domainsinteger— Number of domains (each IP site counts as 1), -1 = unlimited.
dry_runboolean— Quote only, do not save.
durationstring— Duration: month/quarter/year (adds 1/3/12 months; at month end the last day of the target month is used).
Values ["month","quarter","year"]
enabledboolean— Whether enabled
end_atstring— Expiry time of the purchased package.
follow_baseboolean— Follows the base package; quota changes on the base package are synced here automatically (except fields in overrides).
read-only
http_portsinteger— Number of non-standard HTTP/HTTPS ports (other than 80/443), -1 = unlimited.
idinteger— Record ID
read-only
in_poolboolean— Still in the package's current IP pool.
ipstring— IP address.
ip_idsinteger[]Required IDs of the pool IPs to select.
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.
itemsUserPackageIp[]— Items on this page
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).
limitinteger— Number of IPs that can be selected; -1 means unlimited.
limitsPackageLimits— Effective limits (package values plus upgrade packs; -1 = unlimited, 0/1 for feature items).
namestring— Name
node_group_idinteger— Primary node group; null = the package binds no lines.
node_stateIpNodeState— State of the owning primary node: disabled if the node is disabled; otherwise online if a heartbeat arrived in the last 2 minutes, else offline.
Values ["online","offline","disabled"]
order_idinteger— Order id (when a charge or refund happened).
overridesPackageQuotaField[]— Quota fields edited individually by an admin that differ from the base package; skipped by automatic sync.
read-only
package_idinteger— Base package id.
package_namestring— Base package name (shown in package lists and orders).
read-only
periodstring— Price period used for proration when changing package.
Values ["month","quarter","year"]
price_month_centsinteger— Monthly price locked at purchase.
price_quarter_centsinteger— Quarterly price locked at purchase.
price_year_centsinteger— Yearly price locked at purchase.
regionstring— Name of the region it belongs to.
region_idinteger— Region; null = the package binds no lines.
remain_daysinteger— Remaining days used for proration.
remarkstringRequired Remark
requestsinteger— Number of requests in this billing cycle (sealed hours plus a live count of hours not yet sealed).
reset_to_baseboolean— Admin only; true = reset quota fields to the base package values, clear overrides and follow again (cannot be combined with other fields).
selectedinteger— Number of IPs already selected.
sitesobject[]— IP sites in this package that bind it.
start_atstring— Start time of the purchased package.
statusstring— expired = expired (the tenant's sites are suspended with 512; renewing restores them).
Values ["active","expired"]
stream_portsinteger— Number of TCP/UDP forwarding ports, -1 = unlimited.
tenant_idinteger— Owner tenant (user) ID
read-only
traffic_bytesinteger— Billable traffic used in this billing cycle (bytes, already multiplied by the compensation factor) — sealed hours plus a live count of hours not yet sealed, the same figure the over-quota stop uses.
traffic_gbinteger— Traffic in GB per billing cycle, -1 = unlimited.
traffic_limit_gbinteger— Effective traffic limit (GB, 1 GB = 1024^3 bytes, including upgrade packs); -1 = unlimited.
updated_atstring— Updated at
read-only
upgrade_idintegerRequired Id of the upgrade pack to buy.
user_packageUserPackage— The purchased package after the operation.
user_package_idinteger— Id of the purchased package this operation applied to (for a purchase, the newly created one; equals user_package.id). Absent for a dry run, which saves nothing.
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.