Semantic Layer APIs
Delete Semantic Layer
Delete the semantic layer from a datamart, removing all descriptions, synonyms, column types, and feedback.
DELETE
Permanently remove all semantic layer metadata from a datamart. This clears table descriptions, column metadata (descriptions, synonyms, column types, configs), and feedback. The underlying datamart structure (tables, columns) remains intact.
This action cannot be undone. All semantic metadata — descriptions, synonyms, column types, and feedback — will be permanently removed.
The datamart itself is not deleted. Only the semantic layer enrichments are removed. You can recreate the semantic layer using the POST endpoint.
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 delete. Must match an existing datamart that has semantic data.
Response
On success, the response body contains only the datamart name. There is noerror field in the JSON body when the request succeeds.
The name of the datamart whose semantic layer was deleted.
Examples
HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK — Semantic layer deleted successfully |
400 | Bad Request — Missing datamartName or datamart not found |
401 | Unauthorized — Invalid or missing API token |
403 | Forbidden — Data app token used instead of service token |
404 | Not Found — No semantic layer exists for this datamart |
500 | Internal Server Error — Server error occurred |
Possible Errors
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST_BODY | 400 | datamartName query parameter is missing |
INVALID_DATAMART | 400 | Datamart not found |
SEMANTIC_LAYER_NOT_FOUND | 404 | No semantic layer exists for this datamart |
AUTHENTICATION_ERROR | 403 | Data app token used instead of service token |
INTERNAL_SERVER_ERROR | 500 | Server error |
Best Practices
Backup First
Use the GET endpoint to save a copy of the semantic layer before deleting
Check Dependencies
AI chat mode relies on the semantic layer — verify impact before deleting
Quick Start Guide
Next Steps
Create Semantic Layer
Recreate the semantic layer with fresh metadata
Get Semantic Layer
Verify the deletion
Semantic Layer Guide
Configure the semantic layer in the Databrain UI
List Datamarts
View your datamarts

