Last update:2026-08-21 17:58:39
Reading time: About 6 minutes
Prerequisites: The hostname has been onboarded, and the Bot Management master switch is enabled.
Workflow Detection is a proactive defense feature built around business logic. Its core principle is that normal users inevitably follow a certain behavioral pattern. By analyzing the number of requests a client makes within a given time window and the distribution characteristics of the resources it requests (for example, whether it accesses a single API in isolation, or whether the ratio of static-to-dynamic resource requests is abnormal), the system precisely identifies and blocks abnormal Bot behavior that bypasses the frontend page and calls core APIs directly through a script.
Workflow Detection addresses the following problem: to reduce cost and avoid detection, advanced Bots often use low-frequency, distributed attack techniques, which causes traditional rate limiting to become ineffective. Normal user behavior, however, follows a logically coherent sequence that Bots typically cannot fully replicate.
Normal user behavior: When a real user visits a web page through a browser, the browser automatically loads a large number of static resources (.js, .css, images, and so on) along with a small number of dynamic API calls. As a result, the types of resources requested are broadly distributed, and the ratio of GET/POST requests falls within a reasonable range.
Bot behavior: Bots typically do not need to render the full page — they usually request only the dynamic APIs, so the proportion of static resource requests is extremely low, and in some cases every request is a POST request.
Detection mechanism: The system tracks the total request volume, GET/POST request volume, and the proportion of requests for different resource types within a statistical period. If a client’s proportion of dynamic requests is abnormally high, or its GET/POST ratio is severely skewed, the system flags it as a Bot and blocks it.
Normal user behavior: When a real user performs a business action (such as booking a ticket), it triggers a series of related API calls. Over a given period, this includes both calls to the query API and calls to the order-placement API.
Bot behavior: To maximize efficiency, Bots typically run a hardcoded script that calls the core order-placement API in isolation, without going through the related calls.
Detection mechanism: The system analyzes the total number of requests a client makes within a statistical period, or the number of requests to other related URLs. If a client repeatedly calls the “place order” API at a high frequency but has made zero calls to the “query” API, the system flags this as an isolated, illegitimate call and blocks it.
| Configuration Item | Description |
|---|---|
| Rule Name | An identifiable name for the rule. |
| Protection Target | The target API path or URI to protect (supports exact match or regex). |
| Use Case | Web scenario or API scenario. |
| Trigger Condition | Statistical period + baseline dimension (such as client IP) + request-count condition. |
| Action | Log/Deny/Custom Response. |
Business background: A site administrator wants to protect the core ticket-booking API /booking.do, which is targeted by black-and-grey market operators and is frequently called in bulk directly by scripts.
Defense design: A genuine visitor always calls the preceding CAPTCHA-retrieval API /get_verification before calling /booking.do. If, within a 300-second window, an IP calls the booking API directly without ever having called the CAPTCHA API, the system treats this as an illegitimate script and blocks it.
Rule configuration:
/booking.do/get_verification is less than 1/booking.do is greater than or equal to 1Effect: If a visitor calls the booking API directly without ever having requested the CAPTCHA API, the system identifies this as an abnormal script and blocks it.
Recommendation: When configuring this rule for the first time, set the action to Log first. Once you’ve confirmed the rule behaves as expected, switch it to Deny — this avoids mistakenly blocking normal users.