Semantic Layer APIs
Delete a semantic layer
Clear all descriptions, synonyms and column types of a datamart.
DELETE
The datamart, its tables, columns and joins stay. Only the semantic text goes, and the completion score becomes 0.
curl --request DELETE \ "https://api.usedatabrain.com/api/v2/data-app/datamarts/semantic-layer?datamartName=Sales" \ --header "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN"You cannot undo this. Read the layer with GET first if you want to keep a copy.
Auth
A service token only. See Authentication.
ServiceTokenheader
AuthorizationBearer <token>A service token. A data app API token is refused.
Query
The datamart.
Response
{ "id": "Sales" }Errors
| Status | error.code | Why |
|---|---|---|
| 400 | INVALID_REQUEST_BODY | datamartName is missing |
| 400 | INVALID_DATAMART | No datamart has this name |
| 403 | AUTHENTICATION_ERROR | You used a data app API token |
| 404 | SEMANTIC_LAYER_NOT_FOUND | The datamart has no semantic layer, or you already deleted it |
| 409 | LAYER_MANAGED_BY_V2 | The datamart belongs to a semantic model. Edit it in the app |
For errors that every endpoint returns, see Authentication.
curl -X DELETE 'https://api.usedatabrain.com/api/v2/data-app/datamarts/semantic-layer?datamartName=string'Example Response
{ "id": "Sales"}