Athena
ClientsClient_nameTable row estimates

Approximate per-table row counts plus storage-pressure advisories

Runs a read-only catalog query against the target Postgres client and returns approximate row counts sourced from `pg_class.reltuples`. Responses are cached through Athena's shared response cache (in-process + Redis when configured). Send `Cache-Control: no-cache` to bypass the cache and force a fresh snapshot. By default Athena excludes system schemas (`pg_catalog`, `information_schema`, `pg_toast`, and temporary variants). Snapshot advisories also flag very large tables and Athena-managed gateway log tables that commonly show up in disk-pressure incidents.

GET
/admin/clients/{client_name}/table-row-estimates

Path Parameters

client_name*string

Query Parameters

schema?string

Optional exact schema name filter.

limit?integer

Maximum number of heavy tables included in snapshot.top_tables.

Default12
Range1 <= value <= 100
include_system_schemas?boolean

Include system schemas such as pg_catalog, information_schema, and pg_toast.

Defaultfalse

Header Parameters

apikey*string

The static admin key configured as ATHENA_KEY_12. Authorization headers (Bearer <key>), X-API-Key, X-Athena-Key, or ?api_key= are also accepted.

Response Body

application/json

application/json

curl -X GET "https://athena-cluster.com/admin/clients/string/table-row-estimates" \  -H "apikey: string"
{
  "client_name": "string",
  "schema": "string",
  "limit": 0,
  "include_system_schemas": true,
  "snapshot": {
    "source": "pg_class.reltuples",
    "collected_at": "2019-08-24T14:15:22Z",
    "summary": {
      "table_count": 0,
      "nonzero_table_count": 0,
      "estimated_total_rows": 0,
      "max_estimated_rows": 0,
      "max_table_name": "string",
      "max_qualified_table_name": "string"
    },
    "top_tables": [
      {
        "schema_name": "string",
        "table_name": "string",
        "qualified_table_name": "string",
        "estimated_rows": 0
      }
    ],
    "schema_rollups": [
      {
        "schema_name": "string",
        "table_count": 0,
        "estimated_rows": 0
      }
    ],
    "buckets": [
      {
        "label": "string",
        "min_rows": 0,
        "max_rows": 0,
        "table_count": 0
      }
    ],
    "advisories": [
      {
        "code": "string",
        "severity": "string",
        "title": "string",
        "message": "string",
        "affected_tables": [
          {
            "schema_name": "string",
            "table_name": "string",
            "qualified_table_name": "string",
            "estimated_rows": 0
          }
        ],
        "affected_estimated_rows": 0,
        "share_of_estimated_total_pct": 0,
        "config_key": "string",
        "config_default_seconds": 0
      }
    ]
  }
}
Empty
{
  "status": "error",
  "message": "string",
  "error": "string"
}
Empty