Skip to main content

Overview

The Dashboard Management API lets you programmatically control workspaces and dashboards. Common use cases include:
  • Building a custom sidebar listing available dashboards
  • Dynamically creating dashboards when users enable features (e.g. “Enable revenue charts”)
  • Cloning template dashboards for new customers
  • Bulk-adding or removing charts from dashboards

Authentication

All Dashboard Management endpoints accept a user JWT in the Authorization header. This is the same JWT you receive from the Get Project User Token endpoint.
Authorization: Bearer <user_jwt>
Alternatively, you can authenticate with an Upsolve API key for server-to-server calls:
Authorization: Bearer up_admin_************
User JWT authentication is recommended for frontend iFrame integrations. API key authentication is recommended for backend automations.

Workflow 1: Build a Custom Dashboard Sidebar

List all workspaces, then list dashboards within a workspace to build your own navigation UI.

Step 1: List Workspaces

curl -X GET "https://api.upsolve.ai/v1/api/dashboard/list-workspaces" \
  -H "Authorization: Bearer up_admin_************"

Step 2: List Dashboards in a Workspace

curl -X GET "https://api.upsolve.ai/v1/api/dashboard/list-workspace-dashboards?workspaceId=<workspace_id>" \
  -H "Authorization: Bearer <user_jwt>"
Response:
{
  "dashboards": [
    {
      "id": "abc-123",
      "name": "Revenue Overview",
      "tenantId": null,
      "createdAt": "2024-01-15T..."
    },
    {
      "id": "def-456",
      "name": "My Custom View",
      "tenantId": "tenant-789",
      "createdAt": "2024-02-01T..."
    }
  ]
}

Step 3: Render in Your App

Embed the application as an iFrame to render the current user’s dashboards, passing their project user token as the jwt query parameter:
<iframe
  src={`https://ai-hub.upsolve.ai/share/application/${applicationId}?jwt=${userJwt}&theme=light`}
  width="100%"
  height="800"
  style={{ border: "none" }}
  title="Embedded Analytics"
/>
See Frontend Setup for the full iFrame embedding guide.

Workflow 2: Create a Dashboard and Add Charts

Create a new empty dashboard, then populate it with charts from your chart library.

Step 1: Create an Empty Dashboard

curl -X POST "https://api.upsolve.ai/v1/api/dashboard/create" \
  -H "Authorization: Bearer <user_jwt>" \
  -H "Content-Type: application/json" \
  -d '{ "workspaceId": "<workspace_id>", "name": "My New Dashboard" }'

Step 2: Add Charts

curl -X POST "https://api.upsolve.ai/v1/api/dashboard/add-charts" \
  -H "Authorization: Bearer <user_jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "targetDashboardId": "<new_dashboard_id>",
    "charts": [
      { "chartId": "<revenue_chart_id>" },
      { "chartId": "<cost_chart_id>" },
      { "chartId": "<profit_chart_id>" }
    ]
  }'
Charts are deep-copied into the target dashboard, so changes to the originals won’t affect the copy.

Workflow 3: Clone a Dashboard

Clone an existing dashboard (with all its charts) into the same or a different workspace.
curl -X POST "https://api.upsolve.ai/v1/api/dashboard/clone" \
  -H "Authorization: Bearer <user_jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceDashboardId": "<template_dashboard_id>",
    "targetWorkspaceId": "<target_workspace_id>",
    "name": "Sales Dashboard for ACME Corp"
  }'

Workflow 4: Merge Charts Between Dashboards

Append all charts from one dashboard to another. This is useful for enabling feature bundles (e.g., “Enable revenue charts” adds all revenue-related charts).
curl -X POST "https://api.upsolve.ai/v1/api/dashboard/append-charts-from" \
  -H "Authorization: Bearer <user_jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceDashboardId": "<revenue_template_dashboard_id>",
    "targetDashboardId": "<users_dashboard_id>"
  }'

Workflow 5: Remove Charts from a Dashboard

Remove specific charts that are no longer needed:
curl -X POST "https://api.upsolve.ai/v1/api/dashboard/remove-charts" \
  -H "Authorization: Bearer <user_jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "dashboardId": "<dashboard_id>",
    "chartIds": ["<chart_id_1>", "<chart_id_2>"]
  }'
The chart records are preserved in the chart library. Only the dashboard layout is updated.

API Reference

EndpointDescription
List WorkspacesList all workspaces in your organization
List Workspace DashboardsList dashboards in a workspace
Create DashboardCreate a new empty dashboard
Clone DashboardDeep-copy a dashboard with all charts
Add ChartsAdd charts to a dashboard
Remove ChartsRemove charts from a dashboard
Append ChartsCopy all charts from one dashboard to another