Skip to content
Start here

Schema Validation

Schema ValidationSchemas

List all uploaded schemas
schema_validation.schemas.list(SchemaListParams**kwargs) -> SyncV4PagePaginationArray[PublicSchema]
GET/zones/{zone_id}/schema_validation/schemas
Get details of a schema
schema_validation.schemas.get(strschema_id, SchemaGetParams**kwargs) -> PublicSchema
GET/zones/{zone_id}/schema_validation/schemas/{schema_id}
Upload a schema
schema_validation.schemas.create(SchemaCreateParams**kwargs) -> PublicSchema
POST/zones/{zone_id}/schema_validation/schemas
Edit details of a schema to enable validation
schema_validation.schemas.edit(strschema_id, SchemaEditParams**kwargs) -> PublicSchema
PATCH/zones/{zone_id}/schema_validation/schemas/{schema_id}
Delete a schema
schema_validation.schemas.delete(strschema_id, SchemaDeleteParams**kwargs) -> SchemaDeleteResponse
DELETE/zones/{zone_id}/schema_validation/schemas/{schema_id}
ModelsExpand Collapse
class PublicSchema:

A schema used in schema validation

created_at: datetime
formatdate-time
kind: Literal["openapi_v3"]

The kind of the schema

name: str

A human-readable name for the schema

schema_id: str

A unique identifier of this schema

maxLength36
minLength36
formatuuid
source: str

The raw schema, e.g., the OpenAPI schema, either as JSON or YAML

validation_enabled: Optional[bool]

An indicator if this schema is enabled

class SchemaDeleteResponse:
id: str

The ID of the schema that was just deleted

formatuuid

Schema ValidationSettings

Get global schema validation settings
schema_validation.settings.get(SettingGetParams**kwargs) -> SettingGetResponse
GET/zones/{zone_id}/schema_validation/settings
Update global schema validation settings
schema_validation.settings.update(SettingUpdateParams**kwargs) -> SettingUpdateResponse
PUT/zones/{zone_id}/schema_validation/settings
Edit global schema validation settings
schema_validation.settings.edit(SettingEditParams**kwargs) -> SettingEditResponse
PATCH/zones/{zone_id}/schema_validation/settings
ModelsExpand Collapse
class SettingGetResponse:
validation_default_mitigation_action: Literal["none", "log", "block"]

The default mitigation action used

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
  • none - skip running schema validation
One of the following:
"none"
"log"
"block"
validation_override_mitigation_action: Optional[Literal["none"]]

When not null, this overrides global both zone level and operation level mitigation actions. This can serve as a quick way to disable schema validation for the whole zone.

  • "none" will skip running schema validation entirely for the request
class SettingUpdateResponse:
validation_default_mitigation_action: Literal["none", "log", "block"]

The default mitigation action used

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
  • none - skip running schema validation
One of the following:
"none"
"log"
"block"
validation_override_mitigation_action: Optional[Literal["none"]]

When not null, this overrides global both zone level and operation level mitigation actions. This can serve as a quick way to disable schema validation for the whole zone.

  • "none" will skip running schema validation entirely for the request
class SettingEditResponse:
validation_default_mitigation_action: Literal["none", "log", "block"]

The default mitigation action used

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
  • none - skip running schema validation
One of the following:
"none"
"log"
"block"
validation_override_mitigation_action: Optional[Literal["none"]]

When not null, this overrides global both zone level and operation level mitigation actions. This can serve as a quick way to disable schema validation for the whole zone.

  • "none" will skip running schema validation entirely for the request

Schema ValidationSettingsOperations

List per-operation schema validation settings
schema_validation.settings.operations.list(OperationListParams**kwargs) -> SyncV4PagePaginationArray[OperationListResponse]
GET/zones/{zone_id}/schema_validation/settings/operations
Get per-operation schema validation setting
schema_validation.settings.operations.get(stroperation_id, OperationGetParams**kwargs) -> OperationGetResponse
GET/zones/{zone_id}/schema_validation/settings/operations/{operation_id}
Update per-operation schema validation setting
schema_validation.settings.operations.update(stroperation_id, OperationUpdateParams**kwargs) -> OperationUpdateResponse
PUT/zones/{zone_id}/schema_validation/settings/operations/{operation_id}
Bulk edit per-operation schema validation settings
schema_validation.settings.operations.bulk_edit(OperationBulkEditParams**kwargs) -> OperationBulkEditResponse
PATCH/zones/{zone_id}/schema_validation/settings/operations
Delete per-operation schema validation setting
schema_validation.settings.operations.delete(stroperation_id, OperationDeleteParams**kwargs) -> OperationDeleteResponse
DELETE/zones/{zone_id}/schema_validation/settings/operations/{operation_id}
ModelsExpand Collapse
class OperationListResponse:
mitigation_action: Literal["log", "block", "none"]

When set, this applies a mitigation action to this operation which supersedes a global schema validation setting just for this operation

  • "log" - log request when request does not conform to schema for this operation
  • "block" - deny access to the site when request does not conform to schema for this operation
  • "none" - will skip mitigation for this operation
One of the following:
"log"
"block"
"none"
operation_id: str

UUID.

maxLength36
minLength36
class OperationGetResponse:
mitigation_action: Literal["log", "block", "none"]

When set, this applies a mitigation action to this operation which supersedes a global schema validation setting just for this operation

  • "log" - log request when request does not conform to schema for this operation
  • "block" - deny access to the site when request does not conform to schema for this operation
  • "none" - will skip mitigation for this operation
One of the following:
"log"
"block"
"none"
operation_id: str

UUID.

maxLength36
minLength36
class OperationUpdateResponse:
mitigation_action: Literal["log", "block", "none"]

When set, this applies a mitigation action to this operation which supersedes a global schema validation setting just for this operation

  • "log" - log request when request does not conform to schema for this operation
  • "block" - deny access to the site when request does not conform to schema for this operation
  • "none" - will skip mitigation for this operation
One of the following:
"log"
"block"
"none"
operation_id: str

UUID.

maxLength36
minLength36
Dict[str, OperationBulkEditResponseItem]

Operation ID to per operation setting mapping

mitigation_action: Literal["log", "block", "none"]

When set, this applies a mitigation action to this operation which supersedes a global schema validation setting just for this operation

  • "log" - log request when request does not conform to schema for this operation
  • "block" - deny access to the site when request does not conform to schema for this operation
  • "none" - will skip mitigation for this operation
One of the following:
"log"
"block"
"none"
operation_id: str

UUID.

maxLength36
minLength36
class OperationDeleteResponse:
operation_id: Optional[str]

UUID.

maxLength36
minLength36