---
title: Time series
summary: Time series returns data for the number of signals (e.g., XSS, SQLi, 404s) observed per minute.
url: https://www.fastly.com/documentation/reference/api/ngwaf/timeseries
---

Time series returns data for the number of signals (e.g., XSS, SQLi, 404s) observed per minute.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `timestamp` | string | Timestamp for the data point in RFC 3339 format. |
| `dimensions` | object | Dimension values for this data point. |
| `values` | array | Metric values for this data point. |

## API endpoints

### Retrieve timeseries metrics

**GET** `/ngwaf/v1/workspaces/{workspace_id}/timeseries`

Get timeseries metrics in a workspace.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `end` | string | query | No | The end of a date-time range, expressed in RFC 3339 format. |
| `granularity` | integer | query | No | Level of detail of the sample size in seconds. |
| `metrics` | string | query | Yes | Comma-separated list of metrics to be included in the timeseries. Metrics can be XSS, SQLI, HTTP404, requests_total, requests_attack, requests_total_blocked, or any custom metric. |
| `start` | string | query | Yes | The start of a date-time range, expressed in RFC 3339 format. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

### List timeseries metrics

**GET** `/ngwaf/v1/timeseries`

List timeseries metrics for Next-Gen WAF.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `dimensions` | string | query | No | Comma separated list of grouping dimensions to be included in the timeseries. Allowed values are <code>workspaces</code> and <code>time</code>. |
| `from` | string | query | Yes | The start of a date-time range, expressed in RFC 3339 format. This is an alias for <code>start</code>. |
| `granularity` | integer | query | No | Level of detail of the sample size in seconds. |
| `metrics` | string | query | Yes | Comma-separated list of metrics to be included in the timeseries. Metrics can be XSS, SQLI, HTTP404, requests_total, requests_attack, requests_total_blocked, or any custom metric. |
| `to` | string | query | No | The end of a date-time range, expressed in RFC 3339 format. This is an alias for <code>end</code>. |

### Retrieve agent timeseries metrics

**GET** `/ngwaf/v1/workspaces/{workspace_id}/timeseries/agents/{agent_id}`

Get timeseries metrics for an agent in a workspace. Agent metrics include request counts, decision latency percentiles, and host resource usage.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `agent_id` | string | path | Yes | Alphanumeric string identifying the agent. |
| `end` | string | query | No | The end of a date-time range, expressed in RFC 3339 format. |
| `granularity` | integer | query | No | Level of detail of the sample size in seconds. |
| `metrics` | string | query | Yes | Comma-separated list of agent metrics to include in the timeseries. Metrics can be <code>requests_total</code>, <code>agent_decision_time_50th</code>, <code>agent_decision_time_95th</code>, <code>agent_decision_time_99th</code>, <code>host_cpu</code>, or <code>host_agent_cpu</code>. |
| `start` | string | query | Yes | The start of a date-time range, expressed in RFC 3339 format. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

