Skip to main content
GET
/
api
/
v1
/
dashboard
/
stats
Get Dashboard Stats
curl --request GET \
  --url https://api.example.com/api/v1/dashboard/stats
{
  "total_accounts": 123,
  "total_users": 123,
  "total_collections": 123,
  "total_records": 123,
  "new_accounts_7d": 123,
  "new_users_7d": 123,
  "recent_registrations": [
    {
      "id": "<string>",
      "email": "<string>",
      "account_id": "<string>",
      "account_code": "<string>",
      "account_name": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "system_health": {
    "database_status": "<string>",
    "storage_usage_mb": 123
  },
  "active_sessions": 123,
  "recent_audit_logs": [
    {
      "id": 123,
      "account_id": "<string>",
      "operation": "<string>",
      "table_name": "<string>",
      "record_id": "<string>",
      "column_name": "<string>",
      "user_id": "<string>",
      "user_email": "<string>",
      "user_name": "<string>",
      "occurred_at": "2023-11-07T05:31:56Z",
      "old_value": "<string>",
      "new_value": "<string>",
      "es_username": "<string>",
      "es_reason": "<string>",
      "es_timestamp": "2023-11-07T05:31:56Z",
      "ip_address": "<string>",
      "user_agent": "<string>",
      "request_id": "<string>",
      "checksum": "<string>",
      "previous_hash": "<string>",
      "extra_metadata": {}
    }
  ]
}

Headers

authorization
string | null

Response

Successful Response

Dashboard statistics response.

total_accounts
integer
required
total_users
integer
required
total_collections
integer
required
total_records
integer
required
new_accounts_7d
integer
required
new_users_7d
integer
required
recent_registrations
RecentRegistration · object[]
required
system_health
SystemHealthStats · object
required

System health statistics.

active_sessions
integer
required
recent_audit_logs
AuditLogResponse · object[]
required