API Endpoint Operations, Schema Profile Detection, and Posture Risk Labels
How Web Assets operations, Schema Profiles from learning or OpenAPI upload, Profile Analysis, labels, and API Shield posture risks fit together.
This page summarizes Cloudflare documentation on API Shield and Web Assets: building an operation inventory, deriving Schema Profiles from traffic or uploaded OpenAPI specs, reviewing detections before enforcement, and reading automatic posture and risk labels on saved endpoints.
Web Assets operations: what counts as an API endpoint
Section titled “Web Assets operations: what counts as an API endpoint”An operation is Cloudflare’s term for an endpoint identified by HTTP method, hostname pattern, and path pattern. In Web Assets, proxied traffic is grouped so requests that serve the same purpose match one operation—for example GET example.com/products/{var1} can match /products/shoes and /products/hats.
An operation is a group of HTTP requests that serve the same purpose in your application. Each operation is defined by: HTTP method, Hostname pattern, Path pattern.
— Cloudflare, Web Assets
Operations enter the inventory from API Discovery (traffic heuristics and ML), manual entry, or an OpenAPI upload used with Schema validation. Discovery and manual creation only add inventory; they do not start schema learning by themselves.
Operation states: candidate, shadow, and full
Section titled “Operation states: candidate, shadow, and full”| State | Meaning |
|---|---|
full |
You saved, added manually, or promoted via Learn profile—used for matching, detections, and rules that need a known endpoint |
candidate |
Discovered from traffic; can still provide operation context for matching and detections before you review |
shadow |
Exists in inventory but is not used for matching, logging, detections, or rules |
You do not need to move every discovered operation to the full state. Candidate operations provide operation context automatically. Profile learning starts only when you select Learn profile.
— Cloudflare, Manage operations
When several patterns could match one request, full operations win over candidate, and the more specific pattern wins (for example an exact path over a {var1} pattern).
API Discovery: when an endpoint appears in the map
Section titled “API Discovery: when an endpoint appears in the map”Discovery needs an active API Shield subscription on the account and zone. Qualifying sampled proxied traffic must:
- Return a 2xx response at the Cloudflare edge
- Not originate directly from a Cloudflare Worker
- Reach at least 500 requests in a continuous 10-day period
Discovery normalizes paths (for example /profile/238 and /profile/392 → /profile/{var1}) and may consolidate similar operations across compatible hostnames.
Schema Profile: positive security without automatic blocking
Section titled “Schema Profile: positive security without automatic blocking”Application Profiles add a positive-security layer: they model what valid requests look like instead of relying only on attack signatures. Today the only profile type is a Schema Profile, which models supported request fields, types, formats, ranges, and values.
Application Profiles define application-specific expectations and classify requests against them. They add a positive-security model to your existing protections.
— Cloudflare, Application Profiles
Schema Learning (learned profile) and Schema Validation (uploaded OpenAPI) both produce the same profile type but different rule fields. After a profile is available, Cloudflare runs always-on detection that classifies traffic—it does not block by itself.
| Source | Detection field in rules and analytics |
|---|---|
| Learned from traffic | cf.schema_validation.learned.violated |
| Uploaded OpenAPI | cf.schema_validation.uploaded.violated |
After the profile becomes available, Cloudflare runs an always-on detection. Detection does not block requests by itself. Review results in Profile Analysis before creating a Custom Rule.
— Cloudflare, Application Profiles
Enforce profiles with Custom Rules is the mitigation step; combine profile violations with signals such as Attack Score or Bot Score when rolling out.
Profile Analysis request statuses: Conforms, Violates, Not evaluated
Section titled “Profile Analysis request statuses: Conforms, Violates, Not evaluated”In Profile Analysis, each request gets one of three statuses:
| Status | Meaning |
|---|---|
| Conforms | Request matched the applicable profile |
| Violates | Request did not match |
| Not evaluated | No applicable profile, or profile does not apply |
A non-conforming request is not necessarily malicious. Releases, new clients, and valid edge cases can produce violations.
— Cloudflare, Analyze profile detections
Filter by cf.schema_validation.learned.violated or cf.schema_validation.uploaded.violated in Security > Analytics before you write blocking rules.
Schema Learning: traffic thresholds and manual runs
Section titled “Schema Learning: traffic thresholds and manual runs”To start learning, open Web Assets > Operations, choose an operation, and select Learn profile. For a candidate or shadow operation, that action also moves it to full.
Learning uses qualifying traffic from the previous seven days—only requests with 2xx responses count:
| Threshold | Qualifying requests | What Cloudflare can learn |
|---|---|---|
| Field learning | 1,000 | Request fields |
| Boundary learning | 10,000 | Constraints (ranges, string lengths, and similar) |
With the weekly schedule, the first profile may appear only after the next weekly run (up to seven days after thresholds are met). You can trigger a zone-wide ad-hoc run from Web Assets > Operations → table More options → Ad-hoc learn schema (Run schema learning on demand).
Schema Validation 2.0: upload OpenAPI without blocking first
Section titled “Schema Validation 2.0: upload OpenAPI without blocking first”Schema validation compares requests to an uploaded OpenAPI v3.0 schema (YAML or JSON). Classic Schema validation is deprecated; new work belongs on Schema validation 2.0 (Classic Schema validation).
Saved operations in Web Assets are required: Schema Validation evaluates requests only for operations in the inventory.
Dashboard vs API rollout pattern
Section titled “Dashboard vs API rollout pattern”Dashboard upload via Web Assets > Schema validation can add operations automatically. The API configuration path is:
POSTupload withvalidation_enabled: false- Add schema operations to Web Assets (
GEToperations withoperation_status=new, thenPOSTtoapi_gateway/operations) PATCHsetvalidation_enabled: true- Send representative traffic, analyze
cf.schema_validation.uploaded.violatedin Profile Analysis - Mitigate with WAF Custom Rules
Operations must exist as saved operations in Web Assets for Schema Validation matching.
— Cloudflare, API configuration
Plan limits affect saved endpoints, enabled schemas, combined schema size, and whether rules may log or block (Plans). Request body inspection for validation has separate per-plan size limits (for example 128 KiB on Enterprise) from general WAF body inspection (Schema validation limitations).
Endpoint labels: use-case context for detections
Section titled “Endpoint labels: use-case context for detections”The Endpoint labeling service attaches managed labels (for example cf-log-in, cf-sign-up, cf-llm, cf-api-endpoint) and user-defined labels. Managed labels tie operations to detections—cf-llm for AI Security for Apps, cf-log-in / cf-sign-up for account abuse and leaked-credential flows (Label operations).
Non-traditional login paths may need the cf-log-in label so detections target the right endpoint (Account Abuse Protection).
Per request, GraphQL Analytics API exposes webAssetsOperationId and up to 10 entries in webAssetsLabelsManaged—empty when no operation matched or no managed labels apply.
API posture and automatic risk labels
Section titled “API posture and automatic risk labels”API Shield security scans saved endpoints about daily and applies risk labels, often mirrored in Security Center Insights:
| Label | Typical meaning |
|---|---|
cf-risk-missing-auth |
All successful (2xx) requests lack a configured session identifier |
cf-risk-mixed-auth |
Some successful requests include the session identifier, some do not |
cf-risk-sensitive |
Sensitive data ruleset matched on responses (subscription required) |
cf-risk-missing-schema |
Learned schema exists but no active uploaded schema |
cf-risk-error-anomaly / cf-risk-latency-anomaly / cf-risk-size-anomaly |
Recent spike in errors, latency, or response size |
cf-risk-bola-enumeration |
Session requests unusually many distinct path-parameter combinations |
cf-risk-bola-pollution |
Same parameter in schema-defined and unexpected locations with different values (<400 responses) |
cf-risk-zombie |
Saved endpoint with 32 days without traffic |
Authentication Posture uses configured session identifiers; it reports presence on successful requests—it does not validate credential correctness. Labels update roughly once per day. Requires Enterprise with API Shield.
BOLA detection: enumeration and parameter pollution
Section titled “BOLA detection: enumeration and parameter pollution”A Broken Object Level Authorization (BOLA) flaw means the API fails to verify access to a specific object (IDs in paths or queries). Cloudflare labels endpoints when it sees enumeration (many distinct path-parameter combinations per session vs peers; enumeration needs roughly >10,000 sessions with a session identifier in the seven-day window) or parameter pollution (conflicting values for the same parameter in expected vs unexpected locations). Investigate via Security Overview, Web Assets endpoint details, or Security Analytics (BOLA vulnerability detection). Hashed session IDs in Cloudflare may not appear in origin logs—cross-check IP and JA4 fingerprint.
Proactive BOLA testing is available to API Shield subscribers via the Vulnerability Scanner API (owner vs attacker credential sets and OpenAPI with response schemas).
Common mistakes when securing API operations
Section titled “Common mistakes when securing API operations”- Blocking on violations immediately — Detection is observe-only until a Custom Rule uses
cf.schema_validation.learned.violatedorcf.schema_validation.uploaded.violated. - Skipping operation inventory — Schema Validation, fallthrough rules, sequence mitigation, and many posture features need saved operations (Sequence mitigation).
- Expecting discovery to learn schemas — Only Learn profile (or uploading OpenAPI) starts Schema Profile evaluation.
- Ignoring false positives in Profile Analysis — Ship cycles and new clients can violate learned or uploaded profiles without being attacks.
- Filtering risk labels in analytics as if label = cause — Filtering by
cf-risk-mixed-authincludes all traffic to labeled endpoints, not only traffic that triggered the label (Endpoint labeling service). - Editing operation identity without updating rules — Operation IDs derive from method, host, and path; edits create a new ID (Endpoint Management).
How to check this on your site
Section titled “How to check this on your site”-
In the Cloudflare dashboard, open Web Assets Operations and confirm critical routes exist as full operations (or acceptable candidate matches). Promote or add missing routes; apply managed labels such as
cf-log-inwhere detections need them (Get started with Web Assets). -
For Schema Profiles, confirm learning or upload status under operation View details → Security overview, or upload OpenAPI under Schema validation with operations saved first (Schema learning, Schema validation).
-
In Security > Analytics, open Profile Analysis (or filter
cf.schema_validation.learned.violated/cf.schema_validation.uploaded.violated) and review conformance trends and sampled violation reasons before any block action (Analyze profile detections). -
Filter Web Assets by posture labels (
cf-risk-missing-auth,cf-risk-bola-enumeration,cf-risk-zombie, and others) and cross-check Authentication Posture widgets or BOLA attack details with your origin authorization logs (Authentication Posture, BOLA vulnerability detection). -
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about so it can be corrected or explained.