Schema learning
Cloudflare learns schema parameters via traffic inspection. For all endpoints saved to Endpoint Management, you can export the learned schema in OpenAPI v3.0.0
format by hostname.
To protect your API with a learned schema, refer to Schema validation.
- Log in to the Cloudflare dashboard ↗ and select your account and domain.
- Select Security > API Shield.
- Navigate to Endpoint Management.
- 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.
Learned schemas will always include:
- The listed hostname in the servers section
- All endpoints by host, method, and path
For endpoints that receive sufficient traffic, learned schemas will also include:
- Detected path variables and formats
- Detected query parameters and formats
- Detected
POST
,PUT
, andPATCH
body variable names and formats forapplication/json
content types
Learned schemas can optionally include:
- API Shield's rate limit threshold recommendations
Endpoints must be added for at least 24 hours before schema learning begins. Schema learning is a continuous process that inspects the last 72 hours of traffic to an endpoint.
Schema learning only learns from requests with 2xx
response codes.
Schema learning works best with high volumes of traffic. You may see less confident learned schemas for endpoints with less than 10,000 requests in the last 72 hours.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark