Skip to main content
  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
For more details, kindly refer the below link:

Workspace

  1. Create a Dashboard with few defined metrics
For more details, kindly refer the below link:

Create a Dashboard

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

Create a Data App

  1. Create an Embed Type using either dashboard or metric
  • Navigate to the Data App.
  • In the “Embed Info” section, create an embed type using workspace name, embed type: dashboard or metric, name of dashboard or metric.
  1. Generate API Token
In the “API Token” section, generate the API token by specifying the name of company and description (optional)
  1. Configure options in Access control section
  • Navigate to the Data App.
  • In the “Access Control” section, enable Metric Creation for the embed.
Metric creation is controlled at three levels, in priority order:
  1. Guest token — if the token sets permissions.isDisableMetricCreation: true, metric creation is off no matter what else is configured.
  2. Data App Access Control — the server-side setting you enable in this step.
  3. Embed componentoptions.disableMetricCreation on dbn-dashboard hides the UI client-side. There is no isAllowMetricCreation embed prop — the component option is disableMetricCreation.
  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. Cloud Databrain:
POST https://api.usedatabrain.com/api/v2/guest-token/create
Self-hosted Databrain:
POST <SELF_HOSTED_URL>/api/v2/guest-token/create

Generating GUEST TOKEN for your Dashboard/Metric Component

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: appFilters, rlsSettings, userIdentifier, allowedEmbeds — see Token Body
expiryTimeNumberIn milliseconds. If omitted, the token never expires
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": "Vaccine",
  "dataAppName": "Procurement App"
}
Once you acquire the guest token, you can seamlessly pass it to your frontend application, where it can be integrated with the web component.
  1. End User Metric Creation / Updation
Metric Creation
  • Click on the “+Create Metric” button near the settings icon
  • Drag and drop necessary dimensions and measures to create the metric
  • Then, click on “Save” icon at the top right corner and specify metric details to save the metric to dashboard
Metric Updation
  • View the metric in full screen and click on the “Edit Metric” button
  • Update the metric according to your requirements and save it to dashboard