---
title: "Get database statistics"
method: GET
path: "/api/stats"
tags: ["Debug"]
---

# Get database statistics

`GET /api/stats`

Retrieve database storage statistics and estimated logical table sizes.
Only available when DEBUG environment variable is set to true.

## Response `200`

Database statistics

- DatabaseStats
  - `row_count` integer — Total number of rows in the database
  - `storage_usage_kb` string — Storage usage in kilobytes
  - `storage_usage_mb` string — Storage usage in megabytes
  - `memory_usage` CurrentMemoryUsage
    - `time` string — Unix timestamp in milliseconds
    - `total` integer — Total memory in bytes
    - `available` integer — Available memory in bytes
    - `used` integer — Used memory in bytes
    - `usedPercent` number, float — Memory usage percentage (0-100)
    - `free` integer — Free memory in bytes
  - `table_sizes` object[]
    - `table_name` string — Name of the database table
    - `row_count` integer — Number of rows in the table
    - `size_mb` string — Estimated logical table size in megabytes
    - `size_kb` string — Estimated logical table size in kilobytes

## Other responses

- `401` — Unauthorized - missing or invalid authentication token
- `404` — Not found - resource does not exist
- `500` — Internal server error

---

[API](https://skmtc.net/coollabsio/apis/sentinel-api.md) · [All operations](https://skmtc.net/coollabsio/apis/sentinel-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coollabsio/sentinel-api/versions/0dc1c558eb88/schema)
