Skip to main content
DocsAPI ReferenceDashboard API
Back to docs

Dashboard API

Stats, activity feed, quick access

api
dashboard

Dashboard API

Base path: /api/dashboard

All dashboard endpoints require JWT authentication via the Authorization: Bearer <token> header.


GET /api/dashboard/stats

Get aggregated dashboard statistics for the authenticated user.

Auth: Required (JWT) Feature gate: None

Response:

{
  "success": true,
  "data": {
    "totalContents": 42,
    "monthlyContents": 7,
    "usageRate": 70,
    "planLimit": 10
  }
}
FieldTypeDescription
totalContentsnumberTotal H5P content items across all time
monthlyContentsnumberContents created in the current billing month
usageRatenumberPercentage of monthly plan limit used (0-100). 0 when plan limit is unlimited (-1).
planLimitnumberMaximum contents allowed per month for the user's plan. -1 means unlimited.

Errors:

StatusBodyCondition
500{ "success": false, "error": "Failed to fetch dashboard stats" }Database query failure or user not found

GET /api/dashboard/activity

Get recent content activity feed for the authenticated user.

Auth: Required (JWT) Feature gate: None

Response:

{
  "success": true,
  "data": [
    {
      "id": "content-uuid",
      "type": "created",
      "contentTitle": "World Geography Quiz",
      "contentType": "H5P.MultiChoice",
      "timestamp": "2026-03-20T14:30:00.000Z"
    },
    {
      "id": "content-uuid",
      "type": "edited",
      "contentTitle": "World Geography Quiz",
      "contentType": "H5P.MultiChoice",
      "timestamp": "2026-03-21T09:15:00.000Z"
    }
  ]
}
FieldTypeDescription
idstringContent identifier
type"created" | "edited" | "deleted" | "generated"Activity type
contentTitlestringH5P content title (from h5p.json)
contentTypestringH5P main library (e.g. H5P.MultiChoice)
timestampstringISO 8601 timestamp of the activity

Results are sorted by timestamp descending. Maximum 10 items returned.

Errors:

StatusBodyCondition
500{ "success": false, "error": "Failed to fetch activity" }Database or filesystem error

GET /api/dashboard/quick-access

Get quick access data: most frequently used content types and new feature announcements.

Auth: Required (JWT) Feature gate: None

Response:

{
  "success": true,
  "data": {
    "frequentTypes": [
      { "type": "H5P.MultiChoice", "count": 12, "label": "Multiple Choice" },
      { "type": "H5P.Blanks", "count": 5, "label": "Fill in the Blanks" }
    ],
    "newFeatures": [
      {
        "id": "branching-scenario",
        "title": "Branching Scenario",
        "description": "Create interactive decision-tree scenarios powered by AI"
      },
      {
        "id": "analytics-dashboard",
        "title": "Analytics Dashboard",
        "description": "Track learner progress and content performance"
      },
      {
        "id": "content-remixer",
        "title": "Content Remixer",
        "description": "Convert existing content to different H5P types"
      }
    ]
  }
}
FieldTypeDescription
frequentTypesContentTypeUsage[]Top 5 most used content types for this user
frequentTypes[].typestringH5P library identifier
frequentTypes[].countnumberNumber of contents created with this type
frequentTypes[].labelstringHuman-readable label
newFeaturesNewFeature[]Platform feature announcements
newFeatures[].idstringFeature identifier
newFeatures[].titlestringFeature title
newFeatures[].descriptionstringFeature description

Errors:

StatusBodyCondition
500{ "success": false, "error": "Failed to fetch quick access data" }Database error
Back to docsdocs/product/api/dashboard.md