admin

Aggregate Usage

Platform-wide usage aggregated across ALL organizations for the last N days (default 7).

Powers the portal admin dashboard's "platform usage" card. v1 is operational-only: reads/writes/feedbacks/queries, distinct active keys, distinct organizations, and the top 10 orgs by query volume.

Response notes for consumers: the top-level totals cover ALL organizations, whereas top_orgs_by_queries is only the TOP 10 — do NOT sum it to derive the platform total (use total_queries). The daily array is ordered newest-first by date and omits days with no activity (gaps mean zero), so its length may be < days.

days is validated to [1, 90] at the FastAPI layer via Query (HTTP 422 before any DB work). The window itself is computed in Postgres as CURRENT_DATE - make_interval(days => $1) with the day count bound as a parameter — never string-interpolated. The only interpolated token in any of these queries is {schema}, which is a validated SQL identifier from settings (validate_sql_identifier), not request input.

get/api/v1/admin/aggregate/usage

Request

  • Base URL: https://core.mnemoverse.com
  • URL: https://core.mnemoverse.com/api/v1/admin/aggregate/usage
  • Auth: API key in header X-Admin-Key

Query parameters

daysinteger

Response

Successful Response

total_readsinteger required
total_writesinteger required
total_feedbacksinteger required
total_queriesinteger required
distinct_active_keysinteger required
distinct_organizationsinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.