Analytics

CRUD endpoints for per-user analytics saved views.

All routes are gated behind the same should_check_analytics_permission helper used by the KPI endpoints, so a user who cannot access the analytics dashboard cannot read view metadata even via a shared link.

Lookup uses uuid (not PK) so the primary key is never exposed.

Access rules

  • list / create — scoped to requesting user + active org
  • retrieve — any org member who passes the analytics permission check (enables shared-link UX: ?view=<uuid> in the URL)
  • update / destroy — owner-only
patch/api/analytics/views/{uuid}/

Request

  • Base URL
    http://localhost:8000
  • URL
    http://localhost:8000/api/analytics/views/{uuid}/
  • Auth
    API key in header Authorization

Path parameters

uuidstring uuid required

Request body

dashboard_type'overview' | 'member_performance'
  • overview - Overview
  • member_performance - Member Performance
filtersunknown
namestring

Response

created_atstring date-time required
dashboard_type'overview' | 'member_performance'
  • overview - Overview
  • member_performance - Member Performance
filtersunknown
namestring required
owner_idinteger required
updated_atstring date-time required
uuidstring uuid required

Changes

No operation changes recorded.