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

# Dashboard API

> Request logs and statistics

The dashboard provides an API for accessing request logs and statistics.

## Logs

Get request history with pagination.

```
GET /dashboard/api/logs
```

### Parameters

| Parameter | Type   | Default | Description                         |
| --------- | ------ | ------- | ----------------------------------- |
| `limit`   | number | 100     | Number of logs to return (max 1000) |
| `offset`  | number | 0       | Pagination offset                   |

### Request

```bash theme={null}
curl "http://localhost:3000/dashboard/api/logs?limit=100&offset=0"
```

### Response

```json theme={null}
{
  "logs": [
    {
      "id": 1,
      "timestamp": "2026-01-15T10:30:00Z",
      "mode": "mask",
      "provider": "openai",
      "source": "openai",
      "model": "gpt-5.2",
      "pii_detected": true,
      "entities": "[\"EMAIL_ADDRESS\",\"PERSON\"]",
      "latency_ms": 1234,
      "scan_time_ms": 45,
      "prompt_tokens": 150,
      "completion_tokens": 200,
      "user_agent": "OpenAI-Python/1.0.0",
      "masked_content": "Hello [[EMAIL_ADDRESS_1]]",
      "secrets_detected": 0,
      "secrets_types": null
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "count": 1
  }
}
```

***

## Statistics

Get aggregated statistics.

```
GET /dashboard/api/stats
```

### Request

```bash theme={null}
curl http://localhost:3000/dashboard/api/stats
```

### Response

```json theme={null}
{
  "total_requests": 1500,
  "pii_requests": 342,
  "pii_percentage": 22.8,
  "proxy_requests": 1000,
  "api_requests": 100,
  "browser_extension_requests": 100,
  "local_requests": 300,
  "avg_scan_time_ms": 45,
  "total_tokens": 125000,
  "requests_last_hour": 42,
  "entity_breakdown": [
    { "entity": "EMAIL_ADDRESS", "count": 150 },
    { "entity": "PERSON", "count": 120 },
    { "entity": "PHONE_NUMBER", "count": 72 }
  ],
  "mode": "mask"
}
```
