API reference

/v1/security-policies

21 operations · 21 support API keys

← All groups · First call? Read the tutorial: auth, permissions, requests and responses, common failures

MethodPathSummaryAuth
GET/v1/security-policiesList tenant WAF, CC and ACL policiesAPI keySession
POST/v1/security-policiesCreate a versioned WAF, CC or ACL policyAPI keySession
POST/v1/security-policies/batchEnable, disable or delete selected WAF rule libraries item by itemAPI keySession
GET/v1/security-policies/filtersList persisted CC filtersAPI keySession
POST/v1/security-policies/filtersCreate a versioned CC filterAPI keySession
GET/v1/security-policies/filters/{id}Get one CC filterAPI keySession
PATCH/v1/security-policies/filters/{id}Replace a CC filter using optimistic concurrencyAPI keySession
DELETE/v1/security-policies/filters/{id}Soft-delete a CC filterAPI keySession
POST/v1/security-policies/filters/{id}/disableDisable a CC filterAPI keySession
POST/v1/security-policies/filters/{id}/enableEnable a CC filterAPI keySession
GET/v1/security-policies/matchersList persisted CC matchersAPI keySession
POST/v1/security-policies/matchersCreate a versioned CC matcherAPI keySession
GET/v1/security-policies/matchers/{id}Get one CC matcherAPI keySession
PATCH/v1/security-policies/matchers/{id}Replace a CC matcher using optimistic concurrencyAPI keySession
DELETE/v1/security-policies/matchers/{id}Soft-delete a CC matcherAPI keySession
POST/v1/security-policies/matchers/{id}/disableDisable a CC matcherAPI keySession
POST/v1/security-policies/matchers/{id}/enableEnable a CC matcherAPI keySession
GET/v1/security-policies/{id}Get one active WAF, CC or ACL policyAPI keySession
PATCH/v1/security-policies/{id}Replace policy fields using optimistic concurrencyAPI keySession
DELETE/v1/security-policies/{id}Soft-delete a policy using optimistic concurrencyAPI keySession
POST/v1/security-policies/{id}/evaluatePreview deterministic policy evaluationAPI keySession

Contract file:api/openapi/v1/control.yaml

Operation details

GET /v1/security-policies

List tenant WAF, CC and ACL policies

operationId
listSecurityPolicies
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.read

Description (from the contract)

Requires security_policies.read. Tenant identities see only their active scope and never receive owner metadata; platform identities may filter across tenant owners.

Parameters

listSecurityPolicies Parameters
NameInTypeRequiredDescription
pagequeryintegerNo—
limitqueryintegerNo—
kindquerystring: waf / cc / aclNoPolicy kind; omit for all kinds.
statusquerystring: enabled / disabledNo—
namequerystringNo—
idquerystring(uuid)NoExact canonical security policy UUID filter.
ownerquerystringNoPlatform-only owner name, username, or exact UUID filter.
scopequerystring: global / site / systemNoWAF rule libraries only: requires kind=waf (400 otherwise). system: subscribed platform rule library copies; site: own libraries bound to a site; global: own libraries no site is bound to. Total and counts follow the filter.

Responses

listSecurityPolicies Responses
StatusDescription
200Stable page ordered newest first.

Fields:items: array<SecurityPolicy> total: integer(int64) page: integer limit: integer

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

POST /v1/security-policies

Create a versioned WAF, CC or ACL policy

operationId
createSecurityPolicy
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Description (from the contract)

Requires security_policies.manage. Platform identities must provide an active tenant target_scope_id and owner_id; tenant identities are fixed to their current scope and identity. Rule IDs are server-generated and identical idempotent replay returns the original IDs. This control-plane slice does not claim edge publication or enforcement.

Parameters

createSecurityPolicy Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringYes—

Request body

application/json · Required:Yes

