Origin Inspector Historical API

Origin Inspector provides a JSON-formatted historical API for visibility into responses delivered from your origin servers to Fastly. The API offers a standardized set of data to report in minutely, hourly or daily granularity on every origin response, byte, and status code received by a specified service.

Origin Inspector provides a JSON-formatted historical API for visibility into responses delivered from your origin servers to Fastly. The API offers a standardized set of data to report in minutely, hourly or daily granularity on every origin response, byte, and status code received by a specified service.

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

Query options

When the start or end parameters specify a date without a time, the time component will be set to 00:00. To specify a different time, use a Unix timestamp or an expression such as start=2021-01-01%2008:00&end=2021-01-02%2008:00

If start is omitted, the time range will start at a point determined by the value of downsample:

  • ?downsample=day: one month ago
  • ?downsample=hour: one day ago
  • ?downsample=minute: 30 minutes ago

If you define values for all of the start, end, and downsamples parameters you can accidentally ask for a very large data set.

IMPORTANT: All absolute time references in the historical API are expressed in UTC.

Examples

Returns origin response counts for service abc123, summed by day, for the first week of September 2021:

/metrics/origins/services/abc123?start=2021-09-01&end=2021-09-08&downsample=day&metric=responses

Returns the count of 200 and 204 status codes emitted by origins for service abc123, summed by minute, for the first 8 hours of September 2021:

/metrics/origins/services/abc123?start=2021-09-01T00:00:00&end=2021-09-02T08:00:00&downsample=minute&metric=status_200,status_201

Returns the count of 5xx status codes emitted by origins for service abc123 on the first day of September 2021, with one timeseries per unique origin host:

/metrics/origins/services/abc123?start=2021-09-01&end=2021-09-02&metric=status_5xx&group_by=host

Data latency

As a general rule, data with minute, hour, and day resolution will each be delayed by approximately 10 to 15 minutes due to the time it takes to collect and process historical data. Therefore time periods that are yet to complete or have only recently ended may return data that is yet to fully count all traffic for that period.

Error format

Error responses have the Content-Type header set to application/problem+json. The error response body will include:

  • type (string): A URL that includes additional, human-readable information about this error type.
  • title (string): A short name for the error type.
  • status (integer): The HTTP status code.
  • detail (string): A human-readable description of the specific error.
  • errors (array): A list of individual errors, where multiple errors have occurred.

An example error can be seen below:

{
"type": "https://fastly.help/metrics/validation-error",
"title": "Request parameters were invalid.",
"status": 400,
"errors": [
{
"property": "metric",
"reason": "Unrecognized metric names: 'my_metric', 'my_metric2'"
}
],
"detail": "Parameters with invalid values: 'metric'"
}

Data model

dimensionsobjectThe unique combination of dimensions associated with this timeseries.
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.
valuesarrayAn array of values representing the metric values at each point in time. Note that this dataset is sparse: only the keys with non-zero values will be included in the record.
datacenterstringThe POP from which the edge responses in this data entry were delivered. If unspecified, results are aggregated across POPs.
hoststringThe origin host from which the edge responses in this data entry were delivered. If unspecified, results are aggregated across origin hosts.
regionstringThe geographic region from which the edge responses in this data entry were delivered. If unspecified, results are aggregated across regions.

Entry data model

dimensionsobjectThe unique combination of dimensions associated with this timeseries.
valuesarrayAn array of values representing the metric values at each point in time. Note that this dataset is sparse: only the keys with non-zero values will be included in the record.

Values data model

The results of the query, optionally filtered and grouped over the requested timespan.

