operations
Creates, updates, deletes, gets or lists an operations resource.
Overview
| Name | operations |
| Type | Resource |
| Id | cloudflare.schema_validation.operations |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
operation_id | string | UUID. (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415) |
mitigation_action | string | 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 (log, block, none) (example: block) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | zone_id, operation_id | Retrieves the schema validation settings configured for a specific API operation. | |
bulk_edit | update | zone_id | Updates schema validation settings for multiple API operations in a single request. Efficient for applying consistent validation rules across endpoints. | |
update | replace | zone_id, operation_id | Fully updates schema validation settings for a specific API operation. | |
delete | delete | zone_id, operation_id | Removes custom schema validation settings for a specific API operation, reverting to zone-level defaults. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
operation_id | string | Identifier for the operation |
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- get
Retrieves the schema validation settings configured for a specific API operation.
SELECT
operation_id,
mitigation_action
FROM cloudflare.schema_validation.operations
WHERE zone_id = '{{ zone_id }}' -- required
AND operation_id = '{{ operation_id }}' -- required
;
UPDATE examples
- bulk_edit
Updates schema validation settings for multiple API operations in a single request. Efficient for applying consistent validation rules across endpoints.
UPDATE cloudflare.schema_validation.operations
SET
-- No updatable properties
WHERE
zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
success;
REPLACE examples
- update
Fully updates schema validation settings for a specific API operation.
REPLACE cloudflare.schema_validation.operations
SET
mitigation_action = '{{ mitigation_action }}'
WHERE
zone_id = '{{ zone_id }}' --required
AND operation_id = '{{ operation_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Removes custom schema validation settings for a specific API operation, reverting to zone-level defaults.
DELETE FROM cloudflare.schema_validation.operations
WHERE zone_id = '{{ zone_id }}' --required
AND operation_id = '{{ operation_id }}' --required
;