createSecurityPolicy Request body
NameTypeRequiredDescription
kindstring: waf / cc / aclYeswaf = WAF rule library, cc = CC protection, acl = access control.
namestringYes—
descriptionstringYes—
enabledbooleanYes—
default_actionstring: allow / blockYes—
rulesarray<SecurityPolicyRuleInput>Yes—
cc_settingsSecurityPolicyCCSettingsNoCC only. Site-level ban/pass durations (override every rule's) and the auto switch (自动切换). Omitted keeps the rules' own values.
waf_settingsSecurityPolicyWAFSettingsNoWAF only (node CAPABILITY_NAME_WAF v2). Omitted (or defend mode without auto_block) is stored as absent.
target_scope_idstring(uuid)No—
owner_idstring(uuid)No—

Responses

createSecurityPolicy Responses
StatusDescription
201Policy and immutable revision-one snapshot created, or an identical request replayed.

Fields:kind: string: waf / cc / acl name: string description: string enabled: boolean default_action: string: allow / block rules: array<SecurityPolicyRuleInput> cc_settings?: SecurityPolicyCCSettings waf_settings?: SecurityPolicyWAFSettings id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null version: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
409The requested state conflicts with an existing resource or idempotency fact.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

POST /v1/security-policies/batch

Enable, disable or delete selected WAF rule libraries item by item

operationId
batchSecurityPolicies
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Description (from the contract)

Requires security_policies.manage. Each item is written on its own with a version check (CAS) under an item key derived from Idempotency-Key, so retrying the same batch replays written items. Results come back in request order, one per item; refusals (version conflict, system library, not found, in use, ...) are item results and do not stop the batch. A store failure marks that item error and the rest not_attempted. System (platform) libraries are never modified.

Parameters

batchSecurityPolicies Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringYes—

Request body

application/json · Required:Yes

batchSecurityPolicies Request body
NameTypeRequiredDescription
actionstring: enable / disable / deleteYes—
itemsarray<object>Yes—

Responses

batchSecurityPolicies Responses
StatusDescription
200One result per item, in request order.

Fields:items: array<object>

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

GET /v1/security-policies/filters

List persisted CC filters

operationId
listSecurityPolicyFilters
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.read

Description (from the contract)

Requires security_policies.read. Rows created before the filter resource was introduced are materialized from real CC rule actions; newly created rows are independent versioned resources. Tenant identities see only their active scope and never receive owner metadata.

Parameters

listSecurityPolicyFilters Parameters
NameInTypeRequiredDescription
pagequeryintegerNo—
limitqueryintegerNo—
statusquerystring: enabled / disabledNo—
typequerystringNo—
namequerystringNo—
idquerystring(uuid)No—
ownerquerystringNoPlatform-only owner filter.

Responses

listSecurityPolicyFilters Responses
StatusDescription
200Filter rows projected deterministically from real CC rule actions.

Fields:items: array<SecurityPolicyReference> total: integer page: integer limit: integer

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

POST /v1/security-policies/filters

Create a versioned CC filter

operationId
createSecurityPolicyFilter
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Description (from the contract)

Requires security_policies.manage. Platform identities must provide target_scope_id and owner_id; tenant identities are fixed to their current scope.

Parameters

createSecurityPolicyFilter Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringYes—

Request body

application/json · Required:Yes

createSecurityPolicyFilter Request body
NameTypeRequiredDescription
namestringYes—
descriptionstringYes—
enabledbooleanYes—
typestringYes—
parametersobjectYes—
target_scope_idstring(uuid)No—
owner_idstring(uuid)No—

Responses

createSecurityPolicyFilter Responses
StatusDescription
201—

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

GET /v1/security-policies/filters/{id}

Get one CC filter

operationId
getSecurityPolicyFilter
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.read

Parameters

getSecurityPolicyFilter Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—

Responses

getSecurityPolicyFilter Responses
StatusDescription
200—

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.

↑ Back to list

PATCH /v1/security-policies/filters/{id}

Replace a CC filter using optimistic concurrency

operationId
updateSecurityPolicyFilter
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

updateSecurityPolicyFilter Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Request body

application/json · Required:Yes

updateSecurityPolicyFilter Request body
NameTypeRequiredDescription
namestringYes—
descriptionstringYes—
enabledbooleanYes—
typestringYes—
parametersobjectYes—

Responses

updateSecurityPolicyFilter Responses
StatusDescription
200—

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

DELETE /v1/security-policies/filters/{id}

Soft-delete a CC filter

operationId
deleteSecurityPolicyFilter
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

deleteSecurityPolicyFilter Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Responses

deleteSecurityPolicyFilter Responses
StatusDescription
204Filter deleted
400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

POST /v1/security-policies/filters/{id}/disable

Disable a CC filter

operationId
disableSecurityPolicyFilter
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

disableSecurityPolicyFilter Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Responses

disableSecurityPolicyFilter Responses
StatusDescription
200Filter disabled.

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

POST /v1/security-policies/filters/{id}/enable

Enable a CC filter

operationId
enableSecurityPolicyFilter
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

enableSecurityPolicyFilter Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Responses

enableSecurityPolicyFilter Responses
StatusDescription
200Filter enabled.

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

GET /v1/security-policies/matchers

List persisted CC matchers

operationId
listSecurityPolicyMatchers
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.read

Description (from the contract)

Requires security_policies.read. Rows created before the matcher resource was introduced are materialized from the existing CC rules; newly created rows are independent versioned resources. Tenant identities see only their active scope and never receive owner metadata.

Parameters

listSecurityPolicyMatchers Parameters
NameInTypeRequiredDescription
pagequeryintegerNo—
limitqueryintegerNo—
statusquerystring: enabled / disabledNo—
namequerystringNo—
idquerystring(uuid)No—
ownerquerystringNoPlatform-only owner filter.

Responses

listSecurityPolicyMatchers Responses
StatusDescription
200Matcher rows projected deterministically from real CC policy conditions.

Fields:items: array<SecurityPolicyReference> total: integer page: integer limit: integer

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

POST /v1/security-policies/matchers

Create a versioned CC matcher

operationId
createSecurityPolicyMatcher
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Description (from the contract)

Requires security_policies.manage. Platform identities must provide target_scope_id and owner_id; tenant identities are fixed to their current scope.

Parameters

createSecurityPolicyMatcher Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringYes—

Request body

application/json · Required:Yes

createSecurityPolicyMatcher Request body
NameTypeRequiredDescription
namestringYes—
descriptionstringYes—
enabledbooleanYes—
fieldstringYes—
operatorstringYes—
keystringNo—
valuesarray<string>Yes—
target_scope_idstring(uuid)No—
owner_idstring(uuid)No—

Responses

createSecurityPolicyMatcher Responses
StatusDescription
201Matcher created with revision one, or an identical request replayed.

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
409The requested state conflicts with an existing resource or idempotency fact.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

GET /v1/security-policies/matchers/{id}

Get one CC matcher

operationId
getSecurityPolicyMatcher
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.read

Parameters

getSecurityPolicyMatcher Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—

Responses

getSecurityPolicyMatcher Responses
StatusDescription
200—

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.

↑ Back to list

PATCH /v1/security-policies/matchers/{id}

Replace a CC matcher using optimistic concurrency

operationId
updateSecurityPolicyMatcher
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

updateSecurityPolicyMatcher Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Request body

application/json · Required:Yes

updateSecurityPolicyMatcher Request body
NameTypeRequiredDescription
namestringYes—
descriptionstringYes—
enabledbooleanYes—
fieldstringYes—
operatorstringYes—
keystringNo—
valuesarray<string>Yes—

Responses

updateSecurityPolicyMatcher Responses
StatusDescription
200—

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

DELETE /v1/security-policies/matchers/{id}

Soft-delete a CC matcher

operationId
deleteSecurityPolicyMatcher
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

deleteSecurityPolicyMatcher Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Responses

deleteSecurityPolicyMatcher Responses
StatusDescription
204Matcher deleted
400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

POST /v1/security-policies/matchers/{id}/disable

Disable a CC matcher

operationId
disableSecurityPolicyMatcher
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

disableSecurityPolicyMatcher Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Responses

disableSecurityPolicyMatcher Responses
StatusDescription
200Matcher disabled.

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

POST /v1/security-policies/matchers/{id}/enable

Enable a CC matcher

operationId
enableSecurityPolicyMatcher
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

enableSecurityPolicyMatcher Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Responses

enableSecurityPolicyMatcher Responses
StatusDescription
200Matcher enabled.

Fields:id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null name: string system_rule: boolean system_rule_id?: string system_rule_key?: string status: string: enabled / disabled type?: string sort?: integer created_at: string(date-time) updated_at?: string(date-time) description?: string version: integer(int64) policy_id?: string(uuid) rule_id?: string(uuid) field?: string operator?: string key?: string values?: array<string> parameters?: object

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

GET /v1/security-policies/{id}

Get one active WAF, CC or ACL policy

operationId
getSecurityPolicy
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.read

Parameters

getSecurityPolicy Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—

Responses

getSecurityPolicy Responses
StatusDescription
200Current policy projection. Owner is omitted for tenant identities.

Fields:kind: string: waf / cc / acl name: string description: string enabled: boolean default_action: string: allow / block rules: array<SecurityPolicyRuleInput> cc_settings?: SecurityPolicyCCSettings waf_settings?: SecurityPolicyWAFSettings id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null version: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

PATCH /v1/security-policies/{id}

Replace policy fields using optimistic concurrency

operationId
updateSecurityPolicy
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Description (from the contract)

Requires security_policies.manage. Existing rule IDs must belong to this policy; omitted IDs create new rules. A successful update appends one immutable revision snapshot.

Parameters

updateSecurityPolicy Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Request body

application/json · Required:Yes

updateSecurityPolicy Request body
NameTypeRequiredDescription
kindstring: waf / cc / aclYeswaf = WAF rule library, cc = CC protection, acl = access control.
namestringYes—
descriptionstringYes—
enabledbooleanYes—
default_actionstring: allow / blockYes—
rulesarray<SecurityPolicyRuleInput>Yes—
cc_settingsSecurityPolicyCCSettingsNoCC only. Site-level ban/pass durations (override every rule's) and the auto switch (自动切换). Omitted keeps the rules' own values.
waf_settingsSecurityPolicyWAFSettingsNoWAF only (node CAPABILITY_NAME_WAF v2). Omitted (or defend mode without auto_block) is stored as absent.

Responses

updateSecurityPolicy Responses
StatusDescription
200Policy replaced and version incremented, or an identical request replayed.

Fields:kind: string: waf / cc / acl name: string description: string enabled: boolean default_action: string: allow / block rules: array<SecurityPolicyRuleInput> cc_settings?: SecurityPolicyCCSettings waf_settings?: SecurityPolicyWAFSettings id: string(uuid) scope_id: string(uuid) owner?: SecurityPolicyOwner | null version: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

DELETE /v1/security-policies/{id}

Soft-delete a policy using optimistic concurrency

operationId
deleteSecurityPolicy
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.manage

Parameters

deleteSecurityPolicy Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Responses

deleteSecurityPolicy Responses
StatusDescription
204Policy soft-deleted, or an identical request replayed.
400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

POST /v1/security-policies/{id}/evaluate

Preview deterministic policy evaluation

operationId
evaluateSecurityPolicy
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

All of:security_policies.read

Description (from the contract)

Requires security_policies.read and an exact If-Match version. Conditions within a rule are ANDed; rules are ordered by ascending priority and UUID. continue preserves the current decision while evaluation continues, stop returns the terminal decision, and the policy default applies only when no rule matches. Preview does not publish configuration or prove edge enforcement.

Parameters

evaluateSecurityPolicy Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
If-MatchheaderstringYes—

Request body

application/json · Required:Yes

evaluateSecurityPolicy Request body
NameTypeRequiredDescription
client_ipany | anyYes—
hoststringYes—
pathstringYes—
methodstringYes—
headersobjectYesHeader names are case-insensitive; arrays preserve repeated field values. Scalar values remain accepted for legacy clients.
countrystringYes—
asnintegerYes—
ja4stringYes—
portintegerYes—
distinct_user_agentsintegerYes—
status_404_countintegerYes—

Responses

evaluateSecurityPolicy Responses
StatusDescription
200Deterministic preview result for the requested policy version.

Fields:policy_id: string(uuid) policy_version: integer(int64) action: string: allow / block / rate_limit / challenge / log / ban matched_rule_ids: array<string(uuid)> terminal_rule_id?: string(uuid) used_default: boolean

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list