- Create a Datamart
Create a Datamart
- Create a Workspace with Datamart connection

Workspace
- Create a Dashboard with few defined metrics


Create a Dashboard
- Create a DataApp

Create a Data App
- 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.

- Generate API Token

- 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:
- Guest token — if the token sets
permissions.isDisableMetricCreation: true, metric creation is off no matter what else is configured. - Data App Access Control — the server-side setting you enable in this step.
- Embed component —
options.disableMetricCreationondbn-dashboardhides the UI client-side. There is noisAllowMetricCreationembed prop — the component option isdisableMetricCreation.

- Create Guest token by passing Client ID and DataApp Name
clientId, dataAppName. If expiryTime is not passed, the token will not expire.
Cloud Databrain:
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: appFilters, rlsSettings, userIdentifier, allowedEmbeds — see Token Body |
| expiryTime | Number | In milliseconds. If omitted, the token never expires |
| 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
- End User Metric Creation / Updation
- 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

- 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


