A service's web application firewall (WAF) settings, for all its domains. "log" or "block" turns it on: the WAF starts on the service's cluster with the first service there that turns it on, and stops after the last one turns it off.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonA service's web application firewall (WAF) settings, for all its domains. "log" or "block" turns it on: the WAF starts on the service's cluster with the first service there that turns it on, and stops after the last one turns it off.
API key access: full.
op*"setServiceWaf""setServiceWaf"serviceId*stringmode*string"off" (a new service's), "log" (log only) or "block".
level?integerHow strict, 1 (fewest false alarms) to 4: the Core Rule Set's paranoia level.
int320 <= valueexceptions?array<>Rule ids not applied to this service, e.g. 942100.
threshold?|The inbound anomaly score at which a request is blocked: 5 (the default), 10, 20 or 50.
int320 <= valueDone. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"mode": "off",
"op": "setServiceWaf",
"serviceId": "svc_8kq2x7ad"
}'{}