API
The DebugHawk API lets you pull performance data into your own tools and workflows. Build custom reports, integrate with your CI/CD pipeline, or feed data into your existing monitoring stack.
The API is currently in beta. While we don't expect breaking changes, we recommend checking the API reference for the latest details.
What you can do with the API
The API gives you read access to the same data you see in your DebugHawk dashboard. Some common uses:
- Client reports: pull Core Web Vitals and backend timings for each WordPress site into a monthly report for your clients.
- Agency dashboards: combine data from all your sites with uptime, hosting or billing data in a tool you already use.
- CI/CD checks: after a deployment, fetch recent pageviews and compare them with the previous release to catch regressions early.
Metrics come from real visitors, captured by the DebugHawk WordPress plugin. If you haven't set up a site yet, start with the introduction. To understand how values such as P75 are calculated, see data aggregation.
Create API token
To create an API token, navigate to your account settings and click "API". Provide a name for the token and click "Save".
Treat your token like a password. Anyone with the token can read performance data for your teams.
Available data
The API is organized around teams and the WordPress sites within them. You can list your teams and sites, and for each site retrieve:
- Pages: the URLs DebugHawk has seen on the site
- Pageviews: individual pageviews with frontend and backend metrics
- Slow queries: database queries that exceeded your slow query threshold
- Outgoing requests: HTTP requests made by WordPress while generating a page
Example request
Send your token as a bearer token in the Authorization header. This request lists the teams your token can access:
curl https://eu.debughawk.com/api/v1/teams \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
API reference
For authentication, available endpoints, rate limits, and response formats, see the API reference.