Real-time analytics

IMPORTANT: Unlike other Fastly APIs, the base URL for real-time analytics is https://rt.fastly.com.

The real-time analytics API offers a standardized set of data about traffic received by a specified service in one-second time periods up to the last complete second.

Data model

AggregateDelayintegerHow long the system will wait before aggregating messages for each second. The most recent data returned will have happened at the moment of the request, minus the aggregation delay.
DataarrayA list of records, each representing one second of time.
TimestampintegerValue to use for subsequent requests.

Record data model

A list of records, each representing one second of time. The Data property provides access to measurement data for that time period, grouped in various ways.

aggregatedobjectAggregates measurements across all Fastly data centers.
datacenterobjectGroups measurements by data center. See the data centers API for details of data center identifiers.
recordedintegerThe Unix timestamp at which this record's data was generated.

Measurements data model

Statistics that have occurred since the last request. The miss_histogram object is a histogram. Each key represents the upper bound of a span of 10 milliseconds and the values represent the number of requests to origin during that 10ms period. Any origin request that takes more than 60 seconds to return will be in the 60000 bucket.

dataobjectThe results of the query, grouped by service (and optionally, region), and aggregated over the appropriate time span.
metaobjectMeta information about the scope of the query in a human readable format.
msgstringIf the query was not successful, this will provide a string that explains why.
statusstringWhether or not we were able to successfully execute the query.

Endpoints

Get real-time data for the last second

GET/v1/channel/service_id/ts/timestamp_in_seconds

Get real-time data for the last 120 seconds

GET/v1/channel/service_id/ts/h

Get a limited number of real-time data entries

GET/v1/channel/service_id/ts/h/limit/max_entries

Rate limiting

The real-time analytics API is rate limited internally. However, it is also cached behind Fastly with an expiration time of 1s. Under normal use there should be no reason for customers to hit that rate limit.