Semantic Layer APIs
Get Semantic Layer
Retrieve the semantic layer configuration for a datamart, including table descriptions, column metadata, and completion score.
GET
Retrieve the full semantic layer for a given datamart. The response includes table and column metadata (descriptions, synonyms, column types), feedback text, a completion score, and the last-updated timestamp.
This endpoint returns data for datamarts that exist in your organization — even if no semantic layer has been configured yet. In that case, tables are returned with
null/empty semantic fields.Authentication
This endpoint requires a service token in the Authorization header. Data app API tokens are not permitted and will be rejected with a403 error.
To access your service token:
- Go to your Databrain dashboard and open Settings.
- Navigate to Settings.
- Find the Service Tokens section.
- Click the “Generate Token” button to generate a new service token if you don’t have one already.
Headers
Bearer token for API authentication. Use your service token.
Query Parameters
The name of the datamart whose semantic layer you want to retrieve. Must match an existing datamart in your organization.
Response
The semantic layer data for the requested datamart.
Error object if the request failed, otherwise not present for successful requests.
Examples
HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK — Semantic layer retrieved successfully |
400 | Bad Request — Missing or invalid datamartName |
401 | Unauthorized — Invalid or missing API token |
403 | Forbidden — Data app token used instead of service token |
500 | Internal Server Error — Server error occurred |
Possible Errors
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_DATAMART | 400 | datamartName is missing or datamart doesn’t exist |
AUTHENTICATION_ERROR | 403 | Data app token used instead of service token |
INTERNAL_SERVER_ERROR | 500 | Server error |
Next Steps
Create Semantic Layer
Add semantic metadata to your datamart
Update Semantic Layer
Modify existing semantic layer metadata
Semantic Layer Guide
Learn how to configure the semantic layer in the UI
List Datamarts
Find datamart names in your organization

