Skip to main content
PUT
Modify the semantic layer metadata for an existing datamart. You can update table descriptions, column metadata, and feedback in a single request. Only the fields you include are updated — omitted tables and columns retain their existing values.
The datamart must already have a semantic layer. If no semantic data exists, this endpoint returns 404 SEMANTIC_LAYER_NOT_FOUND. Use POST to create a semantic layer first.

Authentication

This endpoint requires a service token in the Authorization header. Data app API tokens are not permitted and will be rejected with a 403 error. To access your service token:
  1. Go to your Databrain dashboard and open Settings.
  2. Navigate to Settings.
  3. Find the Service Tokens section.
  4. Click the “Generate Token” button to generate a new service token if you don’t have one already.
Use this token as the Bearer value in your Authorization header.

Headers

Authorization
string
required
Bearer token for API authentication. Use your service token.
Content-Type
string
required
Must be set to application/json for all requests.

Request Body

datamartName
string
required
Name of the existing datamart to update. Must match exactly (case-sensitive).
tables
array
Array of table objects with updated semantic metadata. Only tables and columns included in the request are modified — others remain unchanged.
tables.name
string
required
Table name from the datamart. Must match an existing table.
tables.description
string
Updated description for the table. Maximum 500 characters.
tables.synonyms
string[]
Updated synonyms for the table. Maximum 10 synonyms, each up to 100 characters. Must be unique (case-insensitive).
tables.miscellaneousInfo
string
Updated additional context. Maximum 1000 characters.
tables.columns
array
Array of column objects to update. Only listed columns are modified.
tables.columns.name
string
required
Column name from the table. Must match an existing column.
tables.columns.description
string
Updated description. Maximum 500 characters.
tables.columns.synonyms
string[]
Updated synonyms. Maximum 10 synonyms, each up to 100 characters.
tables.columns.miscellaneousInfo
string
Updated additional context. Maximum 1000 characters.
tables.columns.columnType
string
Updated semantic column type. Must be one of: String, Long String, String (Custom), ENUM, Mapper, Range, Expression, Identifier, Number, JSON. Must be compatible with the column’s underlying datatype.
tables.columns.columnTypeConfig
object | string | null
Updated configuration for the column type. Same shapes as create: object map for String / String (Custom) / ENUM / Mapper; { lowerLimit, upperLimit } (numbers) for Range; string for Expression and JSON; null or omit for Identifier, Number, and Long String.
tables.columns.isIdentifier
boolean
Updated identifier flag.
tables.columns.isNotIndexed
boolean
Updated indexing exclusion flag.
feedback
string
Updated global feedback text. Maximum 2000 characters. When provided, replaces the existing feedback.

Response

On success, the response body contains only the datamart name. There is no error field in the JSON body when the request succeeds.
id
string
The name of the updated datamart (same as the input datamartName).

Examples

HTTP Status Code Summary

Possible Errors

Quick Start Guide

1

Get current semantic layer

Retrieve the existing semantic layer before making changes:
Save this response in case you need to rollback your changes.
2

Prepare your update

Determine what you want to update:
  • Tables/Columns: Include only the tables and columns you want to change
  • Feedback: Provide the new text (replaces existing)
Unlike the datamart update API, the semantic layer update is additive for tables and columns — only the ones you include are modified.
3

Update the semantic layer

4

Verify the update

Retrieve the semantic layer again to confirm changes and check the updated completion score.

Next Steps

Get Semantic Layer

Retrieve and verify your changes

Create Semantic Layer

Create a semantic layer for a new datamart

Delete Semantic Layer

Remove semantic layer metadata entirely

Semantic Layer Guide

Configure the semantic layer in the Databrain UI