CC settings cc-settings
Platform-level default CC rule group and automatic switching settings; admin only.
Pick an endpoint to see its example call on the right.
Authentication
Send the X-API-Key header (create a key on the API Keys page; the key is shown only once at creation). An Authorization: Bearer token obtained by logging in also works.
X-API-Key
Authentication failures return 401; forbidden returns 403 (code such as insufficient_scope).
Conventions
Paging uses page (from 1) and page_size; sort with sort=field or sort=-field.
Times are RFC 3339 (UTC); amounts are in cents.
Writes return 200/201/204 on success; duplicates of a unique key return 409.
/api/v2/cc-settingsGet CC settings
Authentication: Admin only
/api/v2/cc-settingsUpdate CC settings
Authentication: Admin only
Request body application/json
| Field | Type | Description |
|---|---|---|
auto_switchRequired | CcAutoSwitch | Settings for automatically switching to a stricter CC rule group. |
default_page_rule_id | integer | Platform CC rule group id used by the default page (requests to unbound domains); null or omitted = no protection. |
default_rule_idRequired | integer | Platform CC rule group id used when a site has not chosen one; null = node default. |
expected_updated_at | string | Optimistic lock - the updated_at as the caller read it (the version of the node.global config key, shared by CC and WAF settings; use 1970-01-01T00:00:00Z when the read value is null). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check. |
updated_at | string | Version in the response (updated_at of the node.global config key; null if never changed); ignored on update - use expected_updated_at for the optimistic lock. |
CC settings object
| Field | Type | Description |
|---|---|---|
auto_switch | CcAutoSwitch | Settings for automatically switching to a stricter CC rule group. |
default_page_rule_id | integer | Platform CC rule group id used by the default page (requests to unbound domains); null or omitted = no protection. |
default_rule_id | integer | Platform CC rule group id used when a site has not chosen one; null = node default. |
expected_updated_at | string | Optimistic lock - the updated_at as the caller read it (the version of the node.global config key, shared by CC and WAF settings; use 1970-01-01T00:00:00Z when the read value is null). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check. |
updated_at | string | Version in the response (updated_at of the node.global config key; null if never changed); ignored on update - use expected_updated_at for the optimistic lock. |
Responses and errors
Success returns the resource JSON directly (HTTP 2xx); failures return application/problem+json (code, detail, plus errors on validation failures); lists carry items + total.
{
"id": 1,
"name": "example"
}{
"items": [
{
"id": 1
}
],
"page": 1,
"page_size": 20,
"total": 1
}{
"code": "validation_failed",
"detail": "Invalid request parameters",
"errors": [
{
"code": "required",
"field": "/name",
"message": "name is required"
}
],
"request_id": "0123456789abcdef",
"status": 422,
"title": "Unprocessable Entity",
"type": "about:blank"
}