---
title: "Get User Postgres Storage"
method: GET
path: "/me/postgres/storage"
---

# Get User Postgres Storage

`GET /me/postgres/storage`

## Request

- Base URL: `https://api.xhostd.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xhostd.com/me/postgres/storage`
- Auth: none declared

User-level Postgres storage rollup.

Reports the bytes the user's data occupies on disk — each channel's
own ``ch_*`` database — and a count of the databases that number was
measured from. A user without any app owns no channel row, so the
zero-usage shape falls out without a probe. Returns 503 when the
admin pool / config is unavailable (degraded mode) or when any part
of the rollup fails.

The route only reads the control DB, so it runs on
``run_read_in_thread``. It costs one round trip to the control DB,
and the Postgres core reads the channels' rows in a second one. The
sizes come from the tenant Postgres.

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- UserPostgresStorage
  - `database_size_bytes` integer, required
  - `database_count` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xhostd/apis/xhostd-public.md) · [All operations](https://skmtc.dev/xhostd/apis/xhostd-public/llms.txt) · [OpenAPI document](https://skmtc.dev/xhostd/apis/xhostd-public/revisions/bf439c4d1789?raw)
