Search + K

Command Palette

Search for a command to run...

Sign In

Update zone level schema validation settings

Deprecated
PUT /zones/{zone_id}/api_gateway/settings/schema_validation
Copy endpoint
https://api.cloudflare.com/client/v4

Updates zone level schema validation settings on the zone

Parameters

path Path Parameters

Name Type
zone_id required
type ApiShieldSchemasIdentifier = type ApiShieldIdentifier = string & string

Request Body

application/json required
interface ApiShieldZoneSchemaValidationSettingsPut {
validation_default_mitigation_action: ApiShieldValidationDefaultMitigationAction

The default mitigation action used when there is no mitigation action defined on the operation

Mitigation actions are as follows:

  • log - log request when request does not conform to schema
  • block - deny access to the site when request does not conform to schema

A special value of of none will skip running schema validation entirely for the request when there is no mitigation action defined on the operation

type ApiShieldValidationDefaultMitigationAction = "none" | "log" | "block"
;
validation_override_mitigation_action?: ApiShieldValidationOverrideMitigationActionWrite

When set, this overrides both zone level and operation level mitigation actions.

  • none will skip running schema validation entirely for the request
  • null indicates that no override is in place

To clear any override, use the special value disable_override or null

type ApiShieldValidationOverrideMitigationActionWrite = "none" | "disable_override" | null
;
}

Responses

200 application/json

Update zone level schema validation settings response

interface ApiShieldZoneSchemaValidationSettings {
validation_default_mitigation_action?: ApiShieldValidationDefaultMitigationAction

The default mitigation action used when there is no mitigation action defined on the operation

Mitigation actions are as follows:

  • log - log request when request does not conform to schema
  • block - deny access to the site when request does not conform to schema

A special value of of none will skip running schema validation entirely for the request when there is no mitigation action defined on the operation

type ApiShieldValidationDefaultMitigationAction = "none" | "log" | "block"
;
validation_override_mitigation_action?: ApiShieldValidationOverrideMitigationAction

When set, this overrides both zone level and operation level mitigation actions.

  • none will skip running schema validation entirely for the request
  • null indicates that no override is in place
type ApiShieldValidationOverrideMitigationAction = "none" | null
;
}

Client Errors

4XX application/json

Update zone level schema validation settings response failure

interface ApiShieldApiResponseCommonFailure {
errors: ApiShieldMessages
type ApiShieldMessages = {
code: number;
documentation_url?: string;
message: string;
source?: { pointer?: string; };
}
[]
;
messages: ApiShieldMessages
type ApiShieldMessages = {
code: number;
documentation_url?: string;
message: string;
source?: { pointer?: string; };
}
[]
;
result: null;
success: false;
}