Skip to content

Get resource usage counts (admin)

GET
/api/admin/usage
curl --request GET \
--url http://localhost:3000/api/admin/usage \
--cookie session=<session>

Counts rows across the plan-tracked resource tables (shared RESOURCE_TABLES list) and returns plan limit thresholds. Response is NOT wrapped in data.

Usage report

Media type application/json
object
total
required

Total countable resources across all tracked tables

integer
breakdown
required

Per-table row counts, keyed by table name

object
key
additional properties
integer
limits
required

Plan limit thresholds

object
Example generated
{
"total": 1,
"breakdown": {
"additionalProperty": 1
},
"limits": {}
}

Not authenticated

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Admin access required

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Failed to count resources

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}