Skip to content

List CDN proxy rules

GET /api/v2/cdn/zones/{id}/proxy-rules

Lists the hostname proxy rules in a CDN zone. Each rule says whether traffic for one hostname goes through the CDN (proxy.enabled) and whether the rule is applied at all (state.active). Use the rule ID (cprule_…) to update or delete a rule. The domain must be active. The list is empty while the CDN service is unavailable.

Authentication: An API key with the scopes read:dns and read:domains and read:cdn. About keys and scopes

Request

Path parameters

idstringrequired
The CDN zone ID. From GET /api/v2/cdn/zones.

Example

GET /api/v2/cdn/zones/{id}/proxy-rules
curl "https://cloud.hostup.se/api/v2/cdn/zones/cdn_01hxa3b4c5d6e7f8g9h0j1k2m3/proxy-rules" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The zone’s proxy rules.

Response 200
{
"data": [
{
"id": "cprule_01hxa3b4c5d6e7f8g9h0j1k2m3",
"fqdn": "www.example.com",
"zone": "example.com",
"proxy": {
"enabled": true,
"mode": "always",
"priority": 100
},
"state": {
"active": true,
"reason": null
},
"createdAt": "2026-04-27T12:00:00.000Z",
"updatedAt": "2026-04-27T12:00:00.000Z",
"description": "Proxy website traffic through the CDN."
}
]
}
Response fields
dataarray of object
idstring
The proxy rule ID (cprule_…).
fqdnstring or null
zonestring or null
proxyobject
enabledboolean
modestring
One of always, smart, off.
priorityinteger
0 to 65535.
stateobject
activeboolean
reasonstring or null
createdAtstring or null
updatedAtstring or null
descriptionstring or null
unchangedboolean
Present and true only when POST found a rule for the same hostname and returned it instead of creating a second one.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is cdn_zone_not_found.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.