---
title: Origin Inspector Historical API
summary: 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.
url: https://www.fastly.com/documentation/reference/api/metrics-stats/origin-inspector/historical
---

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.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `dimensions` | object | The unique combination of dimensions associated with this timeseries. |
| `meta` | object | Meta information about the scope of the query in a human readable format. |
| `msg` | string | If the query was not successful, this will provide a string that explains why. |
| `status` | string | Whether or not we were able to successfully execute the query. |
| `values` | array | An 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. |
| `datacenter` | string | The POP from which the edge responses in this data entry were delivered. If unspecified, results are aggregated across POPs. |
| `host` | string | The origin host from which the edge responses in this data entry were delivered. If unspecified, results are aggregated across origin hosts. |
| `region` | string | The geographic region from which the edge responses in this data entry were delivered. If unspecified, results are aggregated across regions. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `dimensions` | object | The unique combination of dimensions associated with this timeseries. |
| `values` | array | An 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. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `all_latency_0_to_1ms` | integer | Number of responses with latency between 0 and 1 millisecond received for origin requests made by all sources. |
| `all_latency_10000_to_60000ms` | integer | Number of responses with latency between 10,000 and 60,000 milliseconds received for origin requests made by all sources. |
| `all_latency_1000_to_5000ms` | integer | Number of responses with latency between 1,000 and 5,000 milliseconds received for origin requests made by all sources. |
| `all_latency_100_to_250ms` | integer | Number of responses with latency between 100 and 250 milliseconds received for origin requests made by all sources. |
| `all_latency_10_to_50ms` | integer | Number of responses with latency between 10 and 50 milliseconds received for origin requests made by all sources. |
| `all_latency_1_to_5ms` | integer | Number of responses with latency between 1 and 5 milliseconds received for origin requests made by all sources. |
| `all_latency_250_to_500ms` | integer | Number of responses with latency between 250 and 500 milliseconds received for origin requests made by all sources. |
| `all_latency_5000_to_10000ms` | integer | Number of responses with latency between 5,000 and 10,000 milliseconds received for origin requests made by all sources. |
| `all_latency_500_to_1000ms` | integer | Number of responses with latency between 500 and 1,000 milliseconds received for origin requests made by all sources. |
| `all_latency_50_to_100ms` | integer | Number of responses with latency between 50 and 100 milliseconds received for origin requests made by all sources. |
| `all_latency_5_to_10ms` | integer | Number of responses with latency between 5 and 10 milliseconds received for origin requests made by all sources. |
| `all_latency_60000ms` | integer | Number of responses with latency of 60,000 milliseconds and above received for origin requests made by all sources. |
| `all_resp_body_bytes` | integer | Number of body bytes received for origin requests made by all sources. |
| `all_resp_header_bytes` | integer | Number of header bytes received for origin requests made by all sources. |
| `all_responses` | integer | Number of responses received for origin requests made by all sources. |
| `all_status_1xx` | integer | Number of 1xx "Informational" category status codes delivered received for origin requests made by all sources. |
| `all_status_200` | integer | Number of responses received with status code 200 (Success) received for origin requests made by all sources. |
| `all_status_204` | integer | Number of responses received with status code 204 (No Content) received for origin requests made by all sources. |
| `all_status_206` | integer | Number of responses received with status code 206 (Partial Content) received for origin requests made by all sources. |
| `all_status_2xx` | integer | Number of 2xx "Success" status codes received for origin requests made by all sources. |
| `all_status_301` | integer | Number of responses received with status code 301 (Moved Permanently) received for origin requests made by all sources. |
| `all_status_302` | integer | Number of responses received with status code 302 (Found) received for origin requests made by all sources. |
| `all_status_304` | integer | Number of responses received with status code 304 (Not Modified) received for origin requests made by all sources. |
| `all_status_3xx` | integer | Number of 3xx "Redirection" codes received for origin requests made by all sources. |
| `all_status_400` | integer | Number of responses received with status code 400 (Bad Request) received for origin requests made by all sources. |
| `all_status_401` | integer | Number of responses received with status code 401 (Unauthorized) received for origin requests made by all sources. |
| `all_status_403` | integer | Number of responses received with status code 403 (Forbidden) received for origin requests made by all sources. |
| `all_status_404` | integer | Number of responses received with status code 404 (Not Found) received for origin requests made by all sources. |
| `all_status_416` | integer | Number of responses received with status code 416 (Range Not Satisfiable) received for origin requests made by all sources. |
| `all_status_429` | integer | Number of responses received with status code 429 (Too Many Requests) received for origin requests made by all sources. |
| `all_status_4xx` | integer | Number of 4xx "Client Error" codes received for origin requests made by all sources. |
| `all_status_500` | integer | Number of responses received with status code 500 (Internal Server Error) received for origin requests made by all sources. |
| `all_status_501` | integer | Number of responses received with status code 501 (Not Implemented) received for origin requests made by all sources. |
| `all_status_502` | integer | Number of responses received with status code 502 (Bad Gateway) received for origin requests made by all sources. |
| `all_status_503` | integer | Number of responses received with status code 503 (Service Unavailable) received for origin requests made by all sources. |
| `all_status_504` | integer | Number of responses received with status code 504 (Gateway Timeout) received for origin requests made by all sources. |
| `all_status_505` | integer | Number of responses received with status code 505 (HTTP Version Not Supported) received for origin requests made by all sources. |
| `all_status_530` | integer | Number of responses received with status code 530 received for origin requests made by all sources. |
| `all_status_5xx` | integer | Number of 5xx "Server Error" codes received for origin requests made by all sources. |
| `compute_latency_0_to_1ms` | integer | Number of responses with latency between 0 and 1 millisecond for origin received by the Compute platform. |
| `compute_latency_10000_to_60000ms` | integer | Number of responses with latency between 10,000 and 60,000 milliseconds for origin received by the Compute platform. |
| `compute_latency_1000_to_5000ms` | integer | Number of responses with latency between 1,000 and 5,000 milliseconds for origin received by the Compute platform. |
| `compute_latency_100_to_250ms` | integer | Number of responses with latency between 100 and 250 milliseconds for origin received by the Compute platform. |
| `compute_latency_10_to_50ms` | integer | Number of responses with latency between 10 and 50 milliseconds for origin received by the Compute platform. |
| `compute_latency_1_to_5ms` | integer | Number of responses with latency between 1 and 5 milliseconds for origin received by the Compute platform. |
| `compute_latency_250_to_500ms` | integer | Number of responses with latency between 250 and 500 milliseconds for origin received by the Compute platform. |
| `compute_latency_5000_to_10000ms` | integer | Number of responses with latency between 5,000 and 10,000 milliseconds for origin received by the Compute platform. |
| `compute_latency_500_to_1000ms` | integer | Number of responses with latency between 500 and 1,000 milliseconds for origin received by the Compute platform. |
| `compute_latency_50_to_100ms` | integer | Number of responses with latency between 50 and 100 milliseconds for origin received by the Compute platform. |
| `compute_latency_5_to_10ms` | integer | Number of responses with latency between 5 and 10 milliseconds for origin received by the Compute platform. |
| `compute_latency_60000ms` | integer | Number of responses with latency of 60,000 milliseconds and above for origin received by the Compute platform. |
| `compute_resp_body_bytes` | integer | Number of body bytes for origin received by the Compute platform. |
| `compute_resp_header_bytes` | integer | Number of header bytes for origin received by the Compute platform. |
| `compute_responses` | integer | Number of responses for origin received by the Compute platform. |
| `compute_status_1xx` | integer | Number of 1xx "Informational" status codes for origin received by the Compute platform. |
| `compute_status_200` | integer | Number of responses received with status code 200 (Success) for origin received by the Compute platform. |
| `compute_status_204` | integer | Number of responses received with status code 204 (No Content) for origin received by the Compute platform. |
| `compute_status_206` | integer | Number of responses received with status code 206 (Partial Content) for origin received by the Compute platform. |
| `compute_status_2xx` | integer | Number of 2xx "Success" status codes for origin received by the Compute platform. |
| `compute_status_301` | integer | Number of responses received with status code 301 (Moved Permanently) for origin received by the Compute platform. |
| `compute_status_302` | integer | Number of responses received with status code 302 (Found) for origin received by the Compute platform. |
| `compute_status_304` | integer | Number of responses received with status code 304 (Not Modified) for origin received by the Compute platform. |
| `compute_status_3xx` | integer | Number of 3xx "Redirection" codes for origin received by the Compute platform. |
| `compute_status_400` | integer | Number of responses received with status code 400 (Bad Request) for origin received by the Compute platform. |
| `compute_status_401` | integer | Number of responses received with status code 401 (Unauthorized) for origin received by the Compute platform. |
| `compute_status_403` | integer | Number of responses received with status code 403 (Forbidden) for origin received by the Compute platform. |
| `compute_status_404` | integer | Number of responses received with status code 404 (Not Found) for origin received by the Compute platform. |
| `compute_status_416` | integer | Number of responses received with status code 416 (Range Not Satisfiable) for origin received by the Compute platform. |
| `compute_status_429` | integer | Number of responses received with status code 429 (Too Many Requests) for origin received by the Compute platform. |
| `compute_status_4xx` | integer | Number of 4xx "Client Error" codes for origin received by the Compute platform. |
| `compute_status_500` | integer | Number of responses received with status code 500 (Internal Server Error) for origin received by the Compute platform. |
| `compute_status_501` | integer | Number of responses received with status code 501 (Not Implemented) for origin received by the Compute platform. |
| `compute_status_502` | integer | Number of responses received with status code 502 (Bad Gateway) for origin received by the Compute platform. |
| `compute_status_503` | integer | Number of responses received with status code 503 (Service Unavailable) for origin received by the Compute platform. |
| `compute_status_504` | integer | Number of responses received with status code 504 (Gateway Timeout) for origin received by the Compute platform. |
| `compute_status_505` | integer | Number of responses received with status code 505 (HTTP Version Not Supported) for origin received by the Compute platform. |
| `compute_status_530` | integer | Number of responses received with status code 530 for origin received by the Compute platform. |
| `compute_status_5xx` | integer | Number of 5xx "Server Error" codes for origin received by the Compute platform. |
| `latency_0_to_1ms` | integer | Number of responses from origin with latency between 0 and 1 millisecond. |
| `latency_10000_to_60000ms` | integer | Number of responses from origin with latency between 10,000 and 60,000 milliseconds. |
| `latency_1000_to_5000ms` | integer | Number of responses from origin with latency between 1,000 and 5,000 milliseconds. |
| `latency_100_to_250ms` | integer | Number of responses from origin with latency between 100 and 250 milliseconds. |
| `latency_10_to_50ms` | integer | Number of responses from origin with latency between 10 and 50 milliseconds. |
| `latency_1_to_5ms` | integer | Number of responses from origin with latency between 1 and 5 milliseconds. |
| `latency_250_to_500ms` | integer | Number of responses from origin with latency between 250 and 500 milliseconds. |
| `latency_5000_to_10000ms` | integer | Number of responses from origin with latency between 5,000 and 10,000 milliseconds. |
| `latency_500_to_1000ms` | integer | Number of responses from origin with latency between 500 and 1,000 milliseconds. |
| `latency_50_to_100ms` | integer | Number of responses from origin with latency between 50 and 100 milliseconds. |
| `latency_5_to_10ms` | integer | Number of responses from origin with latency between 5 and 10 milliseconds. |
| `latency_60000ms` | integer | Number of responses from origin with latency of 60,000 milliseconds and above. |
| `resp_body_bytes` | integer | Number of body bytes from origin. |
| `resp_header_bytes` | integer | Number of header bytes from origin. |
| `responses` | integer | Number of responses from origin. |
| `status_1xx` | integer | Number of 1xx "Informational" status codes delivered from origin. |
| `status_200` | integer | Number of responses received with status code 200 (Success) from origin. |
| `status_204` | integer | Number of responses received with status code 204 (No Content) from origin. |
| `status_206` | integer | Number of responses received with status code 206 (Partial Content) from origin. |
| `status_2xx` | integer | Number of 2xx "Success" status codes delivered from origin. |
| `status_301` | integer | Number of responses received with status code 301 (Moved Permanently) from origin. |
| `status_302` | integer | Number of responses received with status code 302 (Found) from origin. |
| `status_304` | integer | Number of responses received with status code 304 (Not Modified) from origin. |
| `status_3xx` | integer | Number of 3xx "Redirection" codes delivered from origin. |
| `status_400` | integer | Number of responses received with status code 400 (Bad Request) from origin. |
| `status_401` | integer | Number of responses received with status code 401 (Unauthorized) from origin. |
| `status_403` | integer | Number of responses received with status code 403 (Forbidden) from origin. |
| `status_404` | integer | Number of responses received with status code 404 (Not Found) from origin. |
| `status_416` | integer | Number of responses received with status code 416 (Range Not Satisfiable) from origin. |
| `status_429` | integer | Number of responses received with status code 429 (Too Many Requests) from origin. |
| `status_4xx` | integer | Number of 4xx "Client Error" codes delivered from origin. |
| `status_500` | integer | Number of responses received with status code 500 (Internal Server Error) from origin. |
| `status_501` | integer | Number of responses received with status code 501 (Not Implemented) from origin. |
| `status_502` | integer | Number of responses received with status code 502 (Bad Gateway) from origin. |
| `status_503` | integer | Number of responses received with status code 503 (Service Unavailable) from origin. |
| `status_504` | integer | Number of responses received with status code 504 (Gateway Timeout) from origin. |
| `status_505` | integer | Number of responses received with status code 505 (HTTP Version Not Supported) from origin. |
| `status_530` | integer | Number of responses received from origin with status code 530. |
| `status_5xx` | integer | Number of 5xx "Server Error" codes delivered from origin. |
| `waf_latency_0_to_1ms` | integer | Number of responses with latency between 0 and 1 millisecond received for origin requests made by the Fastly WAF. |
| `waf_latency_10000_to_60000ms` | integer | Number of responses with latency between 10,000 and 60,000 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_1000_to_5000ms` | integer | Number of responses with latency between 1,000 and 5,000 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_100_to_250ms` | integer | Number of responses with latency between 100 and 250 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_10_to_50ms` | integer | Number of responses with latency between 10 and 50 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_1_to_5ms` | integer | Number of responses with latency between 1 and 5 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_250_to_500ms` | integer | Number of responses with latency between 250 and 500 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_5000_to_10000ms` | integer | Number of responses with latency between 5,000 and 10,000 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_500_to_1000ms` | integer | Number of responses with latency between 500 and 1,000 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_50_to_100ms` | integer | Number of responses with latency between 50 and 100 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_5_to_10ms` | integer | Number of responses with latency between 5 and 10 milliseconds received for origin requests made by the Fastly WAF. |
| `waf_latency_60000ms` | integer | Number of responses with latency of 60,000 milliseconds and above received for origin requests made by the Fastly WAF. |
| `waf_resp_body_bytes` | integer | Number of body bytes received for origin requests made by the Fastly WAF. |
| `waf_resp_header_bytes` | integer | Number of header bytes received for origin requests made by the Fastly WAF. |
| `waf_responses` | integer | Number of responses received for origin requests made by the Fastly WAF. |
| `waf_status_1xx` | integer | Number of 1xx "Informational" status codes received for origin requests made by the Fastly WAF. |
| `waf_status_200` | integer | Number of responses received with status code 200 (Success) received for origin requests made by the Fastly WAF. |
| `waf_status_204` | integer | Number of responses received with status code 204 (No Content) received for origin requests made by the Fastly WAF. |
| `waf_status_206` | integer | Number of responses received with status code 206 (Partial Content) received for origin requests made by the Fastly WAF. |
| `waf_status_2xx` | integer | Number of 2xx "Success" status codes received for origin requests made by the Fastly WAF. |
| `waf_status_301` | integer | Number of responses received with status code 301 (Moved Permanently) received for origin requests made by the Fastly WAF. |
| `waf_status_302` | integer | Number of responses received with status code 302 (Found) received for origin requests made by the Fastly WAF. |
| `waf_status_304` | integer | Number of responses received with status code 304 (Not Modified) received for origin requests made by the Fastly WAF. |
| `waf_status_3xx` | integer | Number of 3xx "Redirection" codes received for origin requests made by the Fastly WAF. |
| `waf_status_400` | integer | Number of responses received with status code 400 (Bad Request) received for origin requests made by the Fastly WAF. |
| `waf_status_401` | integer | Number of responses received with status code 401 (Unauthorized) received for origin requests made by the Fastly WAF. |
| `waf_status_403` | integer | Number of responses received with status code 403 (Forbidden) received for origin requests made by the Fastly WAF. |
| `waf_status_404` | integer | Number of responses received with status code 404 (Not Found) received for origin requests made by the Fastly WAF. |
| `waf_status_416` | integer | Number of responses received with status code 416 (Range Not Satisfiable) received for origin requests made by the Fastly WAF. |
| `waf_status_429` | integer | Number of responses received with status code 429 (Too Many Requests) received for origin requests made by the Fastly WAF. |
| `waf_status_4xx` | integer | Number of 4xx "Client Error" codes received for origin requests made by the Fastly WAF. |
| `waf_status_500` | integer | Number of responses received with status code 500 (Internal Server Error) received for origin requests made by the Fastly WAF. |
| `waf_status_501` | integer | Number of responses received with status code 501 (Not Implemented) received for origin requests made by the Fastly WAF. |
| `waf_status_502` | integer | Number of responses received with status code 502 (Bad Gateway) received for origin requests made by the Fastly WAF. |
| `waf_status_503` | integer | Number of responses received with status code 503 (Service Unavailable) received for origin requests made by the Fastly WAF. |
| `waf_status_504` | integer | Number of responses received with status code 504 (Gateway Timeout) received for origin requests made by the Fastly WAF. |
| `waf_status_505` | integer | Number of responses received with status code 505 (HTTP Version Not Supported) received for origin requests made by the Fastly WAF. |
| `waf_status_530` | integer | Number of responses received with status code 530 received for origin requests made by the Fastly WAF. |
| `waf_status_5xx` | integer | Number of 5xx "Server Error" codes received for origin requests made by the Fastly WAF. |

## API endpoints

### Get historical origin data for a service

**GET** `/metrics/origins/services/{service_id}`

Fetches historical origin metrics for a given Fastly service, optionally filtering and grouping the results by origin host, region, or POP.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `cursor` | string | query | No | Cursor value from the <code>next_cursor</code> field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
| `datacenter` | string | query | No | Limit query to one or more specific POPs. Values should be comma-separated. |
| `downsample` | null | query | No | Duration of sample windows. |
| `end` | string | query | No | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided <code>downsample</code> value. |
| `group_by` | null | query | No | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, <code>group_by=host</code> will return one timeseries for every origin host, as a total across all POPs. |
| `host` | string | query | No | Limit query to one or more specific origin hosts. Values should be comma-separated. |
| `limit` | string | query | No | Number of results per page. The maximum is 200. |
| `metric` | string | query | No | The metrics to retrieve. Multiple values should be comma-separated. |
| `region` | null | query | No | Limit query to one or more specific geographic regions. Values should be comma-separated. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `start` | string | query | No | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided <code>downsample</code> value. |

