1. Create a Datamart
Create a Datamart in “Data Studio” page. Kindly refer the below link on how to create datamarts:

Create a Datamart

  1. Create a Workspace with Datamart connection
Workspacewith Datamart Pn For more details, kindly refer the below link:

Workspace

  1. Create a Dashboard
Create Dashboard Pn For more details, kindly refer the below link:

Create a Dashboard

  1. Create a DataApp
Createa Data App Gi For more details, kindly refer the below link:

Create a Data App

  1. Generate API Token
  • Navigate to the Data App.
  • In the “API Token” section, generate the API token by specifying the name of company and description (optional)
Generate API Token Gi API Methods Cloud Databrain:
POST https://api.usedatabrain.com/api/v2/dataApp/embed/{method_path}
Self-hosted Databrain:
POST <SELF_HOSTED_URL>/api/v2/dataApp/embed/{method_path}
  1. Create a Dashboard
POST https://api.usedatabrain.com/api/v2/dataApp/dashboardEmbed/create
POST <SELF_HOSTED_URL>/api/v2/dataApp/dashboardEmbed/create
{
  "dashboardId": "id",
  "clientId": "102", 
  "templateDashboardId": "demo-sales-test-dashboard", // dashboard id to clone filters
  "metadata": {"created_at": "2025-09-25", "name":"lyman's dashboard", "descriptions":"created for 102 client id, it's end user dashboard embed"}, // metadata of dashboard	
  "workspaceName": "Demo Sales API",
  "accessSettings": {
    "datamartName": "Demo Sales API Test Datamart",
    "isAllowAiPilot": true,
    "isAllowEmailReports": false,
    "isAllowManageMetrics": true,
    "isAllowMetricCreation": true,
    "isAllowMetricDeletion": true,
    "isAllowMetricLayoutChange": true,
    "isAllowMetricUpdate": true,
    "isAllowUnderlyingData": false,
	"isAllowCreateDashboardView": false,
    "metricCreationMode": "DRAG_DROP",
    "tableTenancySettings": [
      {
        "clientColumn": "client id",
        "name": "demo_sales"
      }
    ]
  }
}
// database tenancy don't require table list
  • dashboardId – Unique external dashboard ID (must not already exist).
  • workspaceName – Must match a valid workspace linked to the API token’s company.
  • clientId – Identifier of the client for which the dashboard is being created.
  • templateId – Optional. External dashboard ID of a template to clone.
  • accessSettings – Required. Defines permissions and feature access for the embed.
Create Dashboard API Result Pn
  1. Create Guest token by passing Client ID and DataApp Name
When you need a guest token that you want to use across dashboards and metrics. All you have to do is pass clientId, dataAppName. If expiryTime is not passed, the token will not expire.

Generating GUEST TOKEN for your Dashboard

Headers

NameTypeDescription
Authorization*StringBearer (API Token)

Request Body

NameTypeDescription
dataAppName*StringYour Data App Name
clientId*StringClient ID for whom this guest token is generated. ("clientId": "None" if no tenancy is selected for connected datasource/datamart)
paramsObjectAdditional Params: dashboard, appFilters
expiryTimeNumberIn milliseconds
datasourceNameStringDatasource name from Data Studio (*important and supported in multi-datasource connection in workspace)
Example Response: 200 OK “token”: ”…”
when the response is successful it returns a token that you can pass to the frontend.

When the response is successful it returns a token that you can pass to the frontend.

Simple Request Body

{
  "clientId": "102",
  "dataAppName": "Demo Sales API"
}
Once you acquire the guest token, you can seamlessly pass it to your frontend application, where it can be integrated with the web component Create Embed Pn Created Dashboardinembed Pn
  • The created dashboard will mimic the filter behavior of the cloned dashboard if a Template ID is provided.
  • Once the dashboard is created, users can start building metrics.
{
  "embedId": "id",
  "accessSettings": {
    "datamartName": "Demo Sales API Test Datamart",
    "isAllowAiPilot": true,
    "isAllowEmailReports": false,
    "isAllowManageMetrics": true,
    "isAllowMetricCreation": true,
    "isAllowMetricDeletion": true,
    "isAllowMetricLayoutChange": true,
    "isAllowMetricUpdate": true,
    "isAllowUnderlyingData": true,
	"isAllowCreateDashboardView": false,
    "metricCreationMode": "DRAG_DROP",
    "tableTenancySettings": [
      {
        "clientColumn": "client id",
        "name": "demo-sales"
      }
    ]
  }
}
Update Dashboard API Result Pn
{
  "embedId": "id"
}
Delete Dashboard API Result Pn