Schema Learning observes qualifying traffic for selected operations. It learns expected request fields and constraints for a Schema Profile.
-
In the Cloudflare dashboard, go to Web Assets > Operations.
Go to Web assets ↗ -
Open the operation overflow menu and select Learn profile.
-
After the profile becomes available, select View details.
-
Review the learned schema under Security overview.
Cloudflare runs an always-on detection after the learned profile becomes available. The detection does not mitigate requests by itself.
To investigate results, refer to Analyze profile detections. To mitigate violations, refer to Enforce profiles with Custom Rules.
Learning runs weekly using qualifying traffic from the previous seven days. Only requests that received a 2xx response contribute.
The field-learning threshold requires 1,000 qualifying requests. The boundary-learning threshold requires 10,000 qualifying requests.
The first profile appears after the next weekly learning run. This can take up to seven days after meeting the relevant threshold.
For supported request components, constraints, and limitations, refer to Schema Profiles.
Export creates a separate OpenAPI file from the current learned profile. It does not change the profile or its detection.
-
In the Cloudflare dashboard, go to the Web Assets page.
Go to Web assets ↗ -
Go to the Operations tab.
-
Select Export schema and choose a hostname to export.
-
Select whether to include learned parameters and rate limit recommendations.
-
Select Export schema and choose a location to save the file.
Exported schemas include the listed hostname in the servers section. They also include operations by hostname, method, and path.
For operations that receive sufficient traffic, exported schemas also include:
- Detected path variables and formats
- Detected query parameters and formats
- Detected
POST,PUT, andPATCHbody variable names and formats forapplication/jsoncontent types
Exported schemas can optionally include API Shield rate limit recommendations.
For a fixed Schema Profile, upload the exported file through Schema validation.