Last updated: April 29, 2026
Why this module. APIs generate massive log volume; most teams collect it and never query it. Anomaly detection at the API layer catches account takeover, scraping, and business-logic abuse that WAFs miss.
What to log per API call
- Timestamp, request ID
- Authenticated user / API key
- Source IP, ASN, country
- Method + path + query params (sanitised — strip PII / tokens)
- Response status code, latency, body size
- Authorization decision (allowed / denied)
The three layers of anomaly detection
- Volume — endpoint X is normally hit 100/hr; suddenly 10K/hr
- Behaviour — user normally hits 5 endpoints; suddenly 50 different endpoints in 5 minutes
- Business logic — user normally checks balance once a day; suddenly 200 transfer attempts
Useful detections
- Account enumeration — POST /api/login with many usernames returning 401
- IDOR scanning — same endpoint with sequential IDs (/users/1, /users/2, /users/3…)
- Token reuse anomaly — same JWT seen from 2 IPs simultaneously
- Permission probing — many 403s from one source = mapping privilege model
- Data scraping — sustained read of large data with consistent pacing
Tools
- Salt Security, Noname, Wallarm, Traceable, 42Crunch — purpose-built for API anomaly
- Datadog APM + Cloud SIEM — if already on Datadog
- Splunk / Elastic — DIY; flexible
The tuning curve
Expect 60-90 days to tune baselines. New deployments shift behaviour; major releases. The right metric: 80%+ of anomalies caught are real.
Defender’s checklist
- API logs centralised; PII redacted.
- Per-endpoint baseline computed.
- Top 10 detections deployed and tuned.
- Integration with SOAR for response automation.
Module Quiz · 6 questions
Pass with 80%+ to mark this module complete. Unlimited retries. Each question shows an explanation.
Custom team training + practitioner advisory
Beyond the free academy — we run private workshops, vCISO advisory, and red-team exercises tailored to your stack. For Indian SMBs scaling past their first hire.