Manage business dashboards, widgets, and dashboard-related operations in the analytics system.
/api/dashboards
The Dashboards API provides endpoints for managing custom dashboards including creation, widget management, and user-specific dashboard assignments. Supports multiple dashboard widgets with real-time data.
Creates a new custom dashboard.
{
"name": "Executive Summary",
"description": "Key metrics and KPIs",
"type": "executive",
"widgets": [
{
"id": "widget_1",
"type": "revenue_chart",
"title": "Monthly Revenue",
"size": "large"
},
{
"id": "widget_2",
"type": "active_subscriptions",
"title": "Active Subscriptions",
"size": "small"
}
],
"refreshInterval": 60
}
{
"id": "dashboard_123",
"name": "Executive Summary",
"type": "executive",
"createdAt": "2026-06-02T10:30:00Z"
}
Gets dashboard details by ID with all widgets.
| Parameter | Type |
|---|---|
| id | string |
{
"id": "dashboard_123",
"name": "Executive Summary",
"description": "Key metrics and KPIs",
"type": "executive",
"widgets": [
{
"id": "widget_1",
"type": "revenue_chart",
"title": "Monthly Revenue",
"size": "large",
"data": {
"series": [{"month": "Jan", "value": 5000}]
}
}
],
"refreshInterval": 60,
"createdAt": "2026-06-02T10:30:00Z"
}
Gets all dashboards with pagination.
| Parameter | Type | Description |
|---|---|---|
| $filter | string | OData filter expression |
| $skip | integer | Skip n records |
| $top | integer | Take n records |
{
"value": [
{
"id": "dashboard_123",
"name": "Executive Summary",
"type": "executive",
"widgetCount": 5,
"createdAt": "2026-06-02T10:30:00Z"
}
],
"count": 20
}
Updates dashboard definition and layout.
{
"name": "Executive Summary - Updated",
"description": "Updated key metrics and KPIs",
"refreshInterval": 90,
"widgets": [
{
"id": "widget_1",
"type": "revenue_chart",
"title": "Quarterly Revenue",
"size": "large"
}
]
}
{
"id": "dashboard_123",
"name": "Executive Summary - Updated",
"updatedAt": "2026-06-02T11:00:00Z"
}
Deletes a dashboard and its widgets.
{
"success": true,
"message": "Dashboard deleted"
}
Gets all dashboards assigned to a specific user.
| Parameter | Type |
|---|---|
| userId | string |
{
"userId": 123,
"dashboards": [
{
"id": "dashboard_123",
"name": "Executive Summary",
"type": "executive",
"isDefault": true
},
{
"id": "dashboard_124",
"name": "Sales Performance",
"type": "sales",
"isDefault": false
}
]
}
| Code | HTTP Status | Description |
|---|---|---|
| DASHBOARD_NOT_FOUND | 404 | Dashboard does not exist |
| USER_NOT_FOUND | 404 | User does not exist |
| INVALID_WIDGET_TYPE | 400 | Widget type is not supported |
| DUPLICATE_DASHBOARD | 409 | Dashboard name already exists |