Origin insights

WARNING: This information is part of a beta release, which may be subject to breaking changes and improvements over time. For more information, see our product and feature lifecycle descriptions.

IMPORTANT: Unlike other Fastly APIs, the base URL for Origin insights is https://rt.fastly.com.

Origin insights is a real-time JSON-formatted data stream providing visibility into responses delivered from your origin servers to Fastly. The API offers a standardized set of data to report in real-time every origin response, byte, and status code received by a specified service 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.

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 origin name, origin 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.

Measurements data model

A measurements object provides a count of the total number of responses received by Fastly from your origin servers in the reported time period, for the relevant POP, backend name, and IP address 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.

resp_body_bytesintegerNumber of body bytes from origin.
resp_header_bytesintegerNumber of header bytes from origin.
responsesintegerNumber of responses from origin.
status_1xxintegerNumber of 1xx "Informational" category status codes delivered from origin.
status_200integerNumber of responses received with status code 200 (Success) from origin.
status_204integerNumber of responses received with status code 204 (No Content) from origin.
status_2xxintegerNumber of 2xx "Success" status codes delivered from origin.
status_301integerNumber of responses received with status code 301 (Moved Permanently) from origin.
status_302integerNumber of responses received with status code 302 (Found) from origin.
status_304integerNumber of responses received with status code 304 (Not Modified) from origin.
status_3xxintegerNumber of 3xx "Redirection" codes delivered from origin.
status_400integerNumber of responses received with status code 400 (Bad Request) from origin.
status_401integerNumber of responses received with status code 401 (Unauthorized) from origin.
status_403integerNumber of responses received with status code 403 (Forbidden) from origin.
status_404integerNumber of responses received with status code 404 (Not Found) from origin.
status_416integerNumber of responses received with status code 416 (Range Not Satisfiable) from origin.
status_4xxintegerNumber of 4xx "Client Error" codes delivered from origin.
status_500integerNumber of responses received with status code 500 (Internal Server Error) from origin.
status_501integerNumber of responses received with status code 501 (Not Implemented) from origin.
status_502integerNumber of responses received with status code 502 (Bad Gateway) from origin.
status_503integerNumber of responses received with status code 503 (Service Unavailable) from origin.
status_504integerNumber of responses received with status code 504 (Gateway Timeout) from origin.
status_505integerNumber of responses received with status code 505 (HTTP Version Not Supported) from origin.
status_5xxintegerNumber of 5xx "Server Error" codes delivered from origin.

Endpoints

Get real-time origin data from specified time

GET/v1/channel/service_id/ts/start_timestamp?kind=origin_insights

Get real-time origin data for the last 120 seconds

GET/v1/channel/service_id/ts/h?kind=origin_insights

Get a limited number of real-time origin data entries

GET/v1/channel/service_id/ts/h/limit/max_entries?kind=origin_insights