đŸ› ī¸
Developer docs
Start BuildingGuides
  • ✨Getting Started
  • đŸŽ›ī¸Self Hosted Config
  • âœī¸SSO Login
    • Saml Identity Provider (Idp)
    • Oidc Identity Provider (Idp)
  • đŸŽžī¸Framework Specific Guide
    • âš›ī¸Reactjs
    • âš›ī¸Nextjs
    • âš›ī¸Vuejs
    • âš›ī¸Angular
    • âš›ī¸Svelte
    • âš›ī¸Solid
    • âš›ī¸Vanilla JS
  • â„šī¸Token
  • â„šī¸How to embed?
  • đŸ›ī¸Multi-Tenant Access Control
  • Embed using iFrame (Not Recommended approach)
  • 🔑License Key Validation for Self-Hosted App
  • Test
  • 👩‍đŸ’ģHelpers
    • âœŗī¸Token Body
    • ✅Options
      • Custom Fiscal Year filter setup in DataBrain
    • đŸˆ‚ī¸Server Event
    • Embed Functions
    • Override Language
    • âœˆī¸Embedding Architecture
    • âœˆī¸LLM Architecture
    • ✨LLM Connectors
      • Open AI
      • Claude AI
      • Azure Open AI
      • Llama
      • Mixtral
    • 🆔Workspace Name
    • 🆔Dashboard ID
    • 🆔Metric ID
    • 🆔API Token
    • 🆔End User Metric Creation
    • Embedding APIs
      • Sync Datasource
  • Metric App Filter
  • Dashboard App Filter
  • Chat Mode
    • Step 1: Create Datamart and Workspace
    • Step 2: Create Data App and Embed ID
  • ✨Solutions Alchemy
    • Dashboards for Client Groups
    • Dashboard for Multiple Clients
    • Embedding: Role based Dashboard Filtering
    • Localized Currency Symbols
    • Manage Metrics
Powered by GitBook
On this page
  1. Helpers

End User Metric Creation

PreviousAPI TokenNextEmbedding APIs

Last updated 26 days ago

  1. Create a Datamart

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

  1. Create a Workspace with Datamart connection

For more details, kindly refer the below link:

  1. Create a Dashboard with few defined metrics

For more details, kindly refer the below link:

  1. Create a DataApp

For more details on how to create a data app, kindly refer the below link:

  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

  • Choose the desired datamart and client ID column

  • Then, use the toggle to configure end-user options and click on "Save"

  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

Name
Type
Description

Authorization*

String

Bearer (API Token)

Request Body

Name
Type
Description

dataAppName*

String

Your Data App Name

clientId*

String

Client ID for whom this guest token is generated. ("clientId": "None", if no tenancy is selected for connected datasource/datamart)

params

Object

Additional Params: dashboard appFilters

expiryTime

Number

In milli seconds

datasourceName

String

datasource name from data studio (important* and supported in multi datasource connection in workspace)

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

Simple Request Body:

{
    "clientId": "Vaccine",
    "dataAppName":"Procurement App"
    
}

  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

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 a DatamartThis guide provides a straightforward process for creating a datamart in Databrain, allowing users to efficiently manage and analyze data.
WorkspaceSteps to Set Up and Use Multi-Datasource Switching in Your Dashboard.
Create a DashboardDashboards in Databrain allow you to visualize and organize your data effectively within a specific workspace. This guide walks you through the simple process of creating a dashboard.
Create a Data AppThis guide provides a straightforward process for creating a Data App, catering to various integration needs such as demonstration, embedded applications, and popular collaboration platforms.