Appearance
Bot mitigation API Since v0.1
For the keys, see Bot mitigation policy.
For the base URL, sign-in, roles and error format, see Management API. Except sign-in, a route answers 401 without credentials and 403 when the role is too low.
Routes
Application bot settings
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/apps/{name}/bots | viewer | Returns the bot settings of an application. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/bots | operator | Changes the bot settings. | Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run. |
GET | /v1/apps/{name}/bots/lists/{list} | viewer | Returns one bot list of an application. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/bots/lists/{list} | operator | Replaces one bot list. | Body: items (the whole list; [] removes it), base_version, comment, dry_run. |
PUT | /v1/apps/{name}/bots/pages/{kind} | operator | Sets a bot challenge page. | Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run. |
GET | /v1/apps/{name}/bots/fingerprints | viewer | Lists client fingerprints seen. | none |
GET | /v1/apps/{name}/bots/challenge-keys | viewer | Returns the challenge key status (not the keys). | none |
POST | /v1/apps/{name}/bots/challenge-keys/rotate | operator | Rotates the challenge key. | none |
GET | /v1/apps/{name}/bots/captcha | viewer | Returns CAPTCHA settings (secrets are not returned). | none |
PUT | /v1/apps/{name}/bots/captcha | operator | Sets the CAPTCHA secret. | Body: secret, base_version, comment. |
POST | /v1/apps/{name}/bots/captcha/test | operator | Tests the CAPTCHA provider configuration. | none |
GET | /v1/apps/{name}/bots/logins | viewer | Lists login attempts on watched endpoints. | none |
GET | /v1/apps/{name}/bots/clients | viewer | Lists bot clients seen with their verdicts. | none |
POST | /v1/apps/{name}/bots/clients/trust | operator | Marks a client as trusted. | Body: client, base_version, comment, dry_run. |
Catalog, agents and lists
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/bots/catalog | viewer | Returns the bot catalog. | none |
POST | /v1/bots/classify | viewer | Classifies a sample request against the catalog. | Body: user_agent, ip, app. Response: the matched bot and range result. |
GET | /v1/bots/agents | viewer | Lists AI-agent definitions. | none |
POST | /v1/bots/agents | operator, all applications | Adds an agent definition. | Body: agent, base_version, comment, dry_run. |
DELETE | /v1/bots/agents/{name} | operator, all applications | Removes an agent definition. | none |
GET | /v1/bot-lists | viewer | Lists downloadable bot lists. | none |
PUT | /v1/bot-lists | operator, all applications | Replaces the bot list definitions. | Body: items (the whole list; [] removes it), base_version, comment, dry_run. |
POST | /v1/bot-lists/{name}/refresh | operator, all applications | Downloads a bot list now. | none |
Example
sh
curl -sk -H "Authorization: Bearer waap_EXAMPLE" https://127.0.0.1:9443/v1/apps/shop/bots/clients