MATIH Platform is in active MVP development. Documentation reflects current implementation status.
12. AI Service
Dashboard Endpoints

Dashboard Endpoints

The Dashboard API provides full CRUD operations for dashboards and their widgets, enabling users to build, manage, and share analytical dashboards. Dashboards are composed of configurable widgets that display charts, tables, KPIs, and other data visualizations backed by SQL queries or metric definitions.


Create Dashboard

Creates a new dashboard for the authenticated tenant.

PropertyValue
MethodPOST
Path/api/v1/bi/dashboards
AuthJWT required

Request Body

{
  "name": "Q4 Revenue Dashboard",
  "description": "Quarterly revenue analysis across regions",
  "visibility": "private",
  "tags": ["revenue", "quarterly"],
  "filters": [
    {
      "field": "region",
      "operator": "in",
      "values": ["US", "EU", "APAC"]
    }
  ]
}

Response

{
  "id": "dash-abc123",
  "name": "Q4 Revenue Dashboard",
  "tenant_id": "acme-corp",
  "created_by": "user-456",
  "visibility": "private",
  "widget_count": 0,
  "created_at": "2025-03-15T10:00:00Z"
}

List Dashboards

Lists dashboards accessible to the authenticated user.

PropertyValue
MethodGET
Path/api/v1/bi/dashboards
AuthJWT required

Query Parameters

ParameterTypeRequiredDescription
visibilitystringnoFilter by visibility (private, team, public)
tagstringnoFilter by tag
limitintegernoMax results (default 20)
offsetintegernoPagination offset

Get Dashboard

Retrieves a dashboard with all its widgets and configuration.

PropertyValue
MethodGET
Path/api/v1/bi/dashboards/:dashboard_id
AuthJWT required

Update Dashboard

Updates dashboard metadata such as name, description, visibility, or filters.

PropertyValue
MethodPUT
Path/api/v1/bi/dashboards/:dashboard_id
AuthJWT required (owner or admin)

Delete Dashboard

Deletes a dashboard and all its widgets.

PropertyValue
MethodDELETE
Path/api/v1/bi/dashboards/:dashboard_id
AuthJWT required (owner or admin)

Add Widget

Adds a widget to an existing dashboard. Widgets are positioned on a 12-column grid system.

PropertyValue
MethodPOST
Path/api/v1/bi/dashboards/:dashboard_id/widgets
AuthJWT required

Request Body

{
  "name": "Revenue by Region",
  "widget_type": "bar_chart",
  "position": {
    "x": 0,
    "y": 0,
    "width": 6,
    "height": 4
  },
  "data_source": {
    "sql": "SELECT region, SUM(revenue) FROM sales GROUP BY region",
    "cache_ttl_seconds": 300
  },
  "config": {
    "x_axis": "region",
    "y_axis": "sum_revenue",
    "color_scheme": "blue",
    "show_legend": true
  }
}

Widget Types

TypeDescription
bar_chartVertical or horizontal bar chart
line_chartTime series or trend line
pie_chartProportional distribution
area_chartFilled area chart
scatter_plotTwo-variable scatter
kpi_cardSingle metric display with trend
tableTabular data display
heatmapTwo-dimensional heatmap
textMarkdown text block

Update Widget

Updates an existing widget configuration or position.

PropertyValue
MethodPUT
Path/api/v1/bi/dashboards/:dashboard_id/widgets/:widget_id
AuthJWT required

Delete Widget

Removes a widget from a dashboard.

PropertyValue
MethodDELETE
Path/api/v1/bi/dashboards/:dashboard_id/widgets/:widget_id
AuthJWT required

Share Dashboard

Configures sharing settings for a dashboard.

PropertyValue
MethodPOST
Path/api/v1/bi/dashboards/:dashboard_id/share
AuthJWT required (owner or admin)

Request Body

{
  "visibility": "team",
  "shared_with": ["user-789", "team-analytics"],
  "permissions": "view"
}