all_latency_0_to_1msintegerNumber of responses with latency between 0 and 1 millisecond received for origin requests made by all sources.
all_latency_10000_to_60000msintegerNumber of responses with latency between 10,000 and 60,000 milliseconds received for origin requests made by all sources.
all_latency_1000_to_5000msintegerNumber of responses with latency between 1,000 and 5,000 milliseconds received for origin requests made by all sources.
all_latency_100_to_250msintegerNumber of responses with latency between 100 and 250 milliseconds received for origin requests made by all sources.
all_latency_10_to_50msintegerNumber of responses with latency between 10 and 50 milliseconds received for origin requests made by all sources.
all_latency_1_to_5msintegerNumber of responses with latency between 1 and 5 milliseconds received for origin requests made by all sources.
all_latency_250_to_500msintegerNumber of responses with latency between 250 and 500 milliseconds received for origin requests made by all sources.
all_latency_5000_to_10000msintegerNumber of responses with latency between 5,000 and 10,000 milliseconds received for origin requests made by all sources.
all_latency_500_to_1000msintegerNumber of responses with latency between 500 and 1,000 milliseconds received for origin requests made by all sources.
all_latency_50_to_100msintegerNumber of responses with latency between 50 and 100 milliseconds received for origin requests made by all sources.
all_latency_5_to_10msintegerNumber of responses with latency between 5 and 10 milliseconds received for origin requests made by all sources.
all_latency_60000msintegerNumber of responses with latency of 60,000 milliseconds and above received for origin requests made by all sources.
all_resp_body_bytesintegerNumber of body bytes received for origin requests made by all sources.
all_resp_header_bytesintegerNumber of header bytes received for origin requests made by all sources.
all_responsesintegerNumber of responses received for origin requests made by all sources.
all_status_1xxintegerNumber of 1xx "Informational" category status codes delivered received for origin requests made by all sources.
all_status_200integerNumber of responses received with status code 200 (Success) received for origin requests made by all sources.
all_status_204integerNumber of responses received with status code 204 (No Content) received for origin requests made by all sources.
all_status_206integerNumber of responses received with status code 206 (Partial Content) received for origin requests made by all sources.
all_status_2xxintegerNumber of 2xx "Success" status codes received for origin requests made by all sources.
all_status_301integerNumber of responses received with status code 301 (Moved Permanently) received for origin requests made by all sources.
all_status_302integerNumber of responses received with status code 302 (Found) received for origin requests made by all sources.
all_status_304integerNumber of responses received with status code 304 (Not Modified) received for origin requests made by all sources.
all_status_3xxintegerNumber of 3xx "Redirection" codes received for origin requests made by all sources.
all_status_400integerNumber of responses received with status code 400 (Bad Request) received for origin requests made by all sources.
all_status_401integerNumber of responses received with status code 401 (Unauthorized) received for origin requests made by all sources.
all_status_403integerNumber of responses received with status code 403 (Forbidden) received for origin requests made by all sources.
all_status_404integerNumber of responses received with status code 404 (Not Found) received for origin requests made by all sources.
all_status_416integerNumber of responses received with status code 416 (Range Not Satisfiable) received for origin requests made by all sources.
all_status_429integerNumber of responses received with status code 429 (Too Many Requests) received for origin requests made by all sources.
all_status_4xxintegerNumber of 4xx "Client Error" codes received for origin requests made by all sources.
all_status_500integerNumber of responses received with status code 500 (Internal Server Error) received for origin requests made by all sources.
all_status_501integerNumber of responses received with status code 501 (Not Implemented) received for origin requests made by all sources.
all_status_502integerNumber of responses received with status code 502 (Bad Gateway) received for origin requests made by all sources.
all_status_503integerNumber of responses received with status code 503 (Service Unavailable) received for origin requests made by all sources.
all_status_504integerNumber of responses received with status code 504 (Gateway Timeout) received for origin requests made by all sources.
all_status_505integerNumber of responses received with status code 505 (HTTP Version Not Supported) received for origin requests made by all sources.
all_status_5xxintegerNumber of 5xx "Server Error" codes received for origin requests made by all sources.
compute_latency_0_to_1msintegerNumber of responses with latency between 0 and 1 millisecond for origin received by the Compute platform.
compute_latency_10000_to_60000msintegerNumber of responses with latency between 10,000 and 60,000 milliseconds for origin received by the Compute platform.
compute_latency_1000_to_5000msintegerNumber of responses with latency between 1,000 and 5,000 milliseconds for origin received by the Compute platform.
compute_latency_100_to_250msintegerNumber of responses with latency between 100 and 250 milliseconds for origin received by the Compute platform.
compute_latency_10_to_50msintegerNumber of responses with latency between 10 and 50 milliseconds for origin received by the Compute platform.
compute_latency_1_to_5msintegerNumber of responses with latency between 1 and 5 milliseconds for origin received by the Compute platform.
compute_latency_250_to_500msintegerNumber of responses with latency between 250 and 500 milliseconds for origin received by the Compute platform.
compute_latency_5000_to_10000msintegerNumber of responses with latency between 5,000 and 10,000 milliseconds for origin received by the Compute platform.
compute_latency_500_to_1000msintegerNumber of responses with latency between 500 and 1,000 milliseconds for origin received by the Compute platform.
compute_latency_50_to_100msintegerNumber of responses with latency between 50 and 100 milliseconds for origin received by the Compute platform.
compute_latency_5_to_10msintegerNumber of responses with latency between 5 and 10 milliseconds for origin received by the Compute platform.
compute_latency_60000msintegerNumber of responses with latency of 60,000 milliseconds and above for origin received by the Compute platform.
compute_resp_body_bytesintegerNumber of body bytes for origin received by the Compute platform.
compute_resp_header_bytesintegerNumber of header bytes for origin received by the Compute platform.
compute_responsesintegerNumber of responses for origin received by the Compute platform.
compute_status_1xxintegerNumber of 1xx "Informational" status codes for origin received by the Compute platform.
compute_status_200integerNumber of responses received with status code 200 (Success) for origin received by the Compute platform.
compute_status_204integerNumber of responses received with status code 204 (No Content) for origin received by the Compute platform.
compute_status_206integerNumber of responses received with status code 206 (Partial Content) for origin received by the Compute platform.
compute_status_2xxintegerNumber of 2xx "Success" status codes for origin received by the Compute platform.
compute_status_301integerNumber of responses received with status code 301 (Moved Permanently) for origin received by the Compute platform.
compute_status_302integerNumber of responses received with status code 302 (Found) for origin received by the Compute platform.
compute_status_304integerNumber of responses received with status code 304 (Not Modified) for origin received by the Compute platform.
compute_status_3xxintegerNumber of 3xx "Redirection" codes for origin received by the Compute platform.
compute_status_400integerNumber of responses received with status code 400 (Bad Request) for origin received by the Compute platform.
compute_status_401integerNumber of responses received with status code 401 (Unauthorized) for origin received by the Compute platform.
compute_status_403integerNumber of responses received with status code 403 (Forbidden) for origin received by the Compute platform.
compute_status_404integerNumber of responses received with status code 404 (Not Found) for origin received by the Compute platform.
compute_status_416integerNumber of responses received with status code 416 (Range Not Satisfiable) for origin received by the Compute platform.
compute_status_429integerNumber of responses received with status code 429 (Too Many Requests) for origin received by the Compute platform.
compute_status_4xxintegerNumber of 4xx "Client Error" codes for origin received by the Compute platform.
compute_status_500integerNumber of responses received with status code 500 (Internal Server Error) for origin received by the Compute platform.
compute_status_501integerNumber of responses received with status code 501 (Not Implemented) for origin received by the Compute platform.
compute_status_502integerNumber of responses received with status code 502 (Bad Gateway) for origin received by the Compute platform.
compute_status_503integerNumber of responses received with status code 503 (Service Unavailable) for origin received by the Compute platform.
compute_status_504integerNumber of responses received with status code 504 (Gateway Timeout) for origin received by the Compute platform.
compute_status_505integerNumber of responses received with status code 505 (HTTP Version Not Supported) for origin received by the Compute platform.
compute_status_5xxintegerNumber of 5xx "Server Error" codes for origin received by the Compute platform.
latency_0_to_1msintegerNumber of responses from origin with latency between 0 and 1 millisecond.
latency_10000_to_60000msintegerNumber of responses from origin with latency between 10,000 and 60,000 milliseconds.
latency_1000_to_5000msintegerNumber of responses from origin with latency between 1,000 and 5,000 milliseconds.
latency_100_to_250msintegerNumber of responses from origin with latency between 100 and 250 milliseconds.
latency_10_to_50msintegerNumber of responses from origin with latency between 10 and 50 milliseconds.
latency_1_to_5msintegerNumber of responses from origin with latency between 1 and 5 milliseconds.
latency_250_to_500msintegerNumber of responses from origin with latency between 250 and 500 milliseconds.
latency_5000_to_10000msintegerNumber of responses from origin with latency between 5,000 and 10,000 milliseconds.
latency_500_to_1000msintegerNumber of responses from origin with latency between 500 and 1,000 milliseconds.
latency_50_to_100msintegerNumber of responses from origin with latency between 50 and 100 milliseconds.
latency_5_to_10msintegerNumber of responses from origin with latency between 5 and 10 milliseconds.
latency_60000msintegerNumber of responses from origin with latency of 60,000 milliseconds and above.
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" 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_206integerNumber of responses received with status code 206 (Partial 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_429integerNumber of responses received with status code 429 (Too Many Requests) 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.
waf_latency_0_to_1msintegerNumber of responses with latency between 0 and 1 millisecond received for origin requests made by the Fastly WAF.
waf_latency_10000_to_60000msintegerNumber of responses with latency between 10,000 and 60,000 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_1000_to_5000msintegerNumber of responses with latency between 1,000 and 5,000 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_100_to_250msintegerNumber of responses with latency between 100 and 250 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_10_to_50msintegerNumber of responses with latency between 10 and 50 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_1_to_5msintegerNumber of responses with latency between 1 and 5 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_250_to_500msintegerNumber of responses with latency between 250 and 500 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_5000_to_10000msintegerNumber of responses with latency between 5,000 and 10,000 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_500_to_1000msintegerNumber of responses with latency between 500 and 1,000 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_50_to_100msintegerNumber of responses with latency between 50 and 100 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_5_to_10msintegerNumber of responses with latency between 5 and 10 milliseconds received for origin requests made by the Fastly WAF.
waf_latency_60000msintegerNumber of responses with latency of 60,000 milliseconds and above received for origin requests made by the Fastly WAF.
waf_resp_body_bytesintegerNumber of body bytes received for origin requests made by the Fastly WAF.
waf_resp_header_bytesintegerNumber of header bytes received for origin requests made by the Fastly WAF.
waf_responsesintegerNumber of responses received for origin requests made by the Fastly WAF.
waf_status_1xxintegerNumber of 1xx "Informational" status codes received for origin requests made by the Fastly WAF.
waf_status_200integerNumber of responses received with status code 200 (Success) received for origin requests made by the Fastly WAF.
waf_status_204integerNumber of responses received with status code 204 (No Content) received for origin requests made by the Fastly WAF.
waf_status_206integerNumber of responses received with status code 206 (Partial Content) received for origin requests made by the Fastly WAF.
waf_status_2xxintegerNumber of 2xx "Success" status codes received for origin requests made by the Fastly WAF.
waf_status_301integerNumber of responses received with status code 301 (Moved Permanently) received for origin requests made by the Fastly WAF.
waf_status_302integerNumber of responses received with status code 302 (Found) received for origin requests made by the Fastly WAF.
waf_status_304integerNumber of responses received with status code 304 (Not Modified) received for origin requests made by the Fastly WAF.
waf_status_3xxintegerNumber of 3xx "Redirection" codes received for origin requests made by the Fastly WAF.
waf_status_400integerNumber of responses received with status code 400 (Bad Request) received for origin requests made by the Fastly WAF.
waf_status_401integerNumber of responses received with status code 401 (Unauthorized) received for origin requests made by the Fastly WAF.
waf_status_403integerNumber of responses received with status code 403 (Forbidden) received for origin requests made by the Fastly WAF.
waf_status_404integerNumber of responses received with status code 404 (Not Found) received for origin requests made by the Fastly WAF.
waf_status_416integerNumber of responses received with status code 416 (Range Not Satisfiable) received for origin requests made by the Fastly WAF.
waf_status_429integerNumber of responses received with status code 429 (Too Many Requests) received for origin requests made by the Fastly WAF.
waf_status_4xxintegerNumber of 4xx "Client Error" codes received for origin requests made by the Fastly WAF.
waf_status_500integerNumber of responses received with status code 500 (Internal Server Error) received for origin requests made by the Fastly WAF.
waf_status_501integerNumber of responses received with status code 501 (Not Implemented) received for origin requests made by the Fastly WAF.
waf_status_502integerNumber of responses received with status code 502 (Bad Gateway) received for origin requests made by the Fastly WAF.
waf_status_503integerNumber of responses received with status code 503 (Service Unavailable) received for origin requests made by the Fastly WAF.
waf_status_504integerNumber of responses received with status code 504 (Gateway Timeout) received for origin requests made by the Fastly WAF.
waf_status_505integerNumber of responses received with status code 505 (HTTP Version Not Supported) received for origin requests made by the Fastly WAF.
waf_status_5xxintegerNumber of 5xx "Server Error" codes received for origin requests made by the Fastly WAF.

Endpoints

Get historical origin data for a service

GET/metrics/origins/services/service_id