Semantic Layer APIs
Semantic layer APIs
Add descriptions, synonyms and column types to a datamart so Bryn and metric builders understand your data.
The semantic layer is text on a datamart’s tables and columns: descriptions, synonyms, a column type, and a note on the whole datamart. Bryn reads it to answer questions in your own words.
| Task | Endpoint |
|---|---|
| Get a semantic layer | GET /api/v2/data-app/datamarts/semantic-layer |
| Create a semantic layer | POST /api/v2/data-app/datamarts/semantic-layer |
| Update a semantic layer | PUT /api/v2/data-app/datamarts/semantic-layer |
| Delete a semantic layer | DELETE /api/v2/data-app/datamarts/semantic-layer |
Before you start
- You have a service token. A data app API token gets
403. See Authentication. - The datamart exists. See Create a datamart.
Datamarts with a semantic model
A datamart that you model in Data Studio > Semantic Models belongs to its semantic model. Create, update and delete refuse it with 409 LAYER_MANAGED_BY_V2, so the API and the app cannot overwrite each other. Edit it in the app. You can still read it with GET. See Semantic models.
Next, create a semantic layer.