> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Aggregate decision stats over a window: outcome counts, billable volume,

> latency percentiles, most-cited rules. **Required scope:** read

latency percentiles, most-cited rules.

**Required scope:** `read`

### Response

`DecisionStats`

<ResponseField name="approved" type="integer" required />

<ResponseField name="billable" type="integer" required />

<ResponseField name="denied" type="integer" required />

<ResponseField name="p50_latency_ms" type="integer (int64)" required />

<ResponseField name="p95_latency_ms" type="integer (int64)" required />

<ResponseField name="refused" type="integer" required />

<ResponseField name="top_rules" type="object[][]" required>
  Most-cited rule ids in the window, descending, max 10.
</ResponseField>

<ResponseField name="total" type="integer" required />

<ResponseField name="total_cost_micros" type="integer (int64)" required />

<ResponseField name="window_secs" type="integer (int64)" required />

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Aggregate decision stats                           |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.nsr.stateset.com/v1/decisions/stats' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "approved": 1,
    "billable": 1,
    "denied": 1,
    "p50_latency_ms": 250,
    "p95_latency_ms": 250,
    "refused": 1,
    "top_rules": [
      [
        {
          "0": "s",
          "1": "t",
          "2": "r",
          "3": "i",
          "4": "n",
          "5": "g"
        }
      ]
    ],
    "total": 102,
    "total_cost_micros": 1,
    "window_secs": 1
  }
  ```
</ResponseExample>
