API Stats
Do you use the WordPress REST API to serve apps, headless front ends or integrations? API Stats records every REST API request to your site and shows you what is being called, how often, how fast, and what fails. Features Records every REST route: WordPress core, WooCommerce and any other plugin or
Do you use the WordPress REST API to serve apps, headless front ends or integrations? API Stats records every REST API request to your site and shows you what is being called, how often, how fast, and what fails.
Features
- Records every REST route: WordPress core, WooCommerce and any other plugin or custom endpoint
- Requests-over-time chart, broken down by HTTP method or by status (2xx / 3xx / 4xx / 5xx)
- Summary of requests, error rate, average and maximum response time
- Routes table grouped by route pattern (e.g. /wp/v2/posts/(?P<id>[\d]+) ) or by exact path, with error counts and timings
- Quick date ranges (today, yesterday, 7 and 30 days) or any custom range, with minute / hour / day / week resolution
- Filter everything by route (contains or exact), HTTP method and status (e.g. only errors); click a route to drill down
- Configurable data retention, and a button to delete all recorded data
- Developer hooks to skip requests or attach a readable label to them
Stats are under Tools → API Stats . Data is stored in your own database; nothing is sent anywhere.
You can view this project on GitHub .
Screenshots & previews.
Frequently asked questions.
How long is data kept?
30 days by default. Change it under Tools → API Stats → Stored data. Set it to 0 to keep data forever (the page shows how big the table is). Old events are removed hourly. Lowering the number deletes older events right away, after a confirmation that tells you how many; deleted events can’t be restored by raising the number again. Developers can also set it in code: