Skip to main content
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.
Endpoint Migration Notice: We’re transitioning to kebab-case endpoints. The new endpoint is /api/v2/data-app/datamarts. The old endpoint /api/v2/dataApp/datamarts will be deprecated soon. Please update your integrations to use the new 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

Authentication

This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions.
  1. In Settings page, navigate to the Service Tokens section.
  2. Click the “Generate Token” button to create a new service token if you don’t have one already.
Use this token as the Bearer value in your Authorization header.

Headers

string
required
Bearer token for API authentication. Use your service token.

Query Parameters

string
default:"false"
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).
string
default:"1"
Page number to retrieve (1-based). Only used when isPagination is "true". Must be a numeric string (e.g., "1", "2", "3").
string
GET only (query string). Controls whether each datamart includes datamartTables (with datamartTableColumns) and datamartRelationships in the response.
  • If the expandDetails query parameter is omitted, the route passes expandDetails: true into getDatamartList (expanded).
  • If present, use the strings "true" or "false" (the server compares to 'true').
When expanded details are off (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
Array of datamart objects with their configuration details.
string
The name of the datamart.
object
Organization settings for the datamart.
string
The tenancy level (TABLE, DATABASE, or MULTI_DATABASE).
string
Schema name for the organization table.
string
Table name for the organization.
string
Type of the client column.
string | null
Primary database name for DATABASE or MULTI_DATABASE tenancy. null when not set or when tenancy level is TABLE.
string
Column name for client identification.
string
Primary key column name.
object
Integration details for the datamart.
string
Name of the datasource integration.
array
Array of tables included in the datamart.
string
Schema name of the table.
string
Name of the table.
string
Label for the table providing a human-readable display name. Empty string when not set.
string | null
Client/tenant column configured for this table. null when not set.
boolean
Indicates whether the table is hidden in the datamart UI. Defaults to false.
array
Array of columns in the table.
string
Name of the column.
string
Data type of the column.
string
Alias for the column.
string
Label for the column providing better readability.
boolean
Indicates whether the column is hidden in the datamart UI. Defaults to false.
boolean
Indicates whether this is a custom/calculated column defined by a SQL expression. true when the column was created with isCustomColumn: true.
string
The SQL expression for custom columns. Empty string when isCustomColumn is false.
boolean
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.
string | null
Default sort direction configured for the column. Returns ASC, DESC, or null when no default sort is configured.
array
Array of relationships defined between tables in the datamart. Can be an empty array if no relationships are configured.
string
Name of the parent table in the relationship.
string
Column name in the parent table that participates in the relationship.
string
Name of the child table in the relationship.
string
Column name in the child table that participates in the relationship.
string
Descriptive name for the relationship.
string | null
The cardinality of the relationship. Can be: ManyToMany, ManyToOne, OneToMany, OneToOne, or null if not specified.
string | null
The type of SQL join used. Can be: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, or null if not specified.
null
Error field, null when successful.

Examples

Error Codes

string
Missing or invalid data app - Check your API key and data app configuration
string
Unexpected failure - Internal server error occurred

HTTP Status Code Summary

Possible Errors

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

1

Get your API token

For detailed instructions, see the Create Service Token guide.
2

List all datamarts

Make a simple request to see all your datamarts:
Note: You can add query parameters for pagination if needed.
3

Use pagination for large lists

If you have many datamarts, enable pagination using query parameters:
4

Process the results

Use the datamart information for embed configurations:

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