Datamart APIs
List Datamarts
Retrieve a list of all datamarts in your data app with their configurations and access settings.
GET
Get a comprehensive list of all datamarts in your data app, including their configurations, datasources, and access settings. Useful for managing and auditing your data organization.
Use this endpoint for all new integrations. This is the recommended endpoint format.
This endpoint returns all datamarts you have access to within the authenticated data app. The response includes metadata and access permissions for each datamart.
Use the
expandDetails parameter when you only need names and organization metadata and want a smaller payload: when expandDetails is false, datamartTables and datamartRelationships are omitted from each item (see Query Parameters).Endpoint Formats
- New Endpoint (Recommended)
- Legacy Endpoint (Deprecated Soon)
Authentication
This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions.- In Settings page, navigate to the Service Tokens section.
- Click the “Generate Token” button to create a new service token if you don’t have one already.
Headers
Bearer token for API authentication. Use your service token.
Query Parameters
Enable pagination for the results. Pass
"true" to enable pagination with a limit of 10 per page.Note: Query parameters are passed as strings. Use "true" or "false" (not boolean values).Page number to retrieve (1-based). Only used when isPagination is
"true". Must be a numeric string (e.g., "1", "2", "3").GET only (query string). Controls whether each datamart includes
datamartTables (with datamartTableColumns) and datamartRelationships in the response.- If the
expandDetailsquery parameter is omitted, the route passesexpandDetails: trueintogetDatamartList(expanded). - If present, use the strings
"true"or"false"(the server compares to'true').
false), each item still includes name, createdAt, updatedAt, datamartOrganization, and companyIntegration.Legacy POST accepts expandDetails in the JSON body; the route coerces it to a boolean before getDatamartListSchema runs (see the Legacy tab). Omit expandDetails to default to expanded details.Note: On GET, query parameters are strings — use "true" or "false", not raw booleans.Validation:
getDatamartListSchema allows optional isPagination (boolean), pageNumber (number), and expandDetails (boolean). On GET /api/v2/data-app/datamarts, query strings are mapped first: isPagination is true only when equal to "true"; pageNumber uses parseInt when present; expandDetails defaults to true when the query parameter is omitted, otherwise it is true only when the string equals "true". On POST /api/v2/dataApp/datamart/list, isPagination and pageNumber are taken from the JSON body as-is; expandDetails is normalized from the body, then the same schema validates the combined payload inside getDatamartList.Response
The
datamartTables and datamartRelationships fields documented below are present only when expanded details are enabled (expandDetails not set to false). With expandDetails=false, rely on name, createdAt, updatedAt, datamartOrganization, and companyIntegration only.Array of datamart objects with their configuration details.
The name of the datamart.
Organization settings for the datamart.
The tenancy level (
TABLE, DATABASE, or MULTI_DATABASE).Schema name for the organization table.
Table name for the organization.
Type of the client column.
Primary database name for
DATABASE or MULTI_DATABASE tenancy. null when not set or when tenancy level is TABLE.Column name for client identification.
Primary key column name.
Integration details for the datamart.
Name of the datasource integration.
Array of tables included in the datamart.
Schema name of the table.
Name of the table.
Label for the table providing a human-readable display name. Empty string when not set.
Client/tenant column configured for this table.
null when not set.Indicates whether the table is hidden in the datamart UI. Defaults to
false.Array of columns in the table.
Name of the column.
Data type of the column.
Alias for the column.
Label for the column providing better readability.
Indicates whether the column is hidden in the datamart UI. Defaults to
false.Indicates whether this is a custom/calculated column defined by a SQL expression.
true when the column was created with isCustomColumn: true.The SQL expression for custom columns. Empty string when
isCustomColumn is false.Indicates whether timezone conversion is enabled for this column. When
true, datetime values are converted at query time using the timezone specified in params.timezone of the guest token. Defaults to false.Array of relationships defined between tables in the datamart. Can be an empty array if no relationships are configured.
Name of the parent table in the relationship.
Column name in the parent table that participates in the relationship.
Name of the child table in the relationship.
Column name in the child table that participates in the relationship.
Descriptive name for the relationship.
The cardinality of the relationship. Can be:
ManyToMany, ManyToOne, OneToMany, OneToOne, or null if not specified.The type of SQL join used. Can be:
INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, or null if not specified.Error field, null when successful.
Examples
Error Codes
Missing or invalid data app - Check your API key and data app configuration
Unexpected failure - Internal server error occurred
HTTP Status Code Summary
| Status Code | Description |
|---|---|
| 200 | OK - Request successful |
| 400 | Bad Request - Invalid request parameters or missing API key |
| 401 | Unauthorized - Invalid or expired API token |
| 500 | Internal Server Error - Unexpected server error |
Possible Errors
| Code | Message | HTTP Status |
|---|---|---|
| INVALID_DATA_APP_API_KEY | Missing or invalid data app | 400 |
| INTERNAL_SERVER_ERROR | Unexpected failure | 500 |
Usage Examples
Basic Usage
With Pagination
Processing Results
Best Practices
Use Pagination
Use pagination for data apps with many datamarts
Cache Results
Cache datamart lists to reduce API calls
Error Handling
Always handle API errors gracefully
Monitor Usage
Monitor API usage and response times
Quick Start Guide
Get your API token
For detailed instructions, see the Create Service Token guide.
List all datamarts
Make a simple request to see all your datamarts:Note: You can add query parameters for pagination if needed.
Use pagination for large lists
If you have many datamarts, enable pagination using query parameters:
Next Steps
Create Datamart
Create new datamarts for your data app
Delete Datamart
Remove datamarts you no longer need
Embed a Pre-built Dashboard/Metric
Create embeddable configurations for your datamarts
Guest Token API
Generate secure tokens for embedded access

