REST API
API: Search
Semantic search across dashboards, metrics, model fields, and saved queries. All endpoints require authentication unless noted. 2 endpoints, 1 of them app only: an API key gets 403 there.
POST /api/search/semantic
Section titled “POST /api/search/semantic”Search dashboards, metrics, model fields and saved queries by meaning
Two lanes. By meaning (signed in only; never for an API key): the query is matched against the catalog by meaning, which uses AI credits, as the person searching, and every hit is checked again against the live dashboards, metrics, fields and saved queries. By words (an API key’s, and whenever matching by meaning is not available): close matches of the words over the live tables, plus the business glossary — a query matching a glossary term or synonym also searches the term’s vocabulary and brings its linked metrics and fields directly. mode says which lane answered: vector by meaning, lexical by words. Only when both fail is the response {semantic:false, reason, hits:[]}, telling clients to fall back to plain /api/search. A field with a sensitivity label is found by its name and marked labelled: true; its description shows only to people who may read labelled values in clear (never an API key), unless it is plain words with no value, personal detail or secret in it.
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
q |
string | yes | |
kinds |
array of "dashboard" | "metric" | "model_field" | "saved_query" |
no | |
limit |
integer | no |
Responses: 200 · 400 · 401 · 404
POST /api/search/semantic/reindex
Section titled “POST /api/search/semantic/reindex”Force-refresh the semantic index for the caller’s workspace (AIX-13, admin)
App only. An API key gets 403: AI features are available in the DataSquares app; API keys can’t use them.
Re-embeds the workspace’s dashboards, metrics, model fields and saved queries for search by meaning (with force: false, only the ones that changed), which uses the workspace’s AI credits. Company admins only, signed in.
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
force |
boolean | no |
Responses: 200 · 400 · 401 · 403 · 404