Query Edge Pulse measurements with GraphQL
Read the page load measurements that Edge Pulse collects from real visitors, per page and per connection, with the pulseEvents dataset.
You read the measurements that Edge Pulse collects from the browsers of real visitors with GraphQL queries on the pulseEvents dataset, through the Azion API. No page of Azion Console charts them, and the REST API carries no Edge Pulse endpoint. To put the tag on your pages first, refer to Edge Pulse quickstart.
The Real-Time Events GraphQL endpoint, https://api.azion.com/v4/events/graphql, serves pulseEvents. Each record is one measurement, with the address of the page it was taken on and the timings of that page load. A query bounds a time window, groups the records, and applies one aggregate function to a field in each group.
- The query selects the measurements of a time window with
tsRange. - It groups them by a field, such as
locationhref, the address of the page. - It averages one timing field, such as
pageloadtime, inside each group. - The API returns one row per group.
Prerequisites
- Pages that carry the Edge Pulse tag and receive visits. Nothing is collected until a visitor loads a tagged page. For the steps, refer to Edge Pulse quickstart.
- A personal token, sent in the
Authorizationheader under theTokenscheme. ABearerheader returns401. curl, or another HTTP client. To run the same queries in GraphiQL, the editor the endpoint serves to a browser signed in to Azion Console, refer to GraphQL API first steps.
The examples read the day from 2026-10-04T00:00:00 to 2026-10-05T00:00:00 on the site https://www.example.com/. Replace the dates with a window inside the last 7 days, and the address with a page of yours.
Average a timing field per page
A query on pulseEvents needs a time window inside filter, and both bounds use the same timezone. Real-Time Events keeps a record for 7 days, so the window reaches back 7 days at most. Without limit, the API returns 10 rows, so limit: 100 keeps every page of a site with up to 100 tagged addresses. orderBy: [avg_DESC] puts the slowest page first.
To average pageloadtime, the time until the page finished loading, for every tagged page, send the query to the events endpoint:
The endpoint returns HTTP 200. The response carries data.pulseEvents, an array with one object per page address that reported measurements in the window, and each object holds only the fields the query selected: locationhref and avg. A window with no measurements returns an empty array, not an error.
A query without a time window is refused with HTTP 400:
Each tagged page with visits in the window has a row, with the average load time of its measurements. A tagged page with visits and no row is a page where the tag does not run, because the tag reports no error of its own.
Split the load time into its parts
The aggregate argument takes each function at most once per query, and each function takes one field. One query therefore averages one timing field, and each part of the load time is its own query. Add count: rows to the same query to return how many measurements each average covers.
These timing fields take the same query in place of pageloadtime:
| Field | What it holds |
|---|---|
dns | Time spent resolving the name |
tcp | Time spent opening the connection |
ssl | Time spent on the TLS handshake |
ttfb | Time until the first byte of the response arrived |
contentdownload | Time spent downloading the content |
networkduration | Total time the network part of the visit took |
rendertime | Time the browser spent rendering |
To average ttfb per page, with the number of measurements behind each average:
Each object of data.pulseEvents carries locationhref, avg, and count. Run the query once per field to compare the parts of each page’s load time.
Compare visitors by connection or browser
The same query can group the measurements by another field in place of the page. effectivetype holds the connection class the browser reported, such as 4g, and browser the browser that performed the measurement. A field in filter with no suffix compares for equality, so locationhref in filter keeps the measurements of one page.
To average the load time of the home page per connection class:
Each object of data.pulseEvents carries one connection class, with the average load time of the home page and the number of measurements in that class. Group by browser in place of effectivetype to compare browsers.
The dataset carries no Core Web Vitals field, such as LCP, CLS, or INP, and no field for the region or country of the visitor. For every field a query can select, refer to Real-Time Events fields.