Domain Inspector Real-time API

IMPORTANT: Unlike other Fastly APIs, the base URL for Domain Inspector Real-time API is https://rt.fastly.com.

Domain Inspector allows you to programmatically retrieve per-domain delivery metrics derived from your Fastly services in one-second periods up to the last complete second.

IMPORTANT: Domain Inspector is an optional upgrade to Fastly service plans and must be enabled for each service using the enablement API.

The real-time domain metrics API allows you to programmatically retrieve per-domain delivery metrics derived from your Fastly services in one-second periods up to the last complete second.

Data model

AggregateDelayintegerOffset of entry timestamps from the current time due to processing time.
DataarrayA list of report entries, each representing one second of time.
TimestampintegerValue to use for subsequent requests.

Measurements data model

A measurements object provides a count of the total number of requests received by Fastly for your domain in the reported time period and for the relevant POP, as specified in the entry. It also includes the number of responses for specific HTTP response status codes and for status code ranges. This dataset is sparse: only the keys with non-zero values will be included in the record. Where a specific status code does not have a field in this model (e.g., 429 Too Many Requests), any responses with that code will be counted as part of the range count (4xx in this case) but will not be separately identified in the data.

bandwidthintegerTotal bytes delivered (resp_header_bytes + resp_body_bytes + bereq_header_bytes + bereq_body_bytes).
bereq_body_bytesintegerTotal body bytes sent to origin.
bereq_header_bytesintegerTotal header bytes sent to origin.
edge_hit_rationumberRatio of cache hits to cache misses at the edge, between 0 and 1 (edge_hit_requests / (edge_hit_requests + edge_miss_requests)).
edge_hit_requestsintegerNumber of requests sent by end users to Fastly that resulted in a hit at the edge.
edge_miss_requestsintegerNumber of requests sent by end users to Fastly that resulted in a miss at the edge.
edge_requestsintegerNumber of requests sent by end users to Fastly.
edge_resp_body_bytesintegerTotal body bytes delivered from Fastly to the end user.
edge_resp_header_bytesintegerTotal header bytes delivered from Fastly to the end user.
origin_fetch_resp_body_bytesintegerTotal body bytes received from origin.
origin_fetch_resp_header_bytesintegerTotal header bytes received from origin.
origin_fetchesintegerNumber of requests sent to origin.
origin_offloadnumberOrigin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((edge_resp_body_bytes + edge_resp_header_bytes) - (origin_fetch_resp_body_bytes + origin_fetch_resp_header_bytes)) / (edge_resp_body_bytes + edge_resp_header_bytes). Previously, Origin Offload used a different formula. Learn more.
origin_status_1xxintegerNumber of "Informational" category status codes received from origin.
origin_status_200integerNumber of responses received from origin with status code 200 (Success).
origin_status_204integerNumber of responses received from origin with status code 204 (No Content).
origin_status_206integerNumber of responses received from origin with status code 206 (Partial Content).
origin_status_2xxintegerNumber of "Success" status codes received from origin.
origin_status_301integerNumber of responses received from origin with status code 301 (Moved Permanently).
origin_status_302integerNumber of responses received from origin with status code 302 (Found).
origin_status_304integerNumber of responses received from origin with status code 304 (Not Modified).
origin_status_3xxintegerNumber of "Redirection" codes received from origin.
origin_status_400integerNumber of responses received from origin with status code 400 (Bad Request).
origin_status_401integerNumber of responses received from origin with status code 401 (Unauthorized).
origin_status_403integerNumber of responses received from origin with status code 403 (Forbidden).
origin_status_404integerNumber of responses received from origin with status code 404 (Not Found).
origin_status_416integerNumber of responses received from origin with status code 416 (Range Not Satisfiable).
origin_status_429integerNumber of responses received from origin with status code 429 (Too Many Requests).
origin_status_4xxintegerNumber of "Client Error" codes received from origin.
origin_status_500integerNumber of responses received from origin with status code 500 (Internal Server Error).
origin_status_501integerNumber of responses received from origin with status code 501 (Not Implemented).
origin_status_502integerNumber of responses received from origin with status code 502 (Bad Gateway).
origin_status_503integerNumber of responses received from origin with status code 503 (Service Unavailable).
origin_status_504integerNumber of responses received from origin with status code 504 (Gateway Timeout).
origin_status_505integerNumber of responses received from origin with status code 505 (HTTP Version Not Supported).
origin_status_5xxintegerNumber of "Server Error" codes received from origin.
requestsintegerNumber of requests processed.
resp_body_bytesintegerTotal body bytes delivered.
resp_header_bytesintegerTotal header bytes delivered.
status_1xxintegerNumber of 1xx "Informational" category status codes delivered.
status_200integerNumber of responses delivered with status code 200 (Success).
status_204integerNumber of responses delivered with status code 204 (No Content).
status_206integerNumber of responses delivered with status code 206 (Partial Content).
status_2xxintegerNumber of 2xx "Success" status codes delivered.
status_301integerNumber of responses delivered with status code 301 (Moved Permanently).
status_302integerNumber of responses delivered with status code 302 (Found).
status_304integerNumber of responses delivered with status code 304 (Not Modified).
status_3xxintegerNumber of 3xx "Redirection" codes delivered.
status_400integerNumber of responses delivered with status code 400 (Bad Request).
status_401integerNumber of responses delivered with status code 401 (Unauthorized).
status_403integerNumber of responses delivered with status code 403 (Forbidden).
status_404integerNumber of responses delivered with status code 404 (Not Found).
status_416integerNumber of responses delivered with status code 416 (Range Not Satisfiable).
status_429integerNumber of responses delivered with status code 429 (Too Many Requests).
status_4xxintegerNumber of 4xx "Client Error" codes delivered.
status_500integerNumber of responses delivered with status code 500 (Internal Server Error).
status_501integerNumber of responses delivered with status code 501 (Not Implemented).
status_502integerNumber of responses delivered with status code 502 (Bad Gateway).
status_503integerNumber of responses delivered with status code 503 (Service Unavailable).
status_504integerNumber of responses delivered with status code 504 (Gateway Timeout).
status_505integerNumber of responses delivered with status code 505 (HTTP Version Not Supported).
status_5xxintegerNumber of 5xx "Server Error" codes delivered.

Entry data model

Each reporting period is represented by an entry in the Data property of the top level response and provides access to measurement data for that time period, grouped in various ways: by domain name, domain IP address, and optionally by POP. The datacenter property organizes the measurements by Fastly POP, while the aggregated property combines the measurements of all POPs (but still splits by backend name and IP).

aggregatedobjectGroups measurements by backend name and then by IP address.
datacenterobjectGroups measurements by POP, then backend name, and then IP address. See the POPs API for details about POP identifiers.
recordedintegerThe Unix timestamp at which this record's data was generated.

Endpoints

Get real-time domain data from a specified time

GET/v1/domains/service_id/ts/start_timestamp

Get real-time domain data for the last 120 seconds

GET/v1/domains/service_id/ts/h

Get a limited number of real-time domain data entries

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