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"]
}'
curl -X POST https://<your-instance>/v1/sdk/import \
-H "Authorization: Bearer trvh_sdk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Executive Dashboard",
"dataSource": {"dbId": "D2026A00002", "vdmId": "VDM2026A00001", "connType": "VDM"},
"templateType": "realEstate",
"sections": [
{
"name": "KPIs",
"topSection": true,
"charts": [
{
"title": "Total Revenue",
"type": "kpi",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["period"],
"grid": {"width": 3, "height": 6, "x": 0, "y": 0},
"card": {
"icon": "BsCurrencyDollar",
"color": "#237e11",
"trend": {"field": "revenue", "dateField": "order_date", "interval": "Month", "format": "percentage"}
}
}
]
},
{
"name": "Sales",
"category": true,
"charts": [
{
"title": "Revenue by Region",
"type": "donut",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["region"],
"grid": {"width": 4, "height": 13, "x": 0, "y": 0},
"display": {"showValues": true, "showLegend": true}
},
{
"title": "Revenue by Product",
"type": "column",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["product"],
"drillDown": "Revenue by Region",
"grid": {"width": 8, "height": 13, "x": 4, "y": 0},
"sort": [{"field": "revenue", "direction": "desc"}]
}
]
}
]
}'
{
"success": true,
"facadeId": "F2026A00018",
"experiments": [
{
"experimentId": "E2026A00042",
"section": "Revenue Dashboard",
"charts": [
{
"chartId": "chart_1",
"chartType": "CH00003",
"chartTitle": "Revenue by Region"
}
]
}
]
}
{
"success": false,
"error": "Request body must include a non-empty 'charts' array or 'sections' array with charts"
}
{
"error": "API key required"
}
SDK API
Import Dashboard
Create a complete dashboard with charts in a single API call (API key auth)
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"]
}'
curl -X POST https://<your-instance>/v1/sdk/import \
-H "Authorization: Bearer trvh_sdk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Executive Dashboard",
"dataSource": {"dbId": "D2026A00002", "vdmId": "VDM2026A00001", "connType": "VDM"},
"templateType": "realEstate",
"sections": [
{
"name": "KPIs",
"topSection": true,
"charts": [
{
"title": "Total Revenue",
"type": "kpi",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["period"],
"grid": {"width": 3, "height": 6, "x": 0, "y": 0},
"card": {
"icon": "BsCurrencyDollar",
"color": "#237e11",
"trend": {"field": "revenue", "dateField": "order_date", "interval": "Month", "format": "percentage"}
}
}
]
},
{
"name": "Sales",
"category": true,
"charts": [
{
"title": "Revenue by Region",
"type": "donut",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["region"],
"grid": {"width": 4, "height": 13, "x": 0, "y": 0},
"display": {"showValues": true, "showLegend": true}
},
{
"title": "Revenue by Product",
"type": "column",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["product"],
"drillDown": "Revenue by Region",
"grid": {"width": 8, "height": 13, "x": 4, "y": 0},
"sort": [{"field": "revenue", "direction": "desc"}]
}
]
}
]
}'
{
"success": true,
"facadeId": "F2026A00018",
"experiments": [
{
"experimentId": "E2026A00042",
"section": "Revenue Dashboard",
"charts": [
{
"chartId": "chart_1",
"chartType": "CH00003",
"chartTitle": "Revenue by Region"
}
]
}
]
}
{
"success": false,
"error": "Request body must include a non-empty 'charts' array or 'sections' array with charts"
}
{
"error": "API key required"
}
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
Dashboard name displayed in the UI.
Optional description for the dashboard.
The data source to query against.
Show dataSource properties
Show dataSource properties
Array of chart definitions. Use this for simple mode (single section).
Show chart object
Show chart object
Display title of the chart.
Chart type — friendly name (e.g.,
column, pie, line, kpi) or CH code (e.g., CH00003). See Get Chart Types for all options.Array of measure definitions.
Shorthand: pass a string instead of an object to use the default aggregation (e.g.,
Show measure object
Show measure object
"revenue" is equivalent to {"field": "revenue", "aggregation": "sum"}).Using calculations: To reference a pre-computed calculation (percentage of total, weighted average, etc.) from the VDM, use "aggregation": "as-is" with the calculation’s label as the field. See Calculations for details.Array of filter conditions applied to this chart.
Max number of rows to return. Defaults to
100 if not using filter.Sort configuration. Each item:
{ "field": "columnName", "direction": "asc" | "desc" }.Chart position and size within the experiment grid. If omitted, auto-generated (KPIs:
width: 3 side-by-side, others: width: 12 stacked vertically).Chart visual settings. If omitted, sensible defaults are applied.
Show display properties
Show display properties
Show data values on the chart.
Show chart legend.
Show hover tooltips.
Include null values.
Enable chart zoom.
Show forecast line.
Show horizontal scrollbar.
Show vertical scrollbar.
Title of another chart in the same section to use as a drill-down source. Clicking the source chart filters this chart. Resolved to internal chart IDs during import.
KPI metric card styling. Only applicable for
kpi / kpi-card chart types.Show card properties
Show card properties
Icon component name (e.g.,
"BsCurrencyDollar", "ImCart").Primary icon/value color (hex, e.g.,
"#237e11").Trend-up color (hex, e.g.,
"#41d723").Trend sparkline configuration for the KPI card.
Show trend properties
Show trend properties
Measure field to trend (e.g.,
"Market Value").Date dimension for the trend x-axis (e.g.,
"Position Date").Trend grouping interval:
"Day", "Week", "Month", "Quarter", "Year".Trend display format:
"percentage" (delta %), "absolute" (delta value), or "value".Bubble chart configuration. Only applicable for
bubble chart type.Show bubble properties
Show bubble properties
Field that controls bubble size.
X-axis field. Pass a string for the field name, or an object
{"field": "...", "type": "dimension" | "measure"}.Y-axis field. Same format as
xAxis.Field that controls bubble color intensity.
Two-element array of hex colors for the min/max color gradient (e.g.,
["#98c1e7", "#1169bb"]).Array of section definitions. Use this for multi-section mode (multiple experiments, category tabs).
Show section object
Show section object
Section name — appears as the category tab label.
Same chart array format as the top-level
charts field.If
true, this section’s charts render in the always-visible top section (ideal for KPI cards).If
true, this section appears as a navigable category tab.Layout template type (e.g.,
"realEstate"). Used to resolve a layout template from the database.Exact name of a layout template. Takes priority over
templateType.Dashboard categories (e.g.,
["BI", "Sales"]).Tags for the dashboard.
"sdk-import" is always added automatically.Whether the dashboard is publicly visible.
Response
Whether the import succeeded.
The created facade ID (e.g.,
F2026A00018). Use this to view the dashboard in the UI.Array of created experiments.
Show experiment object
Show experiment object
Experiment ID (e.g.,
E2026A00042).Section name this experiment belongs to.
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"]
}'
curl -X POST https://<your-instance>/v1/sdk/import \
-H "Authorization: Bearer trvh_sdk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Executive Dashboard",
"dataSource": {"dbId": "D2026A00002", "vdmId": "VDM2026A00001", "connType": "VDM"},
"templateType": "realEstate",
"sections": [
{
"name": "KPIs",
"topSection": true,
"charts": [
{
"title": "Total Revenue",
"type": "kpi",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["period"],
"grid": {"width": 3, "height": 6, "x": 0, "y": 0},
"card": {
"icon": "BsCurrencyDollar",
"color": "#237e11",
"trend": {"field": "revenue", "dateField": "order_date", "interval": "Month", "format": "percentage"}
}
}
]
},
{
"name": "Sales",
"category": true,
"charts": [
{
"title": "Revenue by Region",
"type": "donut",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["region"],
"grid": {"width": 4, "height": 13, "x": 0, "y": 0},
"display": {"showValues": true, "showLegend": true}
},
{
"title": "Revenue by Product",
"type": "column",
"measures": [{"field": "revenue", "aggregation": "sum"}],
"dimensions": ["product"],
"drillDown": "Revenue by Region",
"grid": {"width": 8, "height": 13, "x": 4, "y": 0},
"sort": [{"field": "revenue", "direction": "desc"}]
}
]
}
]
}'
{
"success": true,
"facadeId": "F2026A00018",
"experiments": [
{
"experimentId": "E2026A00042",
"section": "Revenue Dashboard",
"charts": [
{
"chartId": "chart_1",
"chartType": "CH00003",
"chartTitle": "Revenue by Region"
}
]
}
]
}
{
"success": false,
"error": "Request body must include a non-empty 'charts' array or 'sections' array with charts"
}
{
"error": "API key required"
}
⌘I