API
The Edgemesh Analytics API.
The Edgemesh Analytics API is currently in closed beta. Contact an Edgemesh support agent if you would like to gain access to the beta.

Authentication

This API requires a token be sent on every request. Currently, tokens are issued by Edgemesh to our beta users. Once you have received your token, you can authenticate your request by adding the token to the Authorization header, the token field in the request body or the token query parameter.

Queries

Namespaces

The Metrics API is organized by Namespace. Each Namespace corresponds to a specific area of study for your system. The following Namespaces are available:
Namespace
Description
speed
A breakdown of your sites performance over a given METRIC expressed as buckets of Fast, Slow or Average performance. This method is similar to the data aggregation used by Google for the Chrome Real User Experience rankings.
histogram
A breakdown of the individual performance counts for a given METRIC. The Histogram namespace allows you to extract distributions and values for multiple percentiles across your entire data set.
rank
A comparative breakdown of your sites performance vs. the universe of Edgemesh clients. This helps you analyze if your METRIC is inline with your peers, or falling behind.
cache
Detailed information on the performance of the Edgemesh client side cache. This includes information on your Cache Hit Rate (what % of data was serviced by the browser side Edgemesh cache), Pre-cache Hit Rate (how efficient was Edgemesh at correctly guessing and pre-caching content) and the overall asset count your visitor's experienced.

Functions

The following functions are available for all queries:
Function
Description
summary
Summary functions provide an aggregated view of the given metric for Total
timeseries
Timeseries functions return the histogram values as embedded (nested) vectors. Each value corresponds to the count of page views in that bucket (100ms buckets).
prange
The same as the summary functions except prange includes multiple data points bucketed by datetime.

Metrics

The metrics available to query are outlined below along with their fast and slow thresholds. These metrics are applicable to the speed and histogram namespaces.
Metric
Description
Fast Threshold
Slow Threshold
ttfb
Time to First Byte
100
500
fp
First Paint
500
2000
tti
Time to Interactive
1000
2500
cl
Content Loaded
1500
3000
These are the available metrics for the cache namespace.
Metric
Description
total
Aggregated across all data points.
assetType
Aggregated across the given asset type (by extension).
originId
Aggregated across the given originId.

Ranges

The following date ranges are accepted by all queries:
Range
Bucket Size
Data Points
day
1 Hour
24-25
week
8 Hours (1/3 Day)
21-22
month
24 Hours (1 Day)
30-31
quarter
96 Hours (4 Days)
30-31
year
336 Hours (14 Days)
26-27

Topic

A topic is a unique identifier for your domain. To get your topic, you can visit our Portal or you can go to your Edgemesh enabled site and enter copy(edgemesh._topic) in the javascript console and your Topic will be copied to your clipboard. A valid topic is a hex representation of a 64bit integer. It should begin with 0x and be a total if 18 characters long.

Reference Table

Namespaces
Functions | metrics
speed
histogram
rank
cache
summary
ttfb, fp, tti, cl
ttfb, fp, tti, cl
ttfb, fp, tti, cl
total, assetType, originId
timeseries
ttfb, fp, tti, cl
ttfb, fp, tti, cl
ttfb, fp, tti, cl
total, assetType, originId
prange
ttfb, fp, tti, cl

Routes

All of our routes follow the same signature:
<hostname>/:version/metrics/:namespace/:func/:metric/:range/:topic
Each namespace is outlined below including some example requests and responses. If you were to enter in a bad request, the resulting error will instruct you how to fix the issue.
get
https://api.edgemesh.com
/v3/metrics/speed/:func/:metric/:range/:topic
Speed Metrics
get
https://api.edgemesh.com
/v3/metrics/histogram/:func/:metric/:range/:topic
Histogram Metrics
get
https://api.edgemesh.com
/v3/metrics/cache/:func/:metric/:range/:topic
Cache Metrics
get
https://api.edgemesh.com
/v3/metrics/rank/:func/:metric/:topic/:range
Rank Metrics
Last modified 1yr ago