What is a Data App?
A Data App is a configured package of dashboards and metrics ready for embedding into your application. It acts as the bridge between your DataBrain workspace and your external application, managing authentication, permissions, and access control for embedded analytics.Why Use Data Apps?
Embedding Ready
Pre-configured for easy integration into your app
Access Control
Manage who can see what with built-in security
API Token
Generate tokens for secure communication
Multi-Tenant
Support multiple customers with data isolation
Key Components
Dashboards & Metrics
Select which dashboards and metrics from your workspace should be available in the Data App.API Token
Each Data App has a unique API token used to generate guest tokens for end users.Embed Configuration
Settings that control how embedded components behave and what features are available.Client Access
Define which clients (customers/users) can access the Data App and their data.Creating a Data App
1
Navigate to Data Apps
Go to the Data section in your workspace and click “Data Apps”
2
Create New Data App
Click “New Data App” and provide a name
3
Select Dashboards
Choose which dashboards to include in the Data App
4
Configure Settings
Set up permissions, multi-tenancy, and other options
5
Get API Token
Copy your API token for use in generating guest tokens
Create a Data App
Detailed guide on creating Data Apps
Data App Settings
General Settings
- Data App name and description
- Associated workspace
- Default datasource (for multi-datasource setups)
Embedding Configuration
- Allowed domains for embedding
- Default permissions for embedded views
- Custom branding options
Security Settings
- Token expiration policies
- IP whitelisting
- SSL/TLS requirements
API Token Management
The API token is used to authenticate requests from your backend to generate guest tokens.Never expose your API token in frontend code. Always generate guest tokens from your backend server.
Token Best Practices
- Store tokens securely (environment variables, secrets manager)
- Rotate tokens periodically
- Use different tokens for development and production
- Monitor token usage
API Token Helper
Learn about API token management
Guest Token Generation
Guest tokens are temporary tokens that give end users access to your embedded dashboards.How It Works
Token Flow:Generate Guest Token
Guest Token API
Complete guest token API reference
Multi-Tenancy
Data Apps support multi-tenant architectures where each customer sees only their own data.Row-Level Security (RLS)
Filter data automatically based on the client ID:Client Isolation
Each client gets a unique view of the data with automatic filtering applied.Multi-Tenant Access Control
Implement multi-tenancy in your app
Embedding Workflow
1
Create Data App
Set up your Data App in the DataBrain platform
2
Get API Token
Copy your API token from the Data App settings
3
Install NPM Package
4
Generate Guest Tokens
Create guest tokens from your backend for each user
5
Embed Components
Permissions & Features
Control what embedded users can do:Metric Permissions
- Archive metrics
- Download metrics
- View underlying data
- Edit metrics
- Create new metrics
Dashboard Permissions
- Customize layout
- Manage metrics
- Create dashboard views
- Download dashboards
UI Options
- Show/hide sidebar
- Show/hide dashboard name
- Show/hide filters
- Enable full-screen mode
Token Body Structure
Complete list of permission options
Use Cases
SaaS Analytics
Embed customer-specific dashboards in your SaaS product. Each customer sees only their data.White-Label BI
Provide fully branded analytics to your clients under your brand.Internal Tools
Build custom internal dashboards for your team with controlled access.Partner Portals
Give partners access to relevant metrics and reports through embedded dashboards.Advanced Configuration
Custom Filters
Pre-apply filters based on user context:Dynamic Data Sources
Switch data sources based on the client:Monitoring & Analytics
Track usage of your Data App:- Active users
- Most viewed dashboards
- Query performance
- Error rates
- Token generation frequency
Best Practices
Secure Token Generation
Secure Token Generation
Always generate guest tokens server-side. Never expose API tokens in client code.
Set Token Expiry
Set Token Expiry
Use appropriate expiry times for guest tokens. Short-lived tokens are more secure.
Test with Different Clients
Test with Different Clients
Verify that RLS and data isolation work correctly for different client IDs.
Monitor Performance
Monitor Performance
Track query performance and optimize slow dashboards.
Version Your Apps
Version Your Apps
Maintain separate Data Apps for development, staging, and production.