hosting

PUT /v1/sites/{siteId}/cdn/firewall-rules

Replace a site's custom edge firewall rules.

Tutti gli endpoint hosting

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione hosting.cdn.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/cdn/firewall-rules \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "rules": <object[]> }'

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

**Convergent and whole-list.** The body is the complete ordered rule set and the provider is made to match it exactly, including removing what is gone. A client must send back every rule it was shown — `foreign` ones included — because sending a subset deletes the rest. **Order is the security property, not presentation.** Cloudflare's custom-rules phase is terminating: the first matching rule decides and no later rule runs, so reordering the list changes which rule wins. Requires `hosting.cdn.manage`. A provider without custom rules is a `422` with code `UNSUPPORTED_BY_PROVIDER`.

Parametri

NomeTipoObbligatorioChe cos'è
siteId (path)UuidSite ID (UUIDv7).

Corpo della richiesta

NomeTipoObbligatorioChe cos'è
rulesobject[]

Risposta

NomeTipoObbligatorioChe cos'è
supportedboolean
rulesCdnFirewallRule[]In evaluation order. The provider's custom-rules phase is terminating — the first match decides.

Errori che questo endpoint può restituire

401 · 403 · 404 · 422 · 429 · 503