Skip to main content
POST
/
v1
/
sdk
/
import
curl -X POST https://<your-instance>/v1/sdk/import \
  -H "Authorization: Bearer trvh_sdk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Revenue Dashboard",
    "dataSource": {
      "dbId": "D2026A00002",
      "vdmId": "VDM2026A00001",
      "connType": "VDM"
    },
    "charts": [
      {
        "title": "Revenue by Region",
        "type": "column",
        "measures": [{"field": "revenue", "aggregation": "sum"}],
        "dimensions": ["region"]
      }
    ],
    "category": ["Sales"],
    "tags": ["quarterly"]
  }'
{
  "success": true,
  "facadeId": "F2026A00018",
  "experiments": [
    {
      "experimentId": "E2026A00042",
      "section": "Revenue Dashboard",
      "charts": [
        {
          "chartId": "chart_1",
          "chartType": "CH00003",
          "chartTitle": "Revenue by Region"
        }
      ]
    }
  ]
}
Single-shot dashboard creation. Accepts a declarative payload describing charts, data source, and layout — returns experiment and facade IDs.
This endpoint uses API key authentication. Pass your key via Authorization: Bearer trvh_sdk_... or x-api-key header.

Request Body

name
string
required
Dashboard name displayed in the UI.
description
string
Optional description for the dashboard.
dataSource
object
required
The data source to query against.
charts
array
Array of chart definitions. Use this for simple mode (single section).
sections
array
Array of section definitions. Use this for multi-section mode (multiple experiments, category tabs).
layout
object
Layout configuration for the dashboard grid.
templateType
string
Layout template type (e.g., "realEstate"). Used to resolve a layout template from the database.
layoutTemplateName
string
Exact name of a layout template. Takes priority over templateType.
category
array
Dashboard categories (e.g., ["BI", "Sales"]).
tags
array
Tags for the dashboard. "sdk-import" is always added automatically.
isPublic
boolean
default:true
Whether the dashboard is publicly visible.

Response

success
boolean
Whether the import succeeded.
facadeId
string
The created facade ID (e.g., F2026A00018). Use this to view the dashboard in the UI.
experiments
array
Array of created experiments.
curl -X POST https://<your-instance>/v1/sdk/import \
  -H "Authorization: Bearer trvh_sdk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Revenue Dashboard",
    "dataSource": {
      "dbId": "D2026A00002",
      "vdmId": "VDM2026A00001",
      "connType": "VDM"
    },
    "charts": [
      {
        "title": "Revenue by Region",
        "type": "column",
        "measures": [{"field": "revenue", "aggregation": "sum"}],
        "dimensions": ["region"]
      }
    ],
    "category": ["Sales"],
    "tags": ["quarterly"]
  }'
{
  "success": true,
  "facadeId": "F2026A00018",
  "experiments": [
    {
      "experimentId": "E2026A00042",
      "section": "Revenue Dashboard",
      "charts": [
        {
          "chartId": "chart_1",
          "chartType": "CH00003",
          "chartTitle": "Revenue by Region"
        }
      ]
    }
  ]
}