{ "openapi": "3.1.0", "info": { "title": "Auto Ontology API", "version": "1.1.0", "description": "Public HTTP surface of Auto Ontology, served by the Next.js route handlers. Generated by `pnpm openapi` — do not edit by hand." }, "security": [ { "ApiToken": [] } ], "paths": { "/api/acronyms": { "get": { "tags": ["acronyms"], "summary": "List every acronym, newest first.", "description": "List every acronym, newest first.\n\nWith `?name=`, the route answers `{ exists }` instead of listing — the create\nform uses it to pre-check the unique constraint before submitting.", "operationId": "get_api_acronyms", "parameters": [ { "name": "name", "in": "query", "required": false, "description": "When given, the route answers the existence check instead of listing.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Every acronym, newest first — or `{ \"exists\": true|false }` when `name` is given, which the create form uses to check the unique constraint.", "content": { "application/json": { "schema": { "anyOf": [ { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "description": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "description", "created_at", "updated_at" ], "additionalProperties": false } }, { "type": "object", "properties": { "exists": { "type": "boolean" } }, "required": ["exists"], "additionalProperties": false } ] } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/acronyms/route.ts", "x-auto-ontology-permissions": { "acronym": ["read"] }, "x-auto-ontology-proxied": false }, "post": { "tags": ["acronyms"], "summary": "Create an acronym: the term plus the expansion the agent should read it as.", "description": "Create an acronym: the term plus the expansion the agent should read it as.\n\n`name` must be unique; `description` is optional and defaults to empty.", "operationId": "post_api_acronyms", "requestBody": { "required": true, "description": "`name` is unique across the instance.", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name"] } } } }, "responses": { "201": { "description": "The created acronym.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "description": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "description", "created_at", "updated_at" ], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "500": { "description": "`name` is already taken (the unique-constraint error is not mapped to a 409)." } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/acronyms/route.ts", "x-auto-ontology-permissions": { "acronym": ["create"] }, "x-auto-ontology-proxied": false } }, "/api/acronyms/{id}": { "delete": { "tags": ["acronyms"], "summary": "Delete an acronym permanently.", "description": "Delete an acronym permanently. Answers 204 with no body.", "operationId": "delete_api_acronyms_id_", "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Acronym id." } ], "responses": { "204": { "description": "Deleted. No body." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "500": { "description": "The acronym does not exist (the Prisma error is not mapped to a 404)." } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/acronyms/[id]/route.ts", "x-auto-ontology-permissions": { "acronym": ["delete"] }, "x-auto-ontology-proxied": false }, "patch": { "tags": ["acronyms"], "summary": "Update an acronym's name or description.", "description": "Update an acronym's name or description.\n\nBoth fields are optional and only the ones present in the body are written,\nso a partial body leaves the rest of the record untouched.", "operationId": "patch_api_acronyms_id_", "requestBody": { "required": true, "description": "Both fields are optional; non-string values are ignored.", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } } } } } }, "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Acronym id." } ], "responses": { "200": { "description": "The updated acronym.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "description": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "description", "created_at", "updated_at" ], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "500": { "description": "The acronym does not exist (the Prisma error is not mapped to a 404)." } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/acronyms/[id]/route.ts", "x-auto-ontology-permissions": { "acronym": ["update"] }, "x-auto-ontology-proxied": false } }, "/api/analytics": { "get": { "tags": ["analytics"], "summary": "Viewing the analytics report requires the analytics:read permission (admin).", "description": "Viewing the analytics report requires the analytics:read permission (admin).", "operationId": "get_api_analytics", "parameters": [ { "name": "skip", "in": "query", "required": false, "description": "Rows to skip. Unparseable values fall back to 0.", "schema": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, { "name": "limit", "in": "query", "required": false, "description": "Page size. Omitted returns every row in the window.", "schema": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } } ], "responses": { "200": { "description": "One page of the trailing 30-day question log, newest first. `total` counts the whole window, not the page.", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string" }, "source": { "type": "string", "description": "`app` for the web UI, `api` for direct/API callers." }, "question": { "type": "string" }, "question_timestamp": { "type": "string", "format": "date-time" }, "response": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Null while the answer is still streaming." }, "response_timestamp": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "sql": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" }, "role": { "type": "string", "description": "`admin` or `viewer`; `viewer` when the column is null." } }, "required": ["id", "name", "email", "role"], "additionalProperties": false } }, "required": [ "id", "user_id", "source", "question", "question_timestamp", "response", "response_timestamp", "sql", "user" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["data", "total"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/analytics/route.ts", "x-auto-ontology-permissions": { "analytics": ["read"] }, "x-auto-ontology-proxied": false } }, "/api/api-tokens": { "get": { "tags": ["api-tokens"], "summary": "List the caller's own API tokens.", "description": "List the caller's own API tokens.\n\nMetadata only: tokens are stored hashed, so the plaintext value is never\nreturned again after creation. Requires a browser session — an API token may\nnot enumerate tokens.", "operationId": "get_api_api_tokens", "responses": { "200": { "description": "The caller’s own API tokens.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "First characters of the token, e.g. `auto_ontology_a1b2c3`." }, "enabled": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "`null` when the token never expires." }, "last_request": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "`null` until the token is first used." } }, "required": [ "id", "name", "start", "enabled", "created_at", "expires_at", "last_request" ], "additionalProperties": false } } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "These routes require a signed-in session: a token may not mint or revoke tokens, so a leaked one cannot issue itself successors." } }, "security": [ { "SessionCookie": [] } ], "x-auto-ontology-source": "frontend/app/api/api-tokens/route.ts", "x-auto-ontology-permissions": { "apiToken": ["manage"] }, "x-auto-ontology-proxied": false }, "post": { "tags": ["api-tokens"], "summary": "Mint a new API token for the caller, carrying the caller's own permissions.", "description": "Mint a new API token for the caller, carrying the caller's own permissions.\n\n`expires_in_days` is optional — omitting it mints a non-expiring token, which\nis what an unattended script usually wants. The response is the only place the\nplaintext token ever appears; it is stored hashed and cannot be shown again.\nRequires a browser session — a token may not mint another token.", "operationId": "post_api_api_tokens", "requestBody": { "required": true, "description": "Omit `expires_in_days` for a token that never expires.", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Label shown in the token list." }, "expires_in_days": { "type": "number", "minimum": 1, "maximum": 365 } }, "required": ["name"] } } } }, "responses": { "201": { "description": "The created token. `token` is the plaintext secret and is returned only here — Auto Ontology stores just its hash.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "First characters of the token, e.g. `auto_ontology_a1b2c3`." }, "enabled": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "`null` when the token never expires." }, "last_request": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "`null` until the token is first used." }, "token": { "type": "string" } }, "required": [ "id", "name", "start", "enabled", "created_at", "expires_at", "last_request", "token" ], "additionalProperties": false } } } }, "400": { "description": "`name` is missing, or `expires_in_days` is out of range." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "These routes require a signed-in session: a token may not mint or revoke tokens, so a leaked one cannot issue itself successors." } }, "security": [ { "SessionCookie": [] } ], "x-auto-ontology-source": "frontend/app/api/api-tokens/route.ts", "x-auto-ontology-permissions": { "apiToken": ["manage"] }, "x-auto-ontology-proxied": false } }, "/api/api-tokens/{id}": { "delete": { "tags": ["api-tokens"], "summary": "Revoke a token.", "description": "Revoke a token. Deletion is immediate and irreversible — the next request\ncarrying that token fails to resolve a user and gets a 401. The plugin scopes\nthe delete to the session user, so `id` can only ever name the caller's own\ntoken; an id belonging to someone else reads back as \"not found\".", "operationId": "delete_api_api_tokens_id_", "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Id of one of the caller’s own tokens." } ], "responses": { "200": { "description": "The token is revoked; requests carrying it now fail with 401.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller authenticated with an API token — revocation requires a session." }, "404": { "description": "No such token belongs to the caller." } }, "security": [ { "SessionCookie": [] } ], "x-auto-ontology-source": "frontend/app/api/api-tokens/[id]/route.ts", "x-auto-ontology-permissions": { "apiToken": ["manage"] }, "x-auto-ontology-proxied": false } }, "/api/auth/{all}": { "get": { "tags": ["auth"], "summary": "Better Auth's GET surface: session lookup and the SSO callbacks.", "description": "Better Auth's GET surface: session lookup and the SSO callbacks.\n\nPublic by design — sign-in and the callback that completes it must both be\nreachable without a session. The plugin's own `/api/auth/api-key/*` routes\nare blocked here so `/api/api-tokens` stays the single way to manage tokens.", "operationId": "get_api_auth_all_", "parameters": [ { "schema": { "type": "string" }, "name": "all", "in": "path", "required": true } ], "responses": { "200": { "description": "Handled by Better Auth; the body depends on `{all}`. See https://better-auth.com/docs for the per-endpoint contracts.", "content": { "application/json": { "schema": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } } } }, "404": { "description": "`{all}` is not a Better Auth route." } }, "security": [], "x-auto-ontology-source": "frontend/app/api/auth/[...all]/route.ts", "x-auto-ontology-permissions": "public", "x-auto-ontology-proxied": false }, "post": { "tags": ["auth"], "summary": "Better Auth's POST surface: sign-in, sign-out, and the SSO callbacks.", "description": "Better Auth's POST surface: sign-in, sign-out, and the SSO callbacks.\n\nPublic for the same reason GET is — none of it can require a session. The\nplugin's own `/api/auth/api-key/*` management routes are blocked here so\n`/api/api-tokens` stays the single way to mint or revoke a token.", "operationId": "post_api_auth_all_", "parameters": [ { "schema": { "type": "string" }, "name": "all", "in": "path", "required": true } ], "responses": { "200": { "description": "Handled by Better Auth; the body depends on `{all}`. See https://better-auth.com/docs for the per-endpoint contracts.", "content": { "application/json": { "schema": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } } } }, "404": { "description": "`{all}` is not a Better Auth route." } }, "security": [], "x-auto-ontology-source": "frontend/app/api/auth/[...all]/route.ts", "x-auto-ontology-permissions": "public", "x-auto-ontology-proxied": false } }, "/api/chat/cancel": { "post": { "tags": ["chat"], "summary": "Abort the agent run in flight for a conversation the caller owns.", "description": "Abort the agent run in flight for a conversation the caller owns.\n\nThis is what makes the chat UI's Stop button actually stop the run rather than\nmerely detach the browser from it: an abandoned run keeps the conversation's\nslot claimed and the next question is rejected with 409. Cancelling ends the\nrun without a final answer, so the persisted user turn keeps no assistant\nreply. 404 when the conversation does not exist or belongs to someone else.", "operationId": "post_api_chat_cancel", "x-auto-ontology-upstream": "/api/chat/cancel", "parameters": [ { "name": "conversation_id", "in": "query", "required": true, "description": "Conversation whose in-flight run to abort. Must belong to the caller.", "schema": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCancelResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "Missing/unknown `conversationId`, or it belongs to another user.", "content": { "text/plain": { "schema": { "type": "string", "const": "Conversation not found" } } } }, "502": { "description": "The backend refused the cancel. The upstream status is used when it has one, 502 otherwise; the body is plain text either way.", "content": { "text/plain": { "schema": { "type": "string", "const": "Upstream cancel request failed" } } } } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/chat/cancel/route.ts", "x-auto-ontology-permissions": { "conversation": ["write"] }, "x-auto-ontology-proxied": false } }, "/api/chat/completions": { "post": { "tags": ["chat"], "summary": "Ask a question and stream the answer back as Server-Sent Events.", "description": "Ask a question and stream the answer back as Server-Sent Events.\n\nFastAPI emits the SQL plus the formatted answer first (`result`), then —\nwhen that answer has an executed result — generates and persists the\nchart/table bubble itself and streams it back as its own `charts` event\nbefore the stream closes. No second request needed from this route or the\nbrowser. Passing `conversation_id` persists the turn and additionally\nrequires `conversation: ['write']`; the route answers 409 while that\nconversation already has a run in flight. Omitting it runs the question\nstatelessly, with no history and no chart step.", "operationId": "post_api_chat_completions", "x-auto-ontology-upstream": "/api/chat/completions", "requestBody": { "required": true, "description": "SQL plus a formatted answer, streamed as SSE. When the answer has an executed result, the backend also generates and persists a chart (or fallback table) and streams it back on this same connection as its own `charts` event — no follow-up call needed. Reuse one `conversation_id` for follow-up turns; an unknown UUID creates a conversation, while an ID owned by another user returns 404. Omitting `conversation_id` runs the question statelessly, with no history and no chart step.", "content": { "application/json": { "schema": { "type": "object", "properties": { "question": { "type": "string", "minLength": 1 }, "evidence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "conversation_id": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "target_db": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "prediction": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": ["question"] } } } }, "responses": { "200": { "content": { "text/event-stream": { "schema": { "type": "string" } } }, "description": "Server-sent events; the stream ends with `data: [DONE]`" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "409": { "description": "Relayed from the backend: a run is already in flight for this conversation, or the semantic layer has not been compiled yet.", "content": { "application/json": { "schema": { "type": "object", "properties": { "detail": { "type": "string" } }, "required": ["detail"], "additionalProperties": false } } } }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/chat/completions/route.ts", "x-auto-ontology-permissions": { "chat": ["use"] }, "x-auto-ontology-proxied": false } }, "/api/chat/watch": { "get": { "tags": ["chat"], "summary": "Reattach to a chat run already in progress, as a Server-Sent Events stream.", "description": "Reattach to a chat run already in progress, as a Server-Sent Events stream.\n\nA reloaded or reopened tab uses this to follow a run it did not start. It is a\npassive observer: it never submits a question and persists nothing, so a\ndropped watch connection has no effect on the run or on what gets saved. 400\nwithout `conversation_id`, 404 when the conversation is not the caller's.", "operationId": "get_api_chat_watch", "x-auto-ontology-upstream": "/api/chat/watch", "parameters": [ { "name": "conversation_id", "in": "query", "required": true, "description": "Conversation whose in-flight run to observe. Must belong to the caller.", "schema": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } ], "responses": { "200": { "content": { "text/event-stream": { "schema": { "type": "string" } } }, "description": "Server-sent events; the stream ends with `data: [DONE]`" }, "400": { "description": "No `conversation_id` was given.", "content": { "text/plain": { "schema": { "type": "string", "const": "Missing conversation_id" } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "Unknown conversation, or it belongs to another user.", "content": { "text/plain": { "schema": { "type": "string", "const": "Conversation not found" } } } }, "502": { "description": "The backend refused the watch. The upstream status is used when it has one, 502 otherwise; the body is plain text either way.", "content": { "text/plain": { "schema": { "type": "string", "const": "Upstream watch request failed" } } } } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/chat/watch/route.ts", "x-auto-ontology-permissions": { "conversation": ["read"] }, "x-auto-ontology-proxied": false } }, "/api/columns/{table_id}": { "get": { "description": "datasources.getColumnsForTable — list columns for one table.", "operationId": "get_api_columns_table_id_", "parameters": [ { "in": "path", "name": "table_id", "required": true, "schema": { "title": "Table Id", "type": "string" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectPageResponse_TableColumns_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Columns By Table", "tags": ["columns"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/columns/[table_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/configurations/distinct-value-probing": { "get": { "tags": ["configurations"], "summary": "Report whether compilation scans low-cardinality columns for distinct values.", "description": "Report whether compilation scans low-cardinality columns for distinct values.", "operationId": "get_api_configurations_distinct_value_probing", "responses": { "200": { "description": "Whether semantic compilation samples live column values. On when unset, unlike semantic compilation itself.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/distinct-value-probing/route.ts", "x-auto-ontology-permissions": { "semanticCompilation": ["read"] }, "x-auto-ontology-proxied": false }, "put": { "tags": ["configurations"], "summary": "Turn distinct value scanning on or off instance-wide (admin-only).", "description": "Turn distinct value scanning on or off instance-wide (admin-only).\n\nDeliberately does NOT trigger a compilation run. The flag is read at the top\nof each run, so it applies from the next one onward — flipping it is a change\nof policy, not a request to recompile. Operators who want it applied now can\nuse Reset, which is on the same page.\n\nRejects a non-boolean `enabled` rather than coercing it, which is why this\ndiffers from the sibling configuration routes. Those flags are opt-in, so\ncoercing a malformed value to false lands on their default and is harmless.\nThis one is opt-out: coercion would silently turn OFF something that is on by\ndefault, so `{\"enabled\": \"true\"}` from a shell client would disable scanning\nwhile reading as if it enabled it.", "operationId": "put_api_configurations_distinct_value_probing", "requestBody": { "required": true, "description": "`enabled` must be a boolean. This flag is opt-out, so coercing a malformed value would silently turn scanning off.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"] } } } }, "responses": { "200": { "description": "The stored flag. Takes effect from the next compilation run; this does not trigger one.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"], "additionalProperties": false } } } }, "400": { "description": "Body is not JSON, or `enabled` is not a boolean." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/distinct-value-probing/route.ts", "x-auto-ontology-permissions": { "semanticCompilation": ["manage"] }, "x-auto-ontology-proxied": false } }, "/api/configurations/pii-detection": { "get": { "tags": ["configurations"], "summary": "Report whether ingest classifies catalog columns as PII.", "description": "Report whether ingest classifies catalog columns as PII.", "operationId": "get_api_configurations_pii_detection", "responses": { "200": { "description": "Whether ingest classifies catalog columns as PII. Off when unset, so a fresh instance reports `false`.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/pii-detection/route.ts", "x-auto-ontology-permissions": { "pii": ["read"] }, "x-auto-ontology-proxied": false }, "put": { "tags": ["configurations"], "summary": "Turn PII detection on or off instance-wide (admin-only).", "description": "Turn PII detection on or off instance-wide (admin-only).\n\nDeliberately does NOT trigger an ingest. The flag is read at the start of\neach ingest's PII step, so it applies from the next one onward — flipping it\nis a change of policy, not a request to re-scan. Existing PII tags are left\nin place.\n\nRejects a non-boolean `enabled` rather than coercing it, so\n`{\"enabled\": \"true\"}` from a shell client cannot silently disagree with\nwhat the page would show after a save.", "operationId": "put_api_configurations_pii_detection", "requestBody": { "required": true, "description": "`enabled` must be a boolean. A malformed value is rejected rather than coerced.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"] } } } }, "responses": { "200": { "description": "The stored flag. Takes effect from the next ingest; this does not trigger one.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"], "additionalProperties": false } } } }, "400": { "description": "Body is not JSON, or `enabled` is not a boolean." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/pii-detection/route.ts", "x-auto-ontology-permissions": { "pii": ["manage"] }, "x-auto-ontology-proxied": false } }, "/api/configurations/semantic-compilation": { "get": { "tags": ["configurations"], "summary": "Report whether scheduled semantic compilation is enabled instance-wide.", "description": "Report whether scheduled semantic compilation is enabled instance-wide.", "operationId": "get_api_configurations_semantic_compilation", "responses": { "200": { "description": "Whether scheduled semantic compilation is on. Off when unset.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/semantic-compilation/route.ts", "x-auto-ontology-permissions": { "semanticCompilation": ["read"] }, "x-auto-ontology-proxied": false }, "put": { "tags": ["configurations"], "summary": "Turn scheduled semantic compilation on or off instance-wide (admin-only).", "description": "Turn scheduled semantic compilation on or off instance-wide (admin-only).\n\nEnabling also kicks off a compilation run immediately and starts the ingestion\nservice's scheduler, so the change takes effect without a restart. That\ntrigger is best-effort: the setting is still saved if the service is down, and\nthe scheduler picks the flag up on its next boot.", "operationId": "put_api_configurations_semantic_compilation", "requestBody": { "required": true, "description": "Anything other than `true` turns the flag off.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"] } } } }, "responses": { "200": { "description": "The stored flag. Enabling also triggers a compilation run best-effort, so a 200 does not promise the ingestion service was reachable.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/semantic-compilation/route.ts", "x-auto-ontology-permissions": { "semanticCompilation": ["manage"] }, "x-auto-ontology-proxied": false } }, "/api/configurations/sql-query-timeout": { "get": { "tags": ["configurations"], "summary": "Key/value stored in the `configurations` table.", "description": "Key/value stored in the `configurations` table. The text-to-SQL pipeline\nreads this same key (see auto_ontology/infra/feature_flags.py) before each\nstatement it issues, and cancels the statement once it runs this long. An\nabsent row means 30 seconds, which is also what a backend running without\nthis frontend uses.\nReport the instance-wide SQL query timeout, in seconds.", "operationId": "get_api_configurations_sql_query_timeout", "responses": { "200": { "description": "How long a SQL statement issued by the text-to-SQL agent may run before it is cancelled. 30 when unset.", "content": { "application/json": { "schema": { "type": "object", "properties": { "seconds": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Statement timeout in seconds." } }, "required": ["seconds"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/sql-query-timeout/route.ts", "x-auto-ontology-permissions": { "visualization": ["read"] }, "x-auto-ontology-proxied": false }, "put": { "tags": ["configurations"], "summary": "Set the instance-wide SQL query timeout (admin-only).", "description": "Set the instance-wide SQL query timeout (admin-only).\n\nRejects anything but an in-range integer rather than coercing it: the backend\ntreats an unusable stored value as the default, so a coerced value would be\nsilently ignored while the page showed it as saved.", "operationId": "put_api_configurations_sql_query_timeout", "requestBody": { "required": true, "description": "`seconds` must be an integer from 1 to 3600.", "content": { "application/json": { "schema": { "type": "object", "properties": { "seconds": { "type": "integer", "minimum": 1, "maximum": 3600 } }, "required": ["seconds"] } } } }, "responses": { "200": { "description": "The stored timeout. Applies from the next statement.", "content": { "application/json": { "schema": { "type": "object", "properties": { "seconds": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Statement timeout in seconds." } }, "required": ["seconds"], "additionalProperties": false } } } }, "400": { "description": "Body is not JSON, or `seconds` is not an in-range integer." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/sql-query-timeout/route.ts", "x-auto-ontology-permissions": { "visualization": ["manage"] }, "x-auto-ontology-proxied": false } }, "/api/configurations/visualization": { "get": { "tags": ["configurations"], "summary": "Report whether the instance-wide \"Visualize SQL Results\" setting is on.", "description": "Report whether the instance-wide \"Visualize SQL Results\" setting is on.\n\nThe flag lives under Settings > Agent Settings, stored in the\n`configurations` key/value table. The chat proxy route resolves the value per\nrequest, so a client cannot override it.", "operationId": "get_api_configurations_visualization", "responses": { "200": { "description": "Whether SQL results are auto-visualised. On when unset, so a fresh instance reports `true`.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/visualization/route.ts", "x-auto-ontology-permissions": { "visualization": ["read"] }, "x-auto-ontology-proxied": false }, "put": { "tags": ["configurations"], "summary": "Turn the instance-wide \"Visualize SQL Results\" setting on or off (admin-only).", "description": "Turn the instance-wide \"Visualize SQL Results\" setting on or off (admin-only).\n\nChat resolves the value per request, so the change takes effect on the next\nquestion without a client reload. It gates chart *generation* only — the\nresult table still renders when it is off.", "operationId": "put_api_configurations_visualization", "requestBody": { "required": true, "description": "Anything other than `true` turns the flag off.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"] } } } }, "responses": { "200": { "description": "The stored flag.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/configurations/visualization/route.ts", "x-auto-ontology-permissions": { "visualization": ["manage"] }, "x-auto-ontology-proxied": false } }, "/api/connections": { "get": { "description": "connectionsApi.getAll — list connections (viewable by all).", "operationId": "get_api_connections", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_PublicConnection_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "List Connections", "tags": ["connections"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/connections/route.ts", "x-auto-ontology-permissions": { "connection": ["read"] }, "x-auto-ontology-proxied": true }, "post": { "description": "connectionsApi.create — add a connection (admin only; carries credentials).", "operationId": "post_api_connections", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionBody" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_PublicConnection_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Connection", "tags": ["connections"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/connections/route.ts", "x-auto-ontology-permissions": { "connection": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/connections/{database_name}": { "delete": { "description": "connectionsApi.delete — remove a connection (admin only).", "operationId": "delete_api_connections_database_name_", "parameters": [ { "description": "Catalog database name, which doubles as the connection's identity.", "in": "path", "name": "database_name", "required": true, "schema": { "description": "Catalog database name, which doubles as the connection's identity.", "title": "Database Name", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_PublicConnection_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete Connection", "tags": ["connections"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/connections/[database_name]/route.ts", "x-auto-ontology-permissions": { "connection": ["manage"] }, "x-auto-ontology-proxied": true }, "put": { "description": "connectionsApi.update — rewrite a connection's settings (admin only).", "operationId": "put_api_connections_database_name_", "parameters": [ { "description": "Catalog database name, which doubles as the connection's identity.", "in": "path", "name": "database_name", "required": true, "schema": { "description": "Catalog database name, which doubles as the connection's identity.", "title": "Database Name", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionBody" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_PublicConnection_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Connection", "tags": ["connections"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/connections/[database_name]/route.ts", "x-auto-ontology-permissions": { "connection": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/connections/{database_name}/sso-federation": { "patch": { "description": "connectionsApi.setSsoFederation — toggle \"authenticate as signed-in user\"\non an existing connection (admin only).", "operationId": "patch_api_connections_database_name_sso_federation", "parameters": [ { "description": "Catalog database name, which doubles as the connection's identity.", "in": "path", "name": "database_name", "required": true, "schema": { "description": "Catalog database name, which doubles as the connection's identity.", "title": "Database Name", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SsoFederationBody" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SsoFederationState_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Set Sso Federation", "tags": ["connections"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/connections/[database_name]/sso-federation/route.ts", "x-auto-ontology-permissions": { "connection": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/connections/source": { "get": { "description": "connectionsApi.isEnvSource — whether connections come from env config.", "operationId": "get_api_connections_source", "responses": { "200": { "content": { "application/json": { "schema": { "title": "Response Is Env Source Api Connections Source Get", "type": "boolean" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "Is Env Source", "tags": ["connections"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/connections/source/route.ts", "x-auto-ontology-permissions": { "connection": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/connections/test": { "post": { "description": "connectionsApi.test — validate a connection config (admin only).", "operationId": "post_api_connections_test", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionTestBody" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionTestResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Test Connection", "tags": ["connections"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/connections/test/route.ts", "x-auto-ontology-permissions": { "connection": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/conversations": { "get": { "tags": ["conversations"], "summary": "List the caller's own conversations, newest first, without their messages.", "description": "List the caller's own conversations, newest first, without their messages.\n\nScoped to the authenticated user: a conversation is only ever visible to its\nowner, so there is no way to list someone else's.", "operationId": "get_api_conversations", "responses": { "200": { "description": "The caller's own conversations, newest first.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "description": "Owner of the conversation; always the caller." }, "title": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "user_id", "title", "created_at", "updated_at" ], "additionalProperties": false } } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/conversations/route.ts", "x-auto-ontology-permissions": { "conversation": ["read"] }, "x-auto-ontology-proxied": false }, "post": { "tags": ["conversations"], "summary": "Start a new, empty conversation owned by the caller.", "description": "Start a new, empty conversation owned by the caller.\n\n`title` is optional and defaults to empty. Chat clients usually create the\nconversation here first, then pass its id to `POST /api/chat/completions`.", "operationId": "post_api_conversations", "requestBody": { "required": true, "description": "An omitted title creates the conversation with an empty one.", "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" } } } } } }, "responses": { "201": { "description": "The created conversation.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "description": "Owner of the conversation; always the caller." }, "title": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "user_id", "title", "created_at", "updated_at" ], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/conversations/route.ts", "x-auto-ontology-permissions": { "conversation": ["write"] }, "x-auto-ontology-proxied": false } }, "/api/conversations/{id}": { "delete": { "tags": ["conversations"], "summary": "Delete a conversation and its messages; 404 when it is not the caller's.", "description": "Delete a conversation and its messages; 404 when it is not the caller's.\n\nAnswers 204 with no body. The delete cascades to the conversation's messages.", "operationId": "delete_api_conversations_id_", "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Conversation id. Must belong to the caller; someone else’s id answers 404." } ], "responses": { "204": { "description": "Deleted. No body." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "No such conversation, or it belongs to another user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/conversations/[id]/route.ts", "x-auto-ontology-permissions": { "conversation": ["delete"] }, "x-auto-ontology-proxied": false }, "get": { "tags": ["conversations"], "summary": "Fetch one conversation with its full message history, oldest message first.", "description": "Fetch one conversation with its full message history, oldest message first.\n\nScoped to the caller, so another user's conversation reads as 404 rather than\n403 — ownership is not disclosed.", "operationId": "get_api_conversations_id_", "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Conversation id. Must belong to the caller; someone else’s id answers 404." } ], "responses": { "200": { "description": "The conversation with its messages in chronological order.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "description": "Owner of the conversation; always the caller." }, "title": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "conversation_id": { "type": "string", "format": "uuid" }, "role": { "type": "string", "description": "`user` or `assistant`." }, "content": { "type": "string" }, "sql_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "SQL the assistant produced, when it produced any." }, "sql_response": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Serialised result table / chart payload for the bubble." }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "conversation_id", "role", "content", "sql_code", "sql_response", "created_at" ], "additionalProperties": false } } }, "required": [ "id", "user_id", "title", "created_at", "updated_at", "messages" ], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "No such conversation, or it belongs to another user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/conversations/[id]/route.ts", "x-auto-ontology-permissions": { "conversation": ["read"] }, "x-auto-ontology-proxied": false }, "patch": { "tags": ["conversations"], "summary": "Rename a conversation the caller owns; 404 when it is not theirs.", "description": "Rename a conversation the caller owns; 404 when it is not theirs.", "operationId": "patch_api_conversations_id_", "requestBody": { "required": true, "description": "Rename the conversation.", "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" } } } } } }, "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Conversation id. Must belong to the caller; someone else’s id answers 404." } ], "responses": { "200": { "description": "The updated conversation.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "description": "Owner of the conversation; always the caller." }, "title": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "user_id", "title", "created_at", "updated_at" ], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "No such conversation, or it belongs to another user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/conversations/[id]/route.ts", "x-auto-ontology-permissions": { "conversation": ["write"] }, "x-auto-ontology-proxied": false } }, "/api/conversations/{id}/messages": { "post": { "tags": ["conversations"], "summary": "Append a message to a conversation the caller owns.", "description": "Append a message to a conversation the caller owns.\n\nThe manual path, for clients that record their own turns; the chat routes\npersist their messages themselves via FastAPI, so a normal chat flow never\ncalls this. Also bumps the conversation's `updated_at`. 404 when the\nconversation does not exist or belongs to someone else.", "operationId": "post_api_conversations_id_messages", "requestBody": { "required": true, "description": "Chat turns are written by `POST /api/chat/completions` itself; this route is for callers that persist a turn they produced some other way.", "content": { "application/json": { "schema": { "type": "object", "properties": { "role": { "type": "string", "description": "`user` or `assistant`." }, "content": { "type": "string" }, "sql_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sql_response": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["role"] } } } }, "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Conversation to append the message to. Must belong to the caller." } ], "responses": { "201": { "description": "The created message.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "conversation_id": { "type": "string", "format": "uuid" }, "role": { "type": "string", "description": "`user` or `assistant`." }, "content": { "type": "string" }, "sql_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "SQL the assistant produced, when it produced any." }, "sql_response": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Serialised result table / chart payload for the bubble." }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "conversation_id", "role", "content", "sql_code", "sql_response", "created_at" ], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "No such conversation, or it belongs to another user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/conversations/[id]/messages/route.ts", "x-auto-ontology-permissions": { "conversation": ["write"] }, "x-auto-ontology-proxied": false } }, "/api/custom-analyses": { "get": { "description": "Anyone may list custom analyses; only admins (analysis:manage) may add one.", "operationId": "get_api_custom_analyses", "parameters": [ { "description": "Case-insensitive substring filter on the analysis name.", "in": "query", "name": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Case-insensitive substring filter on the analysis name.", "title": "Query" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedListResponse_CustomAnalysis_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Custom Analyses", "tags": ["custom-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-analyses/route.ts", "x-auto-ontology-permissions": { "analysis": ["read"] }, "x-auto-ontology-proxied": true }, "post": { "description": "Create a new CustomAnalysis with its Sql node.\n\nStrict insert: input shape is enforced by :class:`CustomAnalysisCreate`\nand the frontend is responsible for trimming and rejecting blank\nvalues before sending. Updating an existing analysis goes through\n``PUT /custom-analyses/{analysis_id}``.\n\nReturns 409 when ``name`` or ``sql`` is already used by another\nCustomAnalysis (both are unique natural keys), and 422 when the SQL\ncan't be parsed against the current catalog (no recognised tables) —\nwithout those references the analysis would be invisible to\nretrieval.", "operationId": "post_api_custom_analyses", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomAnalysisCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_CustomAnalysis_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Custom Analysis", "tags": ["custom-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-analyses/route.ts", "x-auto-ontology-permissions": { "analysis": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/custom-analyses/{analysis_id}": { "delete": { "description": "Delete a CustomAnalysis (with its Sql node and VDB embedding).\n\nReturns 404 when no CustomAnalysis with ``analysis_id`` exists.\nOn success the deleted ``{\"id\": ...}`` is echoed so the UI can\nconfirm the targeted record was removed.", "operationId": "delete_api_custom_analyses_analysis_id_", "parameters": [ { "in": "path", "name": "analysis_id", "required": true, "schema": { "title": "Analysis Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_IdRef_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete Custom Analysis", "tags": ["custom-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-analyses/[analysis_id]/route.ts", "x-auto-ontology-permissions": { "analysis": ["manage"] }, "x-auto-ontology-proxied": true }, "put": { "description": "Editing/deleting a custom analysis is admin-only (analysis:manage).", "operationId": "put_api_custom_analyses_analysis_id_", "parameters": [ { "in": "path", "name": "analysis_id", "required": true, "schema": { "title": "Analysis Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomAnalysisCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_CustomAnalysis_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Custom Analysis", "tags": ["custom-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-analyses/[analysis_id]/route.ts", "x-auto-ontology-permissions": { "analysis": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/custom-analyses/validate": { "post": { "description": "Validating SQL is part of the create/edit flow, so it shares the same\nanalysis:manage permission as POST /custom-analyses.", "operationId": "post_api_custom_analyses_validate", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomAnalysisValidate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SqlValidationResult_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Validate Custom Analysis Sql", "tags": ["custom-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-analyses/validate/route.ts", "x-auto-ontology-permissions": { "analysis": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/custom-prompts": { "get": { "tags": ["custom-prompts"], "summary": "List every custom prompt: the instance-wide prompt overrides the agent uses.", "description": "List every custom prompt: the instance-wide prompt overrides the agent uses.", "operationId": "get_api_custom_prompts", "responses": { "200": { "description": "Every custom prompt, in no particular order.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "content": { "type": "string" } }, "required": ["id", "content"], "additionalProperties": false } } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-prompts/route.ts", "x-auto-ontology-permissions": { "prompt": ["read"] }, "x-auto-ontology-proxied": false }, "post": { "tags": ["custom-prompts"], "summary": "Create a custom prompt from `content`, which defaults to empty when omitted.", "description": "Create a custom prompt from `content`, which defaults to empty when omitted.", "operationId": "post_api_custom_prompts", "requestBody": { "required": true, "description": "An omitted `content` creates an empty prompt.", "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string" } } } } } }, "responses": { "201": { "description": "The created prompt.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "content": { "type": "string" } }, "required": ["id", "content"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-prompts/route.ts", "x-auto-ontology-permissions": { "prompt": ["create"] }, "x-auto-ontology-proxied": false } }, "/api/custom-prompts/{id}": { "delete": { "tags": ["custom-prompts"], "summary": "Delete a custom prompt permanently.", "description": "Delete a custom prompt permanently. Answers 204 with no body.", "operationId": "delete_api_custom_prompts_id_", "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Custom prompt id." } ], "responses": { "204": { "description": "Deleted. No body." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "500": { "description": "The prompt does not exist (the Prisma error is not mapped to a 404)." } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-prompts/[id]/route.ts", "x-auto-ontology-permissions": { "prompt": ["delete"] }, "x-auto-ontology-proxied": false }, "get": { "tags": ["custom-prompts"], "summary": "Fetch one custom prompt by id; 404 when no prompt has that id.", "description": "Fetch one custom prompt by id; 404 when no prompt has that id.", "operationId": "get_api_custom_prompts_id_", "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Custom prompt id." } ], "responses": { "200": { "description": "The prompt.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "content": { "type": "string" } }, "required": ["id", "content"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "No prompt with that id.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-prompts/[id]/route.ts", "x-auto-ontology-permissions": { "prompt": ["read"] }, "x-auto-ontology-proxied": false }, "patch": { "tags": ["custom-prompts"], "summary": "Update a custom prompt's text.", "description": "Update a custom prompt's text. `content` is the only writable field, and a\nbody without it leaves the prompt unchanged.", "operationId": "patch_api_custom_prompts_id_", "requestBody": { "required": true, "description": "Only `content` is writable; a non-string value is ignored.", "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string" } } } } } }, "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Custom prompt id." } ], "responses": { "200": { "description": "The updated prompt.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "content": { "type": "string" } }, "required": ["id", "content"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "500": { "description": "The prompt does not exist (the Prisma error is not mapped to a 404)." } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/custom-prompts/[id]/route.ts", "x-auto-ontology-permissions": { "prompt": ["update"] }, "x-auto-ontology-proxied": false } }, "/api/datasources/dbs": { "get": { "description": "datasources.getDBs — list databases.", "operationId": "get_api_datasources_dbs", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_DatabaseSummary_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "List Databases", "tags": ["datasources"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/datasources/dbs/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/column-attributes/{attr_id}/details": { "get": { "description": "explorationApi.getColumnAttributeExplorationDetails — a ColumnAttribute's own owning Term, for expanding it on the graph.", "operationId": "get_api_exploration_column_attributes_attr_id_details", "parameters": [ { "in": "path", "name": "attr_id", "required": true, "schema": { "title": "Attr Id", "type": "string" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_ColumnAttributeExplorationDetails_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Column Attribute Exploration Details", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/column-attributes/[attr_id]/details/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/columns/{column_id}/details": { "get": { "description": "explorationApi.getColumnExplorationDetails — the Column's own ColumnAttribute, for expanding it on the graph.", "operationId": "get_api_exploration_columns_column_id_details", "parameters": [ { "in": "path", "name": "column_id", "required": true, "schema": { "title": "Column Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_ColumnExplorationDetails_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Column Exploration Details", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/columns/[column_id]/details/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/edges": { "get": { "description": "explorationApi.getEdges — table connections backed by a shared SQL query or a foreign key.", "operationId": "get_api_exploration_edges", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_ExplorationEdge_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "List Data Exploration Edges", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/edges/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/graph": { "get": { "description": "explorationApi.getDataExplorationGraph — full data-layer graph ({nodes, links}).", "operationId": "get_api_exploration_graph", "parameters": [ { "description": "Max nodes returned when database_id is omitted; always capped at 500. Ignored when database_id is set.", "in": "query", "name": "limit", "required": false, "schema": { "default": 500, "description": "Max nodes returned when database_id is omitted; always capped at 500. Ignored when database_id is set.", "minimum": 1, "title": "Limit", "type": "integer" } }, { "description": "When set, scope the graph to this database and skip the 500-node cap that applies to the unfiltered catalog.", "in": "query", "name": "database_id", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "When set, scope the graph to this database and skip the 500-node cap that applies to the unfiltered catalog.", "title": "Database Id" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_DataExplorationGraph_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Data Exploration Graph", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/graph/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/nodes/{node_id}/relationships": { "get": { "description": "explorationApi.getRelatedNodes — a page of related Exploration nodes.", "operationId": "get_api_exploration_nodes_node_id_relationships", "parameters": [ { "description": "Table id when *layer* is ``data``, Term id when it is ``semantic``.", "in": "path", "name": "node_id", "required": true, "schema": { "description": "Table id when *layer* is ``data``, Term id when it is ``semantic``.", "title": "Node Id", "type": "string" } }, { "description": "Which graph to walk: ``data`` relates tables sharing a SQL query or a foreign key, ``semantic`` relates terms sharing a table.", "in": "query", "name": "layer", "required": true, "schema": { "description": "Which graph to walk: ``data`` relates tables sharing a SQL query or a foreign key, ``semantic`` relates terms sharing a table.", "enum": ["data", "semantic"], "title": "Layer", "type": "string" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_ExplorationRelatedNodes_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Exploration Node Relationships", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/nodes/[node_id]/relationships/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/semantic-graph": { "get": { "description": "explorationApi.getSemanticExplorationGraph — full semantic-layer graph ({nodes, links}).", "operationId": "get_api_exploration_semantic_graph", "parameters": [ { "description": "Max nodes returned when database_id is omitted; always capped at 500. Ignored when database_id is set.", "in": "query", "name": "limit", "required": false, "schema": { "default": 500, "description": "Max nodes returned when database_id is omitted; always capped at 500. Ignored when database_id is set.", "minimum": 1, "title": "Limit", "type": "integer" } }, { "description": "When set, return every term linked to a table in this database. The 500-node cap that applies to the unfiltered glossary is skipped.", "in": "query", "name": "database_id", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "When set, return every term linked to a table in this database. The 500-node cap that applies to the unfiltered glossary is skipped.", "title": "Database Id" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SemanticExplorationGraph_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Semantic Exploration Graph", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/semantic-graph/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/sql-attributes/{attr_id}/details": { "get": { "description": "explorationApi.getSqlAttributeExplorationDetails — a SqlAttribute's own Sql query and owning Term, for expanding it on the graph.", "operationId": "get_api_exploration_sql_attributes_attr_id_details", "parameters": [ { "in": "path", "name": "attr_id", "required": true, "schema": { "title": "Attr Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SqlAttributeExplorationDetails_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Sql Attribute Exploration Details", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/sql-attributes/[attr_id]/details/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/sql/{sql_id}/details": { "get": { "description": "explorationApi.getSqlExplorationDetails — the CustomAnalysis, Column, Table and SqlAttribute nodes hanging off this Sql node, for expanding it on the graph.", "operationId": "get_api_exploration_sql_sql_id_details", "parameters": [ { "in": "path", "name": "sql_id", "required": true, "schema": { "title": "Sql Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SqlExplorationDetails_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Sql Exploration Details", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/sql/[sql_id]/details/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/tables/{table_id}/details": { "get": { "description": "explorationApi.getTableExplorationDetails — columns-adjacent SQL and Term details for one table.", "operationId": "get_api_exploration_tables_table_id_details", "parameters": [ { "in": "path", "name": "table_id", "required": true, "schema": { "title": "Table Id", "type": "string" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_TableExplorationDetails_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Table Exploration Details", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/tables/[table_id]/details/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/tables/zones": { "get": { "description": "explorationApi.getTableZonesMap — {table_id: [zone, ...]} map.", "operationId": "get_api_exploration_tables_zones", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_dict_str__list_ZoneChip___" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "List Table Zones", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/tables/zones/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/terms/{term_id}/details": { "get": { "description": "explorationApi.getTermExplorationDetails — Tables linked to one term, for expanding it on the graph.", "operationId": "get_api_exploration_terms_term_id_details", "parameters": [ { "in": "path", "name": "term_id", "required": true, "schema": { "title": "Term Id", "type": "string" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_TermExplorationDetails_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Term Exploration Details", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/terms/[term_id]/details/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/exploration/terms/{term_id}/path/{other_term_id}": { "get": { "description": "explorationApi.getSemanticLinkPath — the real hop chain connecting two terms, for\nhighlighting a clicked term↔term edge on the graph.", "operationId": "get_api_exploration_terms_term_id_path_other_term_id_", "parameters": [ { "in": "path", "name": "term_id", "required": true, "schema": { "title": "Term Id", "type": "string" } }, { "in": "path", "name": "other_term_id", "required": true, "schema": { "title": "Other Term Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_ExplorationLinkPath_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Semantic Link Path", "tags": ["exploration"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/exploration/terms/[term_id]/path/[other_term_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/groups": { "get": { "description": "groupsApi.getAll — list groups. Admin only: each group names its members.", "operationId": "get_api_groups", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_Group_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "groupsApi.getAll — list groups.", "tags": ["groups"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/groups/route.ts", "x-auto-ontology-permissions": { "group": ["read"] }, "x-auto-ontology-proxied": true }, "post": { "description": "groupsApi.create — add a group. The identity header is what the backend\nchecks for the admin role, so it has to be the caller this gate just resolved.", "operationId": "post_api_groups", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Group_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "groupsApi.create — add a group.", "tags": ["groups"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/groups/route.ts", "x-auto-ontology-permissions": { "group": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/groups/{group_id}": { "delete": { "description": "groupsApi.delete — remove a group and its membership.", "operationId": "delete_api_groups_group_id_", "parameters": [ { "in": "path", "name": "group_id", "required": true, "schema": { "title": "Group Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_IdRef_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete Group", "tags": ["groups"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/groups/[group_id]/route.ts", "x-auto-ontology-permissions": { "group": ["manage"] }, "x-auto-ontology-proxied": true }, "get": { "description": "groupsApi — one group. The path is forwarded as-is, so the id stays in the URL.", "operationId": "get_api_groups_group_id_", "parameters": [ { "in": "path", "name": "group_id", "required": true, "schema": { "title": "Group Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Group_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "groupsApi — one group.", "tags": ["groups"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/groups/[group_id]/route.ts", "x-auto-ontology-permissions": { "group": ["read"] }, "x-auto-ontology-proxied": true }, "patch": { "description": "groupsApi.update — edit a group or replace its members.", "operationId": "patch_api_groups_group_id_", "parameters": [ { "in": "path", "name": "group_id", "required": true, "schema": { "title": "Group Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Group_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Group", "tags": ["groups"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/groups/[group_id]/route.ts", "x-auto-ontology-permissions": { "group": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/health": { "get": { "tags": ["health"], "summary": "Liveness/readiness probe for the Next.js tier, unauthenticated by design.", "description": "Liveness/readiness probe for the Next.js tier, unauthenticated by design.\n\nProbes Postgres and answers 200 `{ status: 'ok' }`, or 503\n`{ status: 'degraded' }` carrying the failing check's error detail.", "operationId": "get_api_health", "responses": { "200": { "description": "Postgres answered a `SELECT 1`.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "const": "ok" }, "postgres": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "const": "ok" } }, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "const": "error" }, "detail": { "type": "string" } }, "required": ["status", "detail"], "additionalProperties": false, "description": "`detail` is the driver error, truncated to 200 characters." } ] } }, "required": ["status", "postgres"], "additionalProperties": false } } } }, "503": { "description": "Postgres is unreachable; the probe body carries the reason.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "const": "degraded" }, "postgres": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "const": "ok" } }, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "const": "error" }, "detail": { "type": "string" } }, "required": ["status", "detail"], "additionalProperties": false, "description": "`detail` is the driver error, truncated to 200 characters." } ] } }, "required": ["status", "postgres"], "additionalProperties": false } } } } }, "security": [], "x-auto-ontology-source": "frontend/app/api/health/route.ts", "x-auto-ontology-permissions": "public", "x-auto-ontology-proxied": false } }, "/api/invitations": { "get": { "tags": ["invitations"], "summary": "List unused invites (active or expired).", "description": "List unused invites (active or expired). Accepted rows are deleted on\nredeem, so they never appear here. Active rows include `url`.", "operationId": "get_api_invitations", "responses": { "200": { "description": "Unused invites (active or expired). Accepted invites are deleted. `url` is set only while active.", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitations": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": ["admin", "viewer"] }, "kind": { "type": "string", "enum": ["invite", "reset"] }, "status": { "type": "string", "enum": ["active", "expired"] }, "expires_at": { "type": "string" }, "created_at": { "type": "string" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "email", "name", "role", "kind", "status", "expires_at", "created_at", "url" ], "additionalProperties": false } } }, "required": ["invitations"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/invitations/route.ts", "x-auto-ontology-permissions": { "user": ["list"] }, "x-auto-ontology-proxied": false }, "post": { "tags": ["invitations"], "summary": "Create an email-bound invite link.", "description": "Create an email-bound invite link. The token is returned in `url` and kept\nwhile the invite is active so the list can copy it later. No email is sent.\nReplaces any unused invite for the same address.", "operationId": "post_api_invitations", "requestBody": { "required": true, "description": "Email-bound invite. No mail is sent; copy `url` and share it.", "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": ["admin", "viewer"] } }, "required": ["email", "role"] } } } }, "responses": { "201": { "description": "The invite link. Active invites also expose `url` on GET.", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string" }, "email": { "type": "string" }, "expires_at": { "type": "string" } }, "required": ["url", "email", "expires_at"], "additionalProperties": false } } } }, "400": { "description": "`email` or `role` is missing or invalid." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "409": { "description": "A user with this email already exists." } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/invitations/route.ts", "x-auto-ontology-permissions": { "user": ["create"] }, "x-auto-ontology-proxied": false } }, "/api/invitations/{token}": { "delete": { "tags": ["invitations"], "summary": "Permanently remove an unused invitation by id.", "description": "Permanently remove an unused invitation by id. An active link stops\nredeeming. Accept already deletes the invite; the user account stays.", "operationId": "delete_api_invitations_token_", "parameters": [ { "schema": { "type": "string" }, "name": "token", "in": "path", "required": true, "description": "Invitation id." } ], "responses": { "200": { "description": "The invitation is gone. An unused link stops redeeming; the user account is not deleted.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "No invitation with that id." } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/invitations/[token]/route.ts", "x-auto-ontology-permissions": { "user": ["delete"] }, "x-auto-ontology-proxied": false } }, "/api/invitations/{token}/accept": { "post": { "tags": ["invitations"], "summary": "Redeem an invite: join creates the account, reset updates the existing password.", "description": "Redeem an invite: join creates the account, reset updates the existing\npassword. Public — the unguessable token is the credential. One-shot.", "operationId": "post_api_invitations_token_accept", "requestBody": { "required": true, "description": "Password for the invited email. A join invite creates the account; a reset invite updates the existing password.", "content": { "application/json": { "schema": { "type": "object", "properties": { "password": { "type": "string", "minLength": 8, "maxLength": 128 } }, "required": ["password"] } } } }, "parameters": [ { "schema": { "type": "string" }, "name": "token", "in": "path", "required": true } ], "responses": { "200": { "description": "Password saved and the invitation is deleted. The caller should then sign in with this email.", "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" } }, "required": ["email"], "additionalProperties": false } } } }, "400": { "description": "Password is missing or outside 8–128 characters." }, "404": { "description": "The invitation is invalid, expired, or already used." }, "409": { "description": "A user with this email already exists." } }, "security": [], "x-auto-ontology-source": "frontend/app/api/invitations/[token]/accept/route.ts", "x-auto-ontology-permissions": "public", "x-auto-ontology-proxied": false } }, "/api/invitations/reset": { "post": { "tags": ["invitations"], "summary": "Password reset for an existing user: mint an invite bound to that account.", "description": "Password reset for an existing user: mint an invite bound to that account.\nThe user row stays; redeeming the link updates the credential password.", "operationId": "post_api_invitations_reset", "requestBody": { "required": true, "description": "Id of the existing user who should set a new password via invite link.", "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" } }, "required": ["userId"] } } } }, "responses": { "201": { "description": "A reset invite for that user. The account is unchanged until they redeem `url`.", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string" }, "email": { "type": "string" }, "expires_at": { "type": "string" } }, "required": ["url", "email", "expires_at"], "additionalProperties": false } } } }, "400": { "description": "`userId` is missing, or the caller is resetting themselves." }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "404": { "description": "No user with that id." } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/invitations/reset/route.ts", "x-auto-ontology-permissions": { "user": ["set-password"] }, "x-auto-ontology-proxied": false } }, "/api/model/export": { "post": { "description": "modelInterchangeApi.exportModel — download the catalog + semantic layer as a\nYAML file. Admin-only: it can include every connection's schema.", "operationId": "post_api_model_export", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/x-yaml": { "schema": { "type": "string" } }, "application/zip": { "schema": { "format": "binary", "type": "string" } } }, "description": "Auto Ontology model YAML, or with include_ontology a zip of the Apache Ossie semantic model, ontology and mapping, sent as a file attachment" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Export Model", "tags": ["model"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/model/export/route.ts", "x-auto-ontology-permissions": { "modelInterchange": ["export"] }, "x-auto-ontology-proxied": true } }, "/api/model/import": { "post": { "description": "modelInterchangeApi.importModel — upload a native Auto Ontology or Apache Ossie model\nYAML file and apply it to the catalog + semantic layer. Admin-only: can\nreplace existing data.", "operationId": "post_api_model_import", "parameters": [ { "in": "query", "name": "replace", "required": false, "schema": { "default": true, "title": "Replace", "type": "boolean" } }, { "in": "query", "name": "embed", "required": false, "schema": { "default": true, "title": "Embed", "type": "boolean" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_import_model_api_model_import_post" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelImportResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Import Model", "tags": ["model"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/model/import/route.ts", "x-auto-ontology-permissions": { "modelInterchange": ["import"] }, "x-auto-ontology-proxied": true } }, "/api/nodes/{node_id}": { "patch": { "description": "datasources.updateNode — edit mutable properties of a catalog node.\nThe backend authorizes the write against the account role or this node's\nowner group. Requiring read here admits an owner-group viewer. A column\nstores no owner, so that viewer is still rejected there.", "operationId": "patch_api_nodes_node_id_", "parameters": [ { "description": "Id of any catalog node — a Database, Schema, Table or Column.", "in": "path", "name": "node_id", "required": true, "schema": { "description": "Id of any catalog node — a Database, Schema, Table or Column.", "title": "Node Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NodeUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/NodeUpdateResult" }, { "type": "null" } ], "title": "Response Update Node Api Nodes Node Id Patch" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "datasources.updateNode — edit mutable properties of a catalog node.", "tags": ["nodes"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/nodes/[node_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/owners": { "get": { "description": "ownersApi.list — users and groups a picker can offer as an owner.\nReadable by anyone who can open the catalog: a viewer has to see who owns\na table. The identity goes down so a group's member list is only the\ncaller, when they belong to it.", "operationId": "get_api_owners", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_Owner_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "ownersApi.list — users and groups a picker can offer as an owner.", "tags": ["owners"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/owners/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/pql-analyses": { "get": { "description": "Anyone may list PQL analyses; only admins (analysis:manage) may add one.", "operationId": "get_api_pql_analyses", "parameters": [ { "description": "Case-insensitive substring filter on the analysis name.", "in": "query", "name": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Case-insensitive substring filter on the analysis name.", "title": "Query" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedListResponse_PqlAnalysis_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Pql Analyses", "tags": ["pql-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/pql-analyses/route.ts", "x-auto-ontology-permissions": { "analysis": ["read"] }, "x-auto-ontology-proxied": true }, "post": { "description": "Create a new PqlAnalysis (verified PQL example) and embed it.\n\nReturns 409 when ``name`` or ``pql`` is already used by another PqlAnalysis.\nThe PQL text is stored as-is — it is validated against the prediction graph at\npredict time, not here.", "operationId": "post_api_pql_analyses", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PqlAnalysisCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_PqlAnalysis_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Pql Analysis", "tags": ["pql-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/pql-analyses/route.ts", "x-auto-ontology-permissions": { "analysis": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/pql-analyses/{analysis_id}": { "delete": { "description": "Delete a PqlAnalysis (with its VDB embedding).\n\nReturns 404 when no PqlAnalysis with ``analysis_id`` exists.", "operationId": "delete_api_pql_analyses_analysis_id_", "parameters": [ { "in": "path", "name": "analysis_id", "required": true, "schema": { "title": "Analysis Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_IdRef_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete Pql Analysis", "tags": ["pql-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/pql-analyses/[analysis_id]/route.ts", "x-auto-ontology-permissions": { "analysis": ["manage"] }, "x-auto-ontology-proxied": true }, "put": { "description": "Editing/deleting a PQL analysis is admin-only (analysis:manage).", "operationId": "put_api_pql_analyses_analysis_id_", "parameters": [ { "in": "path", "name": "analysis_id", "required": true, "schema": { "title": "Analysis Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PqlAnalysisCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_PqlAnalysis_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Pql Analysis", "tags": ["pql-analyses"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/pql-analyses/[analysis_id]/route.ts", "x-auto-ontology-permissions": { "analysis": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/question-entity-coverage": { "post": { "description": "Grade how well the semantic layer covers the entities in a free-text\nquestion. Same retrieval capability as chat, so it is gated on\n`chat: ['use']`.", "operationId": "post_api_question_entity_coverage", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EntityCoverageRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_EntityCoverageResult_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Grade how well the semantic layer covers the entities in a free-text question.", "tags": ["question-entity-coverage"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/question-entity-coverage/route.ts", "x-auto-ontology-permissions": { "chat": ["use"] }, "x-auto-ontology-proxied": true } }, "/api/rules": { "get": { "description": "rulesApi.getAll — list rules.\n\n`manage` rather than the `read` that guards the tag *list*: a rule names the\nsearch it replays, so the list of them describes the catalog the way a tag's\nown page does. The only screen that asks for it is Settings → Rules, and that\nwhole section is admin-only already.\n\n`withTagAuthors` despite the name: it resolves `created_by` / `modified_by` in\na `{ data }` envelope, and a rule stores those two columns for the same reason\na tag does — the accounts live in the `frontend` schema, which the backend has\nno model for. Unconditionally, without the `?authors=` the tag list gates it\nbehind: that param exists because the tag picker reads the vocabulary on every\nnavigation and throws the names away, and nothing reads rules but the one page\nthat shows an owner on every card.", "operationId": "get_api_rules", "parameters": [ { "description": "Case-insensitive substring filter on the rule name or on the name of a tag it applies.", "in": "query", "name": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Case-insensitive substring filter on the rule name or on the name of a tag it applies.", "title": "Query" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedListResponse_Rule_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "rulesApi.getAll — list rules.", "tags": ["rules"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/rules/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true }, "post": { "description": "rulesApi.create — save a rule (admin only).\n\nGuarded like creating a tag rather than like applying one: a rule labels\neverything its search matches, and goes on labelling whatever matches later,\nso it curates the vocabulary's reach rather than putting one existing tag on\none object.\n\nThe identity goes with it because the backend attributes the rule to whoever\nsaved it — `created_by` — and `proxyToBackend` forwards nothing from the\nincoming request. `ctx.user` is the resolved caller, so the id the backend\ntrusts is the one this route authenticated.", "operationId": "post_api_rules", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RuleCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_IdRef_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "rulesApi.create — save a rule (admin only).", "tags": ["rules"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/rules/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/rules/{rule_id}": { "delete": { "description": "rulesApi.delete — remove a rule, and with it the tags it applied unless\n`?keep_tags=true` says to leave them (admin only). `tag: ['manage']` rather\nthan the `catalog: ['edit']` that guards applying a single tag: this un-tags\nevery object the rule matched in one request, and can remove a tag from the\nvocabulary outright when the rule was the whole of what used it — a change to\nthe vocabulary rather than an edit of any one object.\n\nNo identity forwarded: nothing survives the delete to record an actor on.", "operationId": "delete_api_rules_rule_id_", "parameters": [ { "in": "path", "name": "rule_id", "required": true, "schema": { "title": "Rule Id", "type": "string" } }, { "description": "Leave the tags the rule applied on their objects, attributed to whoever wrote the rule, instead of removing them with the rule.", "in": "query", "name": "keep_tags", "required": false, "schema": { "default": false, "description": "Leave the tags the rule applied on their objects, attributed to whoever wrote the rule, instead of removing them with the rule.", "title": "Keep Tags", "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_IdRef_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete Rule", "tags": ["rules"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/rules/[rule_id]/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true }, "patch": { "description": "rulesApi.update — rename a rule (admin only).\n\nThe identity goes with it, as it does with the create, but for the other\ncolumn: `created_by` is left alone so the rule stays attributed to whoever\nsaved it, and `modified_by` records who renamed it — which is what the\ninformation card reads to say who last edited the rule.", "operationId": "patch_api_rules_rule_id_", "parameters": [ { "in": "path", "name": "rule_id", "required": true, "schema": { "title": "Rule Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RuleUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Rule_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "rulesApi.update — rename a rule (admin only).", "tags": ["rules"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/rules/[rule_id]/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/schemas/{db_id}": { "get": { "description": "datasources.getSchemasForDatabase — list schemas for one database.", "operationId": "get_api_schemas_db_id_", "parameters": [ { "in": "path", "name": "db_id", "required": true, "schema": { "title": "Db Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SchemasPayload" }, { "type": "null" } ], "title": "Response List Schemas By Database Api Schemas Db Id Get" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Schemas By Database", "tags": ["schemas"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/schemas/[db_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/search/global-search": { "post": { "description": "Fulltext global search across catalog and semantic nodes.\n\nRequires at least two characters after trimming. ``contains`` is the only\nmatch option. Results are capped at 200 and ranked so names that contain\nevery token sort first, then Terms an alias matched.\n\n``filters.synonyms`` turns that alias matching off, which drops the Terms\nreached only by one and empties the ``synonyms`` reported on every hit --\nwith it off, no alias caused a hit, so there is none to name.\n\n``filters.tags`` narrows to the objects carrying one of those tags, or --\nfor the untagged sentinel among them -- carrying none. Labels a rule\napplied count the same as labels applied by hand.\n\n``filters.data`` narrows to what lives under the given databases and\nschemas, which leaves Tables, Views and Columns and nothing else.", "operationId": "post_api_search_global_search", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GlobalSearchRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_GlobalSearchItem_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Post Global Search", "tags": ["search"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/search/global-search/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/search/global-search/count": { "post": { "description": "Hit counts by type for the same query as ``/search/global-search``.", "operationId": "post_api_search_global_search_count", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GlobalSearchRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_dict_str__int__" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Post Global Search Count", "tags": ["search"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/search/global-search/count/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/semantic-compilation/reset": { "post": { "description": "semanticCompilationApi.reset — delete every database's compiled semantic\nlayer. Destructive, so it sits behind `manage` rather than the `read` tier\nthat may view the toggle.", "operationId": "post_api_semantic_compilation_reset", "responses": { "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "semanticCompilationApi.reset — delete every database's compiled semantic layer.", "tags": ["semantic-compilation"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/semantic-compilation/reset/route.ts", "x-auto-ontology-permissions": { "semanticCompilation": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/semantic-compilation/status": { "get": { "description": "Whether the semantic layer has been calculated (any Term exists). The chat\npage uses this to gate the conversation area when the layer is missing.", "operationId": "get_api_semantic_compilation_status", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SemanticStatusResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" } }, "summary": "Whether the semantic layer has been calculated (any Term exists).", "tags": ["semantic-compilation"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/semantic-compilation/status/route.ts", "x-auto-ontology-permissions": { "chat": ["use"] }, "x-auto-ontology-proxied": true } }, "/api/sql-attributes": { "post": { "description": "Creating a SqlAttribute is a catalog edit and requires catalog:edit, the same\npermission PATCH /api/nodes/{node_id} uses. A viewer does not have it.", "operationId": "post_api_sql_attributes", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlAttributeCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SqlAttribute_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Sql Attribute", "tags": ["sql-attributes"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/sql-attributes/route.ts", "x-auto-ontology-permissions": { "catalog": ["edit"] }, "x-auto-ontology-proxied": true } }, "/api/sql-attributes/{attr_id}": { "delete": { "description": "Delete a SqlAttribute. The account role authorizes the delete.", "operationId": "delete_api_sql_attributes_attr_id_", "parameters": [ { "in": "path", "name": "attr_id", "required": true, "schema": { "title": "Attr Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_IdRef_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete a SqlAttribute.", "tags": ["sql-attributes"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/sql-attributes/[attr_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["edit"] }, "x-auto-ontology-proxied": true }, "get": { "description": "sqlAttributesApi.get — fetch one SqlAttribute node, with the account behind\ncreated_by / modified_by so the side panel can name them.", "operationId": "get_api_sql_attributes_attr_id_", "parameters": [ { "in": "path", "name": "attr_id", "required": true, "schema": { "title": "Attr Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SqlAttribute_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Sql Attribute", "tags": ["sql-attributes"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/sql-attributes/[attr_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true }, "patch": { "description": "Patch name, description, or certification. The account role authorizes the\nwrite. The term owner shown beside the attribute does not grant it.", "operationId": "patch_api_sql_attributes_attr_id_", "parameters": [ { "in": "path", "name": "attr_id", "required": true, "schema": { "title": "Attr Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlAttributeMetadataPatch" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlAttributePatchResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Patch name, description, or certification.", "tags": ["sql-attributes"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/sql-attributes/[attr_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["edit"] }, "x-auto-ontology-proxied": true }, "put": { "description": "Replace a SqlAttribute's SQL. The page shows the term's owner. The account\nrole authorizes the write, the same way a column attribute edit does.", "operationId": "put_api_sql_attributes_attr_id_", "parameters": [ { "in": "path", "name": "attr_id", "required": true, "schema": { "title": "Attr Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlAttributeUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SqlAttribute_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Replace a SqlAttribute's SQL.", "tags": ["sql-attributes"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/sql-attributes/[attr_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["edit"] }, "x-auto-ontology-proxied": true } }, "/api/sql-attributes/{attr_id}/description-suggestion": { "get": { "description": "LLM-assisted description suggestion, offered from the SqlAttribute edit\nflow. The account role must allow a catalog edit, the same way editing the\nattribute does. The generated text is cached on the attribute, so the\ncaller's identity goes with the request.", "operationId": "get_api_sql_attributes_attr_id_description_suggestion", "parameters": [ { "in": "path", "name": "attr_id", "required": true, "schema": { "title": "Attr Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DescriptionSuggestionResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "LLM-assisted description suggestion, offered from the SqlAttribute edit flow.", "tags": ["sql-attributes"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/sql-attributes/[attr_id]/description-suggestion/route.ts", "x-auto-ontology-permissions": { "catalog": ["edit"] }, "x-auto-ontology-proxied": true } }, "/api/sql-attributes/validate": { "post": { "description": "Validate a SQL expression without writing it. Catalog read is enough.\nCreating an attribute and saving one both require catalog:edit.", "operationId": "post_api_sql_attributes_validate", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlAttributeValidate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_SqlExpressionValidationResult_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Validate a SQL expression without writing it.", "tags": ["sql-attributes"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/sql-attributes/validate/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/sso-discovery": { "get": { "tags": ["sso-discovery"], "summary": "Resolve an OIDC issuer's discovery document, admin-only.", "description": "Resolve an OIDC issuer's discovery document, admin-only.\n\nThe document is fetched server-side and relayed as the endpoints the SSO\nregistration form needs.\n\nResolving the endpoints here (instead of letting Better Auth's SSO plugin\nauto-discover from the issuer) lets us register providers with\n`skipDiscovery: true`. For public IdPs that path requires no `trustedOrigins`\nentry, so admins can add any provider without per-provider config.\n\nGated on sso:manage (admin) — it's an outbound fetch proxy.", "operationId": "get_api_sso_discovery", "parameters": [ { "name": "issuer", "in": "query", "required": true, "description": "HTTPS issuer URL; `/.well-known/openid-configuration` is appended.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The endpoints the SSO registration form needs, under their OpenID Connect Discovery names. `discovery_endpoint` is added by this route.", "content": { "application/json": { "schema": { "type": "object", "properties": { "issuer": { "type": "string" }, "authorization_endpoint": { "type": "string" }, "token_endpoint": { "type": "string" }, "userinfo_endpoint": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "jwks_uri": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "discovery_endpoint": { "type": "string", "description": "The URL that was fetched." } }, "required": [ "issuer", "authorization_endpoint", "token_endpoint", "userinfo_endpoint", "jwks_uri", "discovery_endpoint" ], "additionalProperties": false } } } }, "400": { "description": "`issuer` is missing, unparseable, or not https.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "502": { "description": "The discovery endpoint answered non-2xx, or its document lacks `issuer`/`authorization_endpoint`/`token_endpoint`.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "504": { "description": "The discovery request timed out (8s) or could not be reached.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/sso-discovery/route.ts", "x-auto-ontology-permissions": { "sso": ["manage"] }, "x-auto-ontology-proxied": false } }, "/api/sso-providers": { "get": { "tags": ["sso-providers"], "summary": "Public list of registered SSO providers, carrying no secrets.", "description": "Public list of registered SSO providers, carrying no secrets.\n\nThe login page reads it to decide whether to show the \"Sign in with SSO\"\noption, so it has to answer before anyone is authenticated.", "operationId": "get_api_sso_providers", "responses": { "200": { "description": "Registered SSO providers, secrets excluded — enough for the login page to decide whether to offer \"Sign in with SSO\".", "content": { "application/json": { "schema": { "type": "object", "properties": { "providers": { "type": "array", "items": { "type": "object", "properties": { "provider_id": { "type": "string" }, "issuer": { "type": "string" }, "domain": { "type": "string" } }, "required": ["provider_id", "issuer", "domain"], "additionalProperties": false } } }, "required": ["providers"], "additionalProperties": false } } } } }, "security": [], "x-auto-ontology-source": "frontend/app/api/sso-providers/route.ts", "x-auto-ontology-permissions": "public", "x-auto-ontology-proxied": false } }, "/api/tables/{schema_id}": { "get": { "description": "datasources.getTablesForSchema — list tables for one schema.", "operationId": "get_api_tables_schema_id_", "parameters": [ { "in": "path", "name": "schema_id", "required": true, "schema": { "title": "Schema Id", "type": "string" } }, { "description": "Accepted for API compatibility and ignored — schema ids are globally unique, so the database is already implied.", "in": "query", "name": "database_name", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Accepted for API compatibility and ignored — schema ids are globally unique, so the database is already implied.", "title": "Database Name" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_TableSummary_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Tables By Schema", "tags": ["tables"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tables/[schema_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/tags": { "get": { "description": "tagsApi.getAll — list tags. Viewers too, unlike the rest of this file: the\ntag picker on every detail page offers the whole vocabulary, and a tag's name\nand id say nothing about the catalog.\n\nAuthor names are added only when asked for — see `authorsRequested`. This is\nthe hottest tag route there is, read on every navigation the picker survives,\nand the settings page is the only caller with anything to show them in.", "operationId": "get_api_tags", "parameters": [ { "description": "Case-insensitive substring filter on the tag name.", "in": "query", "name": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Case-insensitive substring filter on the tag name.", "title": "Query" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } }, { "name": "authors", "in": "query", "required": false, "description": "Resolve `created_by` / `modified_by` to the accounts they name, adding `created_by_user` and `modified_by_user` beside them. Ignored for a caller who may not manage tags, and left off by default: the tag picker reads this list on every detail page and has nothing to show an author in.", "schema": { "type": "string", "const": "1" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedListResponse_Tag_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "tagsApi.getAll — list tags.", "tags": ["tags"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tags/route.ts", "x-auto-ontology-permissions": { "tag": ["read"] }, "x-auto-ontology-proxied": true }, "post": { "description": "tagsApi.create — add a tag (admin only). The identity goes down so the\nbackend can record who created it, and comes back resolved to a name\nunconditionally: this answer only ever redraws the row on the settings page,\nwhich is the page that shows authors.", "operationId": "post_api_tags", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Tag_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "tagsApi.create — add a tag (admin only).", "tags": ["tags"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tags/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/tags/{tag_id}": { "delete": { "description": "tagsApi.delete — remove a tag (admin only). Nothing survives the delete to\nrecord an author on, so no identity is forwarded.", "operationId": "delete_api_tags_tag_id_", "parameters": [ { "in": "path", "name": "tag_id", "required": true, "schema": { "title": "Tag Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_IdRef_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "tagsApi.delete — remove a tag (admin only).", "tags": ["tags"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tags/[tag_id]/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true }, "get": { "description": "tagsApi.getById — one tag. What it labels is `targets/route.ts` beside this.\n\n`manage` rather than the `read` that guards the tag *list*: only the settings\npage asks for a single tag, and that whole section is admin-only already.\n\nAuthors on request, by the same rule as the list: this is where the detail\nview reads who curated the tag, and only the gateway can put names to those\nids.", "operationId": "get_api_tags_tag_id_", "parameters": [ { "in": "path", "name": "tag_id", "required": true, "schema": { "title": "Tag Id", "type": "string" } }, { "name": "authors", "in": "query", "required": false, "description": "Resolve the account ids this answer carries to the accounts they name: `created_by` and `modified_by`, added beside them as `*_user`. Off by default, and the detail view asks for it — it shows who curated the tag.", "schema": { "type": "string", "const": "1" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Tag_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "tagsApi.getById — one tag.", "tags": ["tags"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tags/[tag_id]/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true }, "patch": { "description": "tagsApi.update — rename a tag (admin only). `manage` rather than the\n`catalog: ['edit']` the attach routes use: renaming rewrites the vocabulary\nitself, and the new name reaches every object already carrying the tag.\n\nThe identity goes down for the backend's `modified_by`, and the renamed tag\ncomes back with both authors resolved.", "operationId": "patch_api_tags_tag_id_", "parameters": [ { "in": "path", "name": "tag_id", "required": true, "schema": { "title": "Tag Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Tag_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "tagsApi.update — rename a tag (admin only).", "tags": ["tags"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tags/[tag_id]/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/tags/{tag_id}/targets": { "get": { "description": "tagsApi.getTargets — one page of the objects a tag labels.\n\n`tag: ['manage']`, not the `catalog: ['edit']` below: this answer names\ncatalog objects and spells out where they sit, and it is not scoped to the\ncaller's zones the way the catalog reads are. Only the tag's settings page\nasks for it, and that section is admin-only already.\n\nAuthors unconditionally, without the `?authors=` the tag list gates them\nbehind: the \"Tagged By\" column is a column of this table rather than an extra\na caller may not render, so a page of rows with unresolved ids would be a\npage with a blank column.", "operationId": "get_api_tags_tag_id_targets", "parameters": [ { "in": "path", "name": "tag_id", "required": true, "schema": { "title": "Tag Id", "type": "string" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedListResponse_TagItem_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "tagsApi.getTargets — one page of the objects a tag labels.", "tags": ["tags"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tags/[tag_id]/targets/route.ts", "x-auto-ontology-permissions": { "tag": ["manage"] }, "x-auto-ontology-proxied": true }, "post": { "description": "tagsApi.attach — label an object with an existing tag.\n\nThe backend checks edit permission against the target's account role or\nowner group. Catalog read admits an authenticated owner-group viewer to that\ncheck without granting writes to targets owned by another user or group.\n\nThe identity goes down for the backend's `tagged_by`, which the tag's page\nshows in its \"Tagged By\" column — the one thing distinguishing a label a\nperson applied from one a rule matched.", "operationId": "post_api_tags_tag_id_targets", "parameters": [ { "in": "path", "name": "tag_id", "required": true, "schema": { "title": "Tag Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagTarget" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_TagChip_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "tagsApi.attach — label an object with an existing tag.", "tags": ["tags"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tags/[tag_id]/targets/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/tags/{tag_id}/targets/{target_type}/{item_id}": { "delete": { "description": "tagsApi.detach — the backend applies the same account-role/owner-group check\nas attach, so an owner-group viewer may reach it with catalog read access.", "operationId": "delete_api_tags_tag_id_targets_target_type_item_id_", "parameters": [ { "in": "path", "name": "tag_id", "required": true, "schema": { "title": "Tag Id", "type": "string" } }, { "in": "path", "name": "target_type", "required": true, "schema": { "$ref": "#/components/schemas/TagTargetType" } }, { "in": "path", "name": "item_id", "required": true, "schema": { "title": "Item Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_TagChip_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Detach Tag", "tags": ["tags"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/tags/[tag_id]/targets/[target_type]/[item_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/terms": { "get": { "description": "termsApi.list — one page of Terms and their per-card count breakdowns.\n`skip`/`limit` pass straight through.", "operationId": "get_api_terms", "parameters": [ { "description": "Case-insensitive substring filter on the term name.", "in": "query", "name": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Case-insensitive substring filter on the term name.", "title": "Query" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TermsPageResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "termsApi.list — one page of Terms and their per-card count breakdowns.", "tags": ["terms"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/terms/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/terms/{term_id}": { "get": { "description": "termsApi.getById — fetch one Term node. Authors are resolved here so Last\nModified can name the person who saved it.", "operationId": "get_api_terms_term_id_", "parameters": [ { "in": "path", "name": "term_id", "required": true, "schema": { "title": "Term Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_TermDetail_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "termsApi.getById — fetch one Term node.", "tags": ["terms"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/terms/[term_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true }, "patch": { "description": "The backend authorizes the write against either the account role or this\nterm's owner group. Requiring read here admits authenticated owner-group\nviewers without granting them writes to terms owned by anyone else.", "operationId": "patch_api_terms_term_id_", "parameters": [ { "in": "path", "name": "term_id", "required": true, "schema": { "title": "Term Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TermUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Term_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Term", "tags": ["terms"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/terms/[term_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/terms/{term_id}/column-attributes": { "get": { "description": "termsApi.getColumnAttributes — ColumnAttribute nodes for one term (with\nprimary/referenced columns). Authors ride along so the side panel can name\nwho last edited each attribute.", "operationId": "get_api_terms_term_id_column_attributes", "parameters": [ { "in": "path", "name": "term_id", "required": true, "schema": { "title": "Term Id", "type": "string" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedListResponse_ColumnAttribute_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Term Column Attributes By Id", "tags": ["terms"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/terms/[term_id]/column-attributes/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/terms/{term_id}/column-attributes/{attr_id}": { "patch": { "description": "Updating a ColumnAttribute changes only name/description; backend refreshes\nthe corresponding semantic VDB embedding.", "operationId": "patch_api_terms_term_id_column_attributes_attr_id_", "parameters": [ { "in": "path", "name": "term_id", "required": true, "schema": { "title": "Term Id", "type": "string" } }, { "description": "ColumnAttribute id, not a SqlAttribute id.", "in": "path", "name": "attr_id", "required": true, "schema": { "description": "ColumnAttribute id, not a SqlAttribute id.", "title": "Attr Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ColumnAttributeUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ColumnAttributePatchResponse" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Column Attribute", "tags": ["terms"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/terms/[term_id]/column-attributes/[attr_id]/route.ts", "x-auto-ontology-permissions": { "catalog": ["edit"] }, "x-auto-ontology-proxied": true } }, "/api/terms/{term_id}/sql-attributes": { "get": { "description": "termsApi.getSqlAttributes — SqlAttribute nodes for one term.", "operationId": "get_api_terms_term_id_sql_attributes", "parameters": [ { "in": "path", "name": "term_id", "required": true, "schema": { "title": "Term Id", "type": "string" } }, { "description": "Rows to skip before the page starts.", "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "description": "Rows to skip before the page starts.", "minimum": 0, "title": "Skip", "type": "integer" } }, { "description": "Page size, at most 100. Omit to return every matching row in one response.", "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "maximum": 100, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Page size, at most 100. Omit to return every matching row in one response.", "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedListResponse_SqlAttribute_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Term Sql Attributes By Id", "tags": ["terms"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/terms/[term_id]/sql-attributes/route.ts", "x-auto-ontology-permissions": { "catalog": ["read"] }, "x-auto-ontology-proxied": true } }, "/api/zones": { "get": { "description": "zonesApi.getAll — list zones (viewable by all).", "operationId": "get_api_zones", "parameters": [ { "description": "Requesting user id", "in": "query", "name": "uid", "required": true, "schema": { "description": "Requesting user id", "title": "Uid", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse_Zone_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Zones", "tags": ["zones"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/zones/route.ts", "x-auto-ontology-permissions": { "zone": ["read"] }, "x-auto-ontology-proxied": true }, "post": { "description": "zonesApi.create — add a zone (admin only).", "operationId": "post_api_zones", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ZoneCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Zone_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Zone", "tags": ["zones"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/zones/route.ts", "x-auto-ontology-permissions": { "zone": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/zones/{zone_id}": { "delete": { "description": "zonesApi.delete — remove a zone (admin only).", "operationId": "delete_api_zones_zone_id_", "parameters": [ { "in": "path", "name": "zone_id", "required": true, "schema": { "title": "Zone Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_IdRef_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete Zone", "tags": ["zones"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/zones/[zone_id]/route.ts", "x-auto-ontology-permissions": { "zone": ["manage"] }, "x-auto-ontology-proxied": true }, "get": { "description": "zonesApi.getById — fetch one zone (viewable by all).", "operationId": "get_api_zones_zone_id_", "parameters": [ { "in": "path", "name": "zone_id", "required": true, "schema": { "title": "Zone Id", "type": "string" } }, { "description": "Requesting user id", "in": "query", "name": "uid", "required": true, "schema": { "description": "Requesting user id", "title": "Uid", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Zone_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Zone", "tags": ["zones"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/zones/[zone_id]/route.ts", "x-auto-ontology-permissions": { "zone": ["read"] }, "x-auto-ontology-proxied": true }, "patch": { "description": "zonesApi.update — edit a zone (admin only).", "operationId": "patch_api_zones_zone_id_", "parameters": [ { "in": "path", "name": "zone_id", "required": true, "schema": { "title": "Zone Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ZoneUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Zone_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Zone", "tags": ["zones"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/zones/[zone_id]/route.ts", "x-auto-ontology-permissions": { "zone": ["manage"] }, "x-auto-ontology-proxied": true } }, "/api/zones/{zone_id}/status": { "patch": { "description": "zonesApi.setEnabled — enable/disable a zone (admin only).", "operationId": "patch_api_zones_zone_id_status", "parameters": [ { "in": "path", "name": "zone_id", "required": true, "schema": { "title": "Zone Id", "type": "string" } }, { "description": "Admin user id performing the request", "in": "query", "name": "admin_uid", "required": true, "schema": { "description": "Admin user id performing the request", "title": "Admin Uid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ZoneStatusUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataResponse_Zone_" } } }, "description": "Successful Response" }, "401": { "description": "No authenticated caller could be resolved" }, "403": { "description": "The caller lacks the required permission" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Set Zone Status", "tags": ["zones"], "security": [ { "ApiToken": [] } ], "x-auto-ontology-source": "frontend/app/api/zones/[zone_id]/status/route.ts", "x-auto-ontology-permissions": { "zone": ["manage"] }, "x-auto-ontology-proxied": true } } }, "components": { "schemas": { "Body_import_model_api_model_import_post": { "properties": { "file": { "anyOf": [ { "contentMediaType": "application/octet-stream", "type": "string" }, { "type": "null" } ], "title": "File" } }, "title": "Body_import_model_api_model_import_post", "type": "object" }, "ChatCancelResponse": { "additionalProperties": true, "properties": { "cancelled": { "title": "Cancelled", "type": "boolean" } }, "required": ["cancelled"], "title": "ChatCancelResponse", "type": "object" }, "ColumnAttribute": { "additionalProperties": true, "description": "A ColumnAttribute of a Term.\n\n``primary_column`` is the HAS_ATTRIBUTE owner and ``referenced_columns``\nthe SEMANTIC_FK sources; both are absent from the patch response, which\nechoes only the fields it wrote.", "properties": { "certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Certified" }, "created": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Created" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "datatype": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Datatype" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "modified": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Modified" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modified By" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "primary_column": { "anyOf": [ { "$ref": "#/components/schemas/ColumnRef" }, { "type": "null" } ] }, "referenced_columns": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ColumnRef" }, "type": "array" }, { "type": "null" } ], "title": "Referenced Columns" }, "sample_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Sample Values" }, "source_column": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Column" }, "table_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Id" }, "tags": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TagChip" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "term_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Name" }, "zones": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ZoneChip" }, "type": "array" }, { "type": "null" } ], "title": "Zones" } }, "required": ["id"], "title": "ColumnAttribute", "type": "object" }, "ColumnAttributeExplorationColumn": { "additionalProperties": true, "description": "One Column HAS_ATTRIBUTE/SEMANTIC_FK-linked to a ColumnAttribute.\n\nSame shape as `ColumnExplorationForeignKeyColumn` — enough for a\nclient to graft it on as a fully expandable Column node.\n`relationship_types` mirrors `TermExplorationTable.relationship_types`:\na Column reaching the same attribute via more than one edge type\ncollects both once grouped.", "properties": { "data_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Data Type" }, "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "relationship_types": { "items": { "type": "string" }, "title": "Relationship Types", "type": "array" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "table_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Id" }, "table_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Name" } }, "required": ["id"], "title": "ColumnAttributeExplorationColumn", "type": "object" }, "ColumnAttributeExplorationDetails": { "additionalProperties": true, "description": "A ColumnAttribute's own owning Term and every linked Column, for\nexpanding it on the graph.\n\n`term` is `None` only when the attribute has no owning Term (or it's\nout of scope). `columns` is one ordered page of *every* Column\nHAS_ATTRIBUTE/SEMANTIC_FK-linked to this attribute — not just the\n\"primary\" one whichever expansion grafted this attribute on already\nknew about — since a shared attribute (e.g. a common `user_id`-shaped\none) can be linked from many Columns across many Tables at once. See\n`fetch_column_attribute_exploration_details`.", "properties": { "columns": { "items": { "$ref": "#/components/schemas/ColumnAttributeExplorationColumn" }, "title": "Columns", "type": "array" }, "columns_total": { "default": 0, "title": "Columns Total", "type": "integer" }, "term": { "anyOf": [ { "$ref": "#/components/schemas/TermSummary" }, { "type": "null" } ] } }, "title": "ColumnAttributeExplorationDetails", "type": "object" }, "ColumnAttributePatchResponse": { "additionalProperties": true, "description": "``term_certification`` is the owning Term's badge, recomputed on write.\n\nThe patch returns it alongside ``data`` so the Terms list can update the\nbadge without a second request, which is why this needs its own model\nrather than the plain ``DataResponse`` envelope.", "properties": { "data": { "$ref": "#/components/schemas/ColumnAttribute" }, "term_certification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Certification" } }, "required": ["data", "term_certification"], "title": "ColumnAttributePatchResponse", "type": "object" }, "ColumnAttributeUpdate": { "properties": { "certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Certified" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "name": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "title": "Name" }, "sample_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Sample Values" } }, "title": "ColumnAttributeUpdate", "type": "object" }, "ColumnExplorationAttribute": { "additionalProperties": true, "description": "The ColumnAttribute HAS_ATTRIBUTE/SEMANTIC_FK-linked to a Column, if any.\n\n`relationship_type` names the relationship kind\n(``HAS_ATTRIBUTE`` or ``SEMANTIC_FK``) actually connecting the Column\nto this ColumnAttribute — same rationale as `relationship_types` on\n`TermExplorationTable`/`ExplorationLink` — so a client can label the\nedge the same way it would read in the graph itself, distinguishing a\nplain attribute from an FK-shaped one (like `user_id`).", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "relationship_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Relationship Type" } }, "required": ["id"], "title": "ColumnExplorationAttribute", "type": "object" }, "ColumnExplorationDetails": { "additionalProperties": true, "description": "A Column's own ColumnAttribute, outgoing FOREIGN_KEY target Column,\nincoming FOREIGN_KEY source Columns, and referencing Sql queries, for\nexpanding it on the graph.\n\n`column_attribute`/`foreign_key_column` are `None` for a column with no\nColumnAttribute/no outgoing FK; `referencing_columns` is empty when no\nother Column's own FK points at this one (the reverse of\n`foreign_key_column`); `sql_queries` is empty for a column no stored\nquery ever referenced directly — see `fetch_column_exploration_details`.", "properties": { "column_attribute": { "anyOf": [ { "$ref": "#/components/schemas/ColumnExplorationAttribute" }, { "type": "null" } ] }, "foreign_key_column": { "anyOf": [ { "$ref": "#/components/schemas/ColumnExplorationForeignKeyColumn" }, { "type": "null" } ] }, "referencing_columns": { "items": { "$ref": "#/components/schemas/ColumnExplorationForeignKeyColumn" }, "title": "Referencing Columns", "type": "array" }, "sql_queries": { "items": { "$ref": "#/components/schemas/TableSqlQuery" }, "title": "Sql Queries", "type": "array" } }, "title": "ColumnExplorationDetails", "type": "object" }, "ColumnExplorationForeignKeyColumn": { "additionalProperties": true, "description": "The Column a Column's own outgoing FOREIGN_KEY edge points at, if any.\n\nCarries the target Column's own owning Table/Schema/Database ids/names\n(like `ExplorationLinkPathNode` does for a link-path hop) so a client\ncan graft it onto the graph as a fully expandable Column node — see\n`expandColumnNode` in `ExplorationView.tsx`.", "properties": { "data_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Data Type" }, "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "table_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Id" }, "table_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Name" } }, "required": ["id"], "title": "ColumnExplorationForeignKeyColumn", "type": "object" }, "ColumnRef": { "additionalProperties": true, "description": "A column with the catalog path ids needed to navigate to it.", "properties": { "column_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Column Name" }, "db_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Db Id" }, "id": { "title": "Id", "type": "string" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "table_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Id" }, "table_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Name" } }, "required": ["id"], "title": "ColumnRef", "type": "object" }, "ColumnSummary": { "additionalProperties": true, "description": "One column of a table, ordered by ``ordinal_position``.", "properties": { "column_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Column Name" }, "data_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Data Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Description Certified" }, "id": { "title": "Id", "type": "string" }, "ordinal_position": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Ordinal Position" }, "sample_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Sample Values" }, "tags": { "items": { "$ref": "#/components/schemas/TagChip" }, "title": "Tags", "type": "array" } }, "required": ["id"], "title": "ColumnSummary", "type": "object" }, "ConnectionBody": { "properties": { "connection": { "additionalProperties": true, "title": "Connection", "type": "object" } }, "required": ["connection"], "title": "ConnectionBody", "type": "object" }, "ConnectionTestBody": { "properties": { "connection": { "additionalProperties": true, "title": "Connection", "type": "object" }, "replacing": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Replacing" } }, "required": ["connection"], "title": "ConnectionTestBody", "type": "object" }, "ConnectionTestResponse": { "additionalProperties": true, "description": "``schemas`` is empty for connectors that cannot enumerate schemas.", "properties": { "schemas": { "items": { "type": "string" }, "title": "Schemas", "type": "array" }, "success": { "title": "Success", "type": "boolean" } }, "required": ["success", "schemas"], "title": "ConnectionTestResponse", "type": "object" }, "CustomAnalysis": { "additionalProperties": true, "description": "A verified SQL example, joined with the text of its ``Sql`` node.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "sql": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sql" } }, "required": ["id"], "title": "CustomAnalysis", "type": "object" }, "CustomAnalysisCreate": { "properties": { "description": { "title": "Description", "type": "string" }, "name": { "minLength": 1, "title": "Name", "type": "string" }, "sql": { "minLength": 1, "title": "Sql", "type": "string" } }, "required": ["name", "description", "sql"], "title": "CustomAnalysisCreate", "type": "object" }, "CustomAnalysisValidate": { "properties": { "sql": { "minLength": 1, "title": "Sql", "type": "string" } }, "required": ["sql"], "title": "CustomAnalysisValidate", "type": "object" }, "DatabaseSummary": { "additionalProperties": true, "description": "One catalog database. ``schemas`` is always empty — the tree is lazy.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "num_of_schemas": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Num Of Schemas" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "schemas": { "items": { "$ref": "#/components/schemas/SchemaSummary" }, "title": "Schemas", "type": "array" } }, "required": ["id"], "title": "DatabaseSummary", "type": "object" }, "DataExplorationGraph": { "additionalProperties": true, "description": "``{nodes, links}`` for the data layer, in one response.", "properties": { "links": { "items": { "$ref": "#/components/schemas/ExplorationEdge" }, "title": "Links", "type": "array" }, "nodes": { "items": { "$ref": "#/components/schemas/DataGraphNode" }, "title": "Nodes", "type": "array" } }, "title": "DataExplorationGraph", "type": "object" }, "DataGraphNode": { "additionalProperties": true, "description": "A table on the data-layer exploration graph.\n\n``relationship_count`` is the table's degree over the whole accessible\nedge set, so it does not shrink when ``limit`` truncates the payload.", "properties": { "columns_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Columns Count" }, "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "relationship_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Relationship Count" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "sql_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sql Count" }, "table_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Type" }, "terms_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Terms Count" }, "zones": { "items": { "$ref": "#/components/schemas/ZoneChip" }, "title": "Zones", "type": "array" } }, "required": ["id"], "title": "DataGraphNode", "type": "object" }, "DataResponse_ColumnAttributeExplorationDetails_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/ColumnAttributeExplorationDetails" } }, "required": ["data"], "title": "DataResponse[ColumnAttributeExplorationDetails]", "type": "object" }, "DataResponse_ColumnExplorationDetails_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/ColumnExplorationDetails" } }, "required": ["data"], "title": "DataResponse[ColumnExplorationDetails]", "type": "object" }, "DataResponse_CustomAnalysis_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/CustomAnalysis" } }, "required": ["data"], "title": "DataResponse[CustomAnalysis]", "type": "object" }, "DataResponse_DataExplorationGraph_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/DataExplorationGraph" } }, "required": ["data"], "title": "DataResponse[DataExplorationGraph]", "type": "object" }, "DataResponse_dict_str__int__": { "additionalProperties": true, "properties": { "data": { "additionalProperties": { "type": "integer" }, "title": "Data", "type": "object" } }, "required": ["data"], "title": "DataResponse[dict[str, int]]", "type": "object" }, "DataResponse_dict_str__list_ZoneChip___": { "additionalProperties": true, "properties": { "data": { "additionalProperties": { "items": { "$ref": "#/components/schemas/ZoneChip" }, "type": "array" }, "title": "Data", "type": "object" } }, "required": ["data"], "title": "DataResponse[dict[str, list[ZoneChip]]]", "type": "object" }, "DataResponse_EntityCoverageResult_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/EntityCoverageResult" } }, "required": ["data"], "title": "DataResponse[EntityCoverageResult]", "type": "object" }, "DataResponse_ExplorationLinkPath_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/ExplorationLinkPath" } }, "required": ["data"], "title": "DataResponse[ExplorationLinkPath]", "type": "object" }, "DataResponse_ExplorationRelatedNodes_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/ExplorationRelatedNodes" } }, "required": ["data"], "title": "DataResponse[ExplorationRelatedNodes]", "type": "object" }, "DataResponse_Group_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/Group" } }, "required": ["data"], "title": "DataResponse[Group]", "type": "object" }, "DataResponse_IdRef_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/IdRef" } }, "required": ["data"], "title": "DataResponse[IdRef]", "type": "object" }, "DataResponse_PqlAnalysis_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/PqlAnalysis" } }, "required": ["data"], "title": "DataResponse[PqlAnalysis]", "type": "object" }, "DataResponse_PublicConnection_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/PublicConnection" } }, "required": ["data"], "title": "DataResponse[PublicConnection]", "type": "object" }, "DataResponse_Rule_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/Rule" } }, "required": ["data"], "title": "DataResponse[Rule]", "type": "object" }, "DataResponse_SemanticExplorationGraph_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/SemanticExplorationGraph" } }, "required": ["data"], "title": "DataResponse[SemanticExplorationGraph]", "type": "object" }, "DataResponse_SqlAttribute_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/SqlAttribute" } }, "required": ["data"], "title": "DataResponse[SqlAttribute]", "type": "object" }, "DataResponse_SqlAttributeExplorationDetails_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/SqlAttributeExplorationDetails" } }, "required": ["data"], "title": "DataResponse[SqlAttributeExplorationDetails]", "type": "object" }, "DataResponse_SqlExplorationDetails_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/SqlExplorationDetails" } }, "required": ["data"], "title": "DataResponse[SqlExplorationDetails]", "type": "object" }, "DataResponse_SqlExpressionValidationResult_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/SqlExpressionValidationResult" } }, "required": ["data"], "title": "DataResponse[SqlExpressionValidationResult]", "type": "object" }, "DataResponse_SqlValidationResult_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/SqlValidationResult" } }, "required": ["data"], "title": "DataResponse[SqlValidationResult]", "type": "object" }, "DataResponse_SsoFederationState_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/SsoFederationState" } }, "required": ["data"], "title": "DataResponse[SsoFederationState]", "type": "object" }, "DataResponse_TableExplorationDetails_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/TableExplorationDetails" } }, "required": ["data"], "title": "DataResponse[TableExplorationDetails]", "type": "object" }, "DataResponse_Tag_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/Tag" } }, "required": ["data"], "title": "DataResponse[Tag]", "type": "object" }, "DataResponse_Term_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/Term" } }, "required": ["data"], "title": "DataResponse[Term]", "type": "object" }, "DataResponse_TermDetail_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/TermDetail" } }, "required": ["data"], "title": "DataResponse[TermDetail]", "type": "object" }, "DataResponse_TermExplorationDetails_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/TermExplorationDetails" } }, "required": ["data"], "title": "DataResponse[TermExplorationDetails]", "type": "object" }, "DataResponse_Zone_": { "additionalProperties": true, "properties": { "data": { "$ref": "#/components/schemas/Zone" } }, "required": ["data"], "title": "DataResponse[Zone]", "type": "object" }, "DescriptionSuggestionResponse": { "additionalProperties": true, "description": "``data`` is null when no description could be suggested.", "properties": { "data": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Data" } }, "required": ["data"], "title": "DescriptionSuggestionResponse", "type": "object" }, "EntityCoverageCandidate": { "additionalProperties": true, "description": "One retrieved semantic candidate, ranked by vector distance.", "properties": { "attribute": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Attribute" }, "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "term": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term" } }, "title": "EntityCoverageCandidate", "type": "object" }, "EntityCoverageRequest": { "description": "Payload for the entity-coverage route.", "properties": { "max_distance": { "default": 0.75, "description": "Maximum L2 vector distance for a candidate to count (lower score = closer match).", "exclusiveMinimum": 0, "title": "Max Distance", "type": "number" }, "question": { "minLength": 1, "title": "Question", "type": "string" } }, "required": ["question"], "title": "EntityCoverageRequest", "type": "object" }, "EntityCoverageResult": { "additionalProperties": true, "description": "A 0–1 coverage grade with the candidates it was graded from.\n\n``uncovered_entities`` is only present when the flow was asked for it.", "properties": { "candidates": { "items": { "$ref": "#/components/schemas/EntityCoverageCandidate" }, "title": "Candidates", "type": "array" }, "coverage": { "title": "Coverage", "type": "number" }, "uncovered_entities": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Uncovered Entities" } }, "required": ["coverage"], "title": "EntityCoverageResult", "type": "object" }, "ExplorationEdge": { "additionalProperties": true, "description": "Two tables connected by a shared SQL query and/or a foreign key.\n\n``queries`` is empty for an edge that exists only because of a foreign\nkey; ``foreign_keys`` is empty for a SQL-only edge. ``relationship_types``\nnames the relationship kind(s) behind the edge (``SQL`` and/or\n``FOREIGN_KEY``), for labeling the connection in the graph.", "properties": { "foreign_keys": { "items": { "$ref": "#/components/schemas/ForeignKeyRef" }, "title": "Foreign Keys", "type": "array" }, "queries": { "items": { "type": "string" }, "title": "Queries", "type": "array" }, "relationship_types": { "items": { "type": "string" }, "title": "Relationship Types", "type": "array" }, "source": { "title": "Source", "type": "string" }, "target": { "title": "Target", "type": "string" }, "via_foreign_key": { "default": false, "title": "Via Foreign Key", "type": "boolean" } }, "required": ["source", "target"], "title": "ExplorationEdge", "type": "object" }, "ExplorationLinkPath": { "additionalProperties": true, "description": "The real ordered hop chain connecting two Terms, e.g. Term1\n<-REPRESENTS- Table -CONTAINS-> Column -SEMANTIC_FK-> ColumnAttribute\n-PROPERTY_OF-> Term2 — see `fetch_semantic_link_path`. ``hops`` is\nordered from the first term to the second; empty only for a stale/\nhand-crafted request naming two terms with no path connecting them.", "properties": { "hops": { "items": { "$ref": "#/components/schemas/ExplorationLinkPathHop" }, "title": "Hops", "type": "array" } }, "title": "ExplorationLinkPath", "type": "object" }, "ExplorationLinkPathHop": { "additionalProperties": true, "description": "One relationship traversed along a term↔term path.\n\n``relationship`` is the underlying type (``REPRESENTS``, ``CONTAINS``,\n``HAS_ATTRIBUTE``, ``SEMANTIC_FK`` or ``PROPERTY_OF``).", "properties": { "relationship": { "title": "Relationship", "type": "string" }, "source": { "$ref": "#/components/schemas/ExplorationLinkPathNode" }, "target": { "$ref": "#/components/schemas/ExplorationLinkPathNode" } }, "required": ["relationship", "source", "target"], "title": "ExplorationLinkPathHop", "type": "object" }, "ExplorationLinkPathNode": { "additionalProperties": true, "description": "One Term/Table/Column/ColumnAttribute node along an `ExplorationLinkPathHop` chain.\n\n``type`` matches the Exploration graph's own node kinds (``term``,\n``table``, ``column``, ``columnAttribute``) so a client can graft/style\nthis node exactly like any other of that type — see\n`fetch_semantic_link_path`. The catalog fields are only ever set for a\n``table``/``column`` type node (see ``_enrich_catalog_path_nodes`` in\n``auto_ontology/dal/attributes.py``) — the same ids a client needs to expand\neither one further, exactly like a Table/Column node grafted anywhere\nelse in the app, so neither is a dead end just because it came from a\nlink path instead. ``table_id``/``table_name`` are a ``column`` node's\nown owning Table, additionally.", "properties": { "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "table_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Id" }, "table_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Name" }, "type": { "title": "Type", "type": "string" } }, "required": ["id", "type"], "title": "ExplorationLinkPathNode", "type": "object" }, "ExplorationRelatedNode": { "additionalProperties": true, "description": "One related node. The catalog path fields are data-layer only.", "properties": { "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "relationship_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Relationship Count" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "table_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Type" } }, "required": ["id"], "title": "ExplorationRelatedNode", "type": "object" }, "ExplorationRelatedNodes": { "additionalProperties": true, "description": "One page of related nodes; ``total`` counts every related node.", "properties": { "nodes": { "items": { "$ref": "#/components/schemas/ExplorationRelatedNode" }, "title": "Nodes", "type": "array" }, "total": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total" } }, "title": "ExplorationRelatedNodes", "type": "object" }, "ExportRequest": { "description": "Export scope: empty ``databases`` exports every catalog database.", "properties": { "databases": { "items": { "type": "string" }, "title": "Databases", "type": "array" }, "format": { "$ref": "#/components/schemas/ModelFormat", "default": "auto_ontology" }, "include_ontology": { "default": false, "description": "Apache Ossie only: also export the terms as an Ossie ontology, with a mapping onto the semantic model, as a zip of the three documents.", "title": "Include Ontology", "type": "boolean" } }, "title": "ExportRequest", "type": "object" }, "ForeignKeyRef": { "additionalProperties": true, "description": "One foreign-key column pair behind an exploration edge.\n\n``source_column`` always names a column on the edge's ``source``. The\nsample values are rendered through ``stringify_sample_values`` before\nreaching this model, so the types a column stores arrive here as a plain\nstring list.", "properties": { "source_column": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Column" }, "source_sample_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Source Sample Values" }, "target_column": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Column" }, "target_sample_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Target Sample Values" } }, "title": "ForeignKeyRef", "type": "object" }, "GlobalSearchBreadcrumb": { "additionalProperties": true, "description": "One hop in a global-search hit's catalog/semantic path.", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id" }, "name": { "title": "Name", "type": "string" }, "type": { "title": "Type", "type": "string" } }, "required": ["name", "type"], "title": "GlobalSearchBreadcrumb", "type": "object" }, "GlobalSearchFilters": { "description": "What a query is matched against, and which kinds of object it may hit.\n\nTwo flags widen the match beyond an object's name: ``description`` adds\nits description and ``synonyms`` adds a Term's aliases.\n\nTheir defaults differ, which is deliberate rather than an oversight.\n``description`` is off because matching prose is the narrower, more\nsurprising behaviour to opt into. ``synonyms`` is on because alias\nmatching is what this endpoint did for its whole life before the flag\nexisted, and defaulting it off would quietly take Terms away from every\ncaller that does not send the flag.\n\n``objects``, ``tags`` and ``data`` all narrow rather than widen, and\n``None`` for any of them means no narrowing -- an empty list would\notherwise have to mean \"nothing\", which is not a search anyone asks for.\n\n``tags`` holds tag ids, and may hold ``UNTAGGED_FILTER_VALUE`` beside them\nfor the objects carrying no tag at all. Any one of the entries is enough\nfor a hit, so ticking two tags widens the selection within the narrowing.\nOnly five kinds can carry a tag, so a search narrowed to a tag returns no\nDatabase, Schema or analysis -- they come back only when the untagged\nsentinel is present, since a kind that cannot be tagged is untagged.\n\n``data`` holds database ids and schema ids together, and narrows to what\nlives under them: a row matches if its own schema, or that schema's\ndatabase, is among them. Only Table, View and Column live anywhere, so\nthis one narrows the result to those three outright -- a Term picked out\nby an alias is dropped along with the rest.", "properties": { "data": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Data" }, "description": { "default": false, "title": "Description", "type": "boolean" }, "objects": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Objects" }, "synonyms": { "default": true, "title": "Synonyms", "type": "boolean" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "title": "GlobalSearchFilters", "type": "object" }, "GlobalSearchItem": { "additionalProperties": true, "description": "One global-search hit: identity plus optional certified/parent path.\n\n``type`` is the entity's label (``Term``, ``Table``, ``ColumnAttribute``, …).\n``table_type`` is set on ``Table`` nodes so the client can tell views apart.", "properties": { "breadcrumbs": { "items": { "$ref": "#/components/schemas/GlobalSearchBreadcrumb" }, "title": "Breadcrumbs", "type": "array" }, "certified": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "null" } ], "title": "Certified" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "parent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Id" }, "synonyms": { "items": { "type": "string" }, "title": "Synonyms", "type": "array" }, "table_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Type" }, "type": { "title": "Type", "type": "string" } }, "required": ["id", "type"], "title": "GlobalSearchItem", "type": "object" }, "GlobalSearchRequest": { "properties": { "filters": { "$ref": "#/components/schemas/GlobalSearchFilters" }, "search_term": { "minLength": 0, "title": "Search Term", "type": "string" }, "text_match_option": { "default": "contains", "title": "Text Match Option", "type": "string" } }, "required": ["search_term"], "title": "GlobalSearchRequest", "type": "object" }, "GraphLink": { "additionalProperties": true, "description": "An undirected term↔term link (two terms sharing at least one table).\n\n``relationship_types`` names the relationship kind(s)\n(``REPRESENTS``, ``HAS_ATTRIBUTE``, ``SEMANTIC_FK``) connecting either\nterm to a table they share, for labeling the connection in the graph.", "properties": { "relationship_types": { "items": { "type": "string" }, "title": "Relationship Types", "type": "array" }, "source": { "title": "Source", "type": "string" }, "target": { "title": "Target", "type": "string" } }, "required": ["source", "target"], "title": "GraphLink", "type": "object" }, "Group": { "additionalProperties": true, "description": "A group, its members, its role, and the permissions that role grants.\n\n``role`` is the stored value. ``roles`` is that same role as a one-element\nlist, and ``permissions`` is ``resource:action`` strings expanded from it.\nMembership does not change an account's own role.", "properties": { "color": { "title": "Color", "type": "string" }, "created": { "format": "date-time", "title": "Created", "type": "string" }, "description": { "title": "Description", "type": "string" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "permissions": { "items": { "type": "string" }, "title": "Permissions", "type": "array" }, "role": { "title": "Role", "type": "string" }, "roles": { "items": { "$ref": "#/components/schemas/GroupRole" }, "title": "Roles", "type": "array" }, "users": { "items": { "$ref": "#/components/schemas/GroupUser" }, "title": "Users", "type": "array" } }, "required": [ "id", "name", "description", "color", "role", "roles", "users", "permissions", "created" ], "title": "Group", "type": "object" }, "GroupCreate": { "properties": { "color": { "title": "Color", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "name": { "title": "Name", "type": "string" }, "role": { "title": "Role", "type": "string" }, "user_ids": { "default": [], "items": { "type": "string" }, "title": "User Ids", "type": "array" } }, "required": ["name", "color", "role"], "title": "GroupCreate", "type": "object" }, "GroupRole": { "additionalProperties": true, "description": "One role on a group.\n\nA group carries a single role, ``admin`` or ``viewer``. ``id`` and\n``name`` are that same value: there is no separate role catalog.", "properties": { "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": ["id", "name"], "title": "GroupRole", "type": "object" }, "GroupUpdate": { "properties": { "color": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Color" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role" }, "user_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "User Ids" } }, "title": "GroupUpdate", "type": "object" }, "GroupUser": { "additionalProperties": true, "description": "An account as a member of a group.\n\n``name`` and ``email`` are empty when the account has been deleted and\nthe membership remains. ``role`` is the account's own role, not the\ngroup's.", "properties": { "email": { "title": "Email", "type": "string" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role" } }, "required": ["id", "name", "email"], "title": "GroupUser", "type": "object" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "title": "Detail", "type": "array" } }, "title": "HTTPValidationError", "type": "object" }, "IdRef": { "additionalProperties": true, "description": "``{\"id\": ...}`` — echoed by the delete endpoints to confirm the target.", "properties": { "id": { "title": "Id", "type": "string" } }, "required": ["id"], "title": "IdRef", "type": "object" }, "ListResponse_DatabaseSummary_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/DatabaseSummary" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[DatabaseSummary]", "type": "object" }, "ListResponse_ExplorationEdge_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/ExplorationEdge" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[ExplorationEdge]", "type": "object" }, "ListResponse_GlobalSearchItem_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/GlobalSearchItem" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[GlobalSearchItem]", "type": "object" }, "ListResponse_Group_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/Group" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[Group]", "type": "object" }, "ListResponse_Owner_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/Owner" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[Owner]", "type": "object" }, "ListResponse_PublicConnection_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/PublicConnection" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[PublicConnection]", "type": "object" }, "ListResponse_TableSummary_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/TableSummary" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[TableSummary]", "type": "object" }, "ListResponse_TagChip_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/TagChip" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[TagChip]", "type": "object" }, "ListResponse_Zone_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/Zone" }, "title": "Data", "type": "array" } }, "required": ["data", "count"], "title": "ListResponse[Zone]", "type": "object" }, "ModelFormat": { "description": "Serialisation dialect of an exchanged model document.", "enum": ["auto_ontology", "ossie"], "title": "ModelFormat", "type": "string" }, "ModelImportResponse": { "additionalProperties": true, "properties": { "success": { "title": "Success", "type": "boolean" }, "summary": { "additionalProperties": true, "title": "Summary", "type": "object" } }, "required": ["success", "summary"], "title": "ModelImportResponse", "type": "object" }, "NodeUpdate": { "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Description Certified" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "sample_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Sample Values" } }, "title": "NodeUpdate", "type": "object" }, "NodeUpdateResult": { "additionalProperties": true, "description": "Echo of a catalog node patch: ``{id, ...the properties you sent}``.\n\n``update_node_properties`` builds the body as ``{\"id\": ..., **{k: props[k]\nfor k in patch}}``, so only the keys the request actually patched come\nback — every one of them is optional here for that reason, and each may be\nnull when the node has no value for it. The route as a whole answers null\nwhen the patch was empty or the node does not exist.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Description Certified" }, "id": { "title": "Id", "type": "string" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "sample_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Sample Values" } }, "required": ["id"], "title": "NodeUpdateResult", "type": "object" }, "ObjectPageResponse_TableColumns_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "$ref": "#/components/schemas/TableColumns" }, "total": { "title": "Total", "type": "integer" } }, "required": ["data", "count", "total"], "title": "ObjectPageResponse[TableColumns]", "type": "object" }, "Owner": { "additionalProperties": true, "description": "A user or a group that can be chosen as an owner.\n\n``permissions`` is the ``resource:action`` list the account's role, or the\ngroup's role, grants. ``member_ids`` is empty for a user. For a group it\nis the caller when they belong to that group, and empty otherwise.\n``color`` is only set for a group.", "properties": { "color": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Color" }, "id": { "title": "Id", "type": "string" }, "kind": { "title": "Kind", "type": "string" }, "member_ids": { "items": { "type": "string" }, "title": "Member Ids", "type": "array" }, "name": { "title": "Name", "type": "string" }, "permissions": { "items": { "type": "string" }, "title": "Permissions", "type": "array" } }, "required": ["id", "name", "kind", "permissions"], "title": "Owner", "type": "object" }, "PagedListResponse_ColumnAttribute_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/ColumnAttribute" }, "title": "Data", "type": "array" }, "total": { "title": "Total", "type": "integer" } }, "required": ["data", "count", "total"], "title": "PagedListResponse[ColumnAttribute]", "type": "object" }, "PagedListResponse_CustomAnalysis_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/CustomAnalysis" }, "title": "Data", "type": "array" }, "total": { "title": "Total", "type": "integer" } }, "required": ["data", "count", "total"], "title": "PagedListResponse[CustomAnalysis]", "type": "object" }, "PagedListResponse_PqlAnalysis_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/PqlAnalysis" }, "title": "Data", "type": "array" }, "total": { "title": "Total", "type": "integer" } }, "required": ["data", "count", "total"], "title": "PagedListResponse[PqlAnalysis]", "type": "object" }, "PagedListResponse_Rule_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/Rule" }, "title": "Data", "type": "array" }, "total": { "title": "Total", "type": "integer" } }, "required": ["data", "count", "total"], "title": "PagedListResponse[Rule]", "type": "object" }, "PagedListResponse_SqlAttribute_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/SqlAttribute" }, "title": "Data", "type": "array" }, "total": { "title": "Total", "type": "integer" } }, "required": ["data", "count", "total"], "title": "PagedListResponse[SqlAttribute]", "type": "object" }, "PagedListResponse_Tag_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/Tag" }, "title": "Data", "type": "array" }, "total": { "title": "Total", "type": "integer" } }, "required": ["data", "count", "total"], "title": "PagedListResponse[Tag]", "type": "object" }, "PagedListResponse_TagItem_": { "additionalProperties": true, "properties": { "count": { "title": "Count", "type": "integer" }, "data": { "items": { "$ref": "#/components/schemas/TagItem" }, "title": "Data", "type": "array" }, "total": { "title": "Total", "type": "integer" } }, "required": ["data", "count", "total"], "title": "PagedListResponse[TagItem]", "type": "object" }, "PqlAnalysis": { "additionalProperties": true, "description": "A verified PQL few-shot. The PQL text is a property, not a child node.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "pql": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pql" } }, "required": ["id"], "title": "PqlAnalysis", "type": "object" }, "PqlAnalysisCreate": { "properties": { "description": { "title": "Description", "type": "string" }, "name": { "minLength": 1, "title": "Name", "type": "string" }, "pql": { "minLength": 1, "title": "Pql", "type": "string" } }, "required": ["name", "description", "pql"], "title": "PqlAnalysisCreate", "type": "object" }, "PublicConnection": { "additionalProperties": true, "description": "A UI-managed connection with its credentials stripped.\n\n``connection`` is absent from the delete response, which echoes only the\ndatabase name it tore down; the list and create reads carry the full\ncredential-free config.", "properties": { "connection": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Connection" }, "database_name": { "title": "Database Name", "type": "string" } }, "required": ["database_name"], "title": "PublicConnection", "type": "object" }, "Rule": { "additionalProperties": true, "description": "A saved search, and the tags to apply to everything it matches.\n\n``search_term``, ``text_match_option`` and ``filters`` are the global-search\nrequest the rule replays; together they are what the rule *is*, which is why\nthey are required rather than optional like most of this module — a rule\nmissing any of the three matches nothing.\n\n``tags`` carry the name to show and the id to act by, both read from the tag\ntable on every read rather than from what the write that saved them sent —\nso a renamed tag reads back renamed here, and a caller posting whole tag\nobjects is answered with the tags as they are rather than as it sent them.\nSee ``RuleTagRef`` in ``auto_ontology/server/rules/router.py``. The ids are checked\nagainst that table, so a rule cannot apply a tag that does not exist.\n\n``created_by`` is the id of the user who saved it, read from the trusted\ngateway header rather than from the request body — see\n``auto_ontology/server/chat/identity.py``. ``modified_by`` is the same for whoever\nlast renamed it, and null until somebody has — which is the same fact as\n``modified`` still equalling ``created``, and null again for a rename whose\nrequest carried no identity to record.\n\n``created`` and ``modified`` follow the convention :class:`Tag` sets: a\ntimezone-aware ``datetime`` serialised as ISO 8601, from one clock.", "properties": { "created": { "format": "date-time", "title": "Created", "type": "string" }, "created_by": { "title": "Created By", "type": "string" }, "filters": { "$ref": "#/components/schemas/RuleFilters" }, "id": { "title": "Id", "type": "string" }, "modified": { "format": "date-time", "title": "Modified", "type": "string" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modified By" }, "name": { "title": "Name", "type": "string" }, "search_term": { "title": "Search Term", "type": "string" }, "tags": { "items": { "$ref": "#/components/schemas/TagChip" }, "title": "Tags", "type": "array" }, "text_match_option": { "title": "Text Match Option", "type": "string" } }, "required": [ "id", "name", "search_term", "text_match_option", "filters", "created_by", "created", "modified" ], "title": "Rule", "type": "object" }, "RuleCreate": { "description": "A rule as the create dialog sends it.\n\n``search_term``, ``text_match_option`` and ``filters`` are the\n``/search/global-search`` request being saved, spelled the way that route\ntakes it.\n\n``filters.objects`` is the search's tab rather than a switch anybody set:\nthe dialog opens over a result list, and saving from *Tables* means the rule\nlabels tables. Omitted for the *All* tab, and stored omitted -- see\n:func:`create_rule` -- because \"no kind was picked\" and \"the kinds picked\nwere none\" are not the same rule.", "properties": { "filters": { "$ref": "#/components/schemas/GlobalSearchFilters" }, "name": { "title": "Name", "type": "string" }, "search_term": { "title": "Search Term", "type": "string" }, "tags": { "items": { "$ref": "#/components/schemas/RuleTagRef" }, "title": "Tags", "type": "array" }, "text_match_option": { "default": "contains", "title": "Text Match Option", "type": "string" } }, "required": ["name", "search_term", "tags"], "title": "RuleCreate", "type": "object" }, "RuleFilters": { "additionalProperties": true, "description": "The global-search filters a rule replays.\n\nThe same fields ``GlobalSearchFilters`` in ``auto_ontology/server/search/router.py``\naccepts, and deliberately no others: a rule *is* a saved search, so a\nfilter stored here that the search cannot honour would be a rule that never\nreproduces the results it was created from.\n\n``synonyms`` defaults on for the reason it does there — it is what the\nsearch did before the flag existed — and ``objects`` records which tab the\nrule was saved from, since that is what the count it promises to tag was\nscoped to.", "properties": { "description": { "default": false, "title": "Description", "type": "boolean" }, "objects": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Objects" }, "synonyms": { "default": true, "title": "Synonyms", "type": "boolean" } }, "title": "RuleFilters", "type": "object" }, "RuleTagRef": { "description": "One tag a rule applies, as a caller names it.\n\nAn object rather than a bare id, so a client can post the tags it is\nalready holding without reducing them first, and anything else it carries\n-- a name, a timestamp, whatever its own tag model holds -- is ignored\nrather than turning a perfectly good tag into a 422.\n\nIgnored rather than stored, because the tag table already says all of it,\nand better: a read joins to it, so a rule answers with each tag as it is\nnow rather than as it looked when the rule was saved. What is checked is\nthe id, in :func:`_resolved_tags` -- a rule applying a tag that does not\nexist would label nothing while claiming otherwise.", "properties": { "id": { "title": "Id", "type": "string" } }, "required": ["id"], "title": "RuleTagRef", "type": "object" }, "RuleUpdate": { "description": "The part of a rule an edit may change: its name.\n\nNot the search, and not the tags either. Both of those are what a rule *is*\n-- change one and the rule labels a different set of objects, while the\nlabels it already wrote stay where they are, explaining nothing and\nre-applied by nobody. That is a new rule and a deleted one, which is two\noperations this API already has.\n\nA name, by contrast, is only how the settings list refers to the rule: the\nlabels it wrote name it by id, so renaming reaches all of them without a\nsingle ``tag_target`` row being written.", "properties": { "name": { "title": "Name", "type": "string" } }, "required": ["name"], "title": "RuleUpdate", "type": "object" }, "SchemasPayload": { "additionalProperties": true, "description": "``/schemas/{db_id}`` — unenveloped; null when the database is missing.", "properties": { "schemas": { "items": { "$ref": "#/components/schemas/SchemaSummary" }, "title": "Schemas", "type": "array" }, "schemas_count": { "title": "Schemas Count", "type": "integer" } }, "required": ["schemas_count", "schemas"], "title": "SchemasPayload", "type": "object" }, "SchemaSummary": { "additionalProperties": true, "description": "One schema of a database, with how many tables it holds.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "tables_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tables Count" } }, "required": ["id"], "title": "SchemaSummary", "type": "object" }, "SemanticExplorationGraph": { "additionalProperties": true, "description": "``{nodes, links}`` for the semantic layer, in one response.", "properties": { "links": { "items": { "$ref": "#/components/schemas/GraphLink" }, "title": "Links", "type": "array" }, "nodes": { "items": { "$ref": "#/components/schemas/SemanticGraphNode" }, "title": "Nodes", "type": "array" } }, "title": "SemanticExplorationGraph", "type": "object" }, "SemanticGraphNode": { "additionalProperties": true, "description": "A term on the semantic-layer exploration graph.", "properties": { "column_attributes_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Column Attributes Count" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "relationship_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Relationship Count" }, "sql_attributes_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sql Attributes Count" }, "synonyms": { "items": { "type": "string" }, "title": "Synonyms", "type": "array" }, "zones": { "items": { "$ref": "#/components/schemas/ZoneChip" }, "title": "Zones", "type": "array" } }, "required": ["id"], "title": "SemanticGraphNode", "type": "object" }, "SemanticStatusResponse": { "additionalProperties": true, "properties": { "calculated": { "title": "Calculated", "type": "boolean" }, "last_failure_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Failure At" }, "last_success_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Success At" }, "running": { "title": "Running", "type": "boolean" } }, "required": [ "calculated", "running", "last_success_at", "last_failure_at" ], "title": "SemanticStatusResponse", "type": "object" }, "SqlAttribute": { "additionalProperties": true, "description": "A SqlAttribute with its owning Term and the SQL text behind it.\n\n``zones`` is resolved only by the single-attribute read; ``sql_id`` and\n``database_name`` only by the create/update writes.", "properties": { "certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Certified" }, "created": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Created" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_suggestion": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description Suggestion" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expression" }, "id": { "title": "Id", "type": "string" }, "modified": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Modified" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modified By" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" }, "sql": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sql" }, "sql_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sql Id" }, "tags": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TagChip" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "term_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Id" }, "term_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Name" }, "zones": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ZoneChip" }, "type": "array" }, { "type": "null" } ], "title": "Zones" } }, "required": ["id"], "title": "SqlAttribute", "type": "object" }, "SqlAttributeCreate": { "properties": { "description": { "title": "Description", "type": "string" }, "expression": { "minLength": 1, "title": "Expression", "type": "string" }, "name": { "minLength": 1, "title": "Name", "type": "string" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "source": { "default": "manual", "title": "Source", "type": "string" }, "term_id": { "title": "Term Id", "type": "string" } }, "required": ["name", "description", "expression", "term_id"], "title": "SqlAttributeCreate", "type": "object" }, "SqlAttributeExplorationDetails": { "additionalProperties": true, "description": "A SqlAttribute's own Sql query and owning Term, for expanding it on the graph.\n\nBoth are `None` only when the attribute itself doesn't exist (or is out\nof scope) — see `fetch_sql_attribute_exploration_details`. `sql` alone\ncan be `None` when the attribute's SQL touches a table outside the\ncaller's zones even though the attribute/term are visible.", "properties": { "sql": { "anyOf": [ { "$ref": "#/components/schemas/SqlAttributeExplorationSql" }, { "type": "null" } ] }, "term": { "anyOf": [ { "$ref": "#/components/schemas/TermSummary" }, { "type": "null" } ] } }, "title": "SqlAttributeExplorationDetails", "type": "object" }, "SqlAttributeExplorationSql": { "additionalProperties": true, "description": "The Sql query node HAS_SQL-linked to a SqlAttribute.", "properties": { "id": { "title": "Id", "type": "string" }, "sql": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sql" } }, "required": ["id"], "title": "SqlAttributeExplorationSql", "type": "object" }, "SqlAttributeMetadataPatch": { "properties": { "certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Certified" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "name": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "title": "Name" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" } }, "title": "SqlAttributeMetadataPatch", "type": "object" }, "SqlAttributePatchResponse": { "additionalProperties": true, "description": "``term_certification`` is recomputed only when the patch names a term.", "properties": { "data": { "$ref": "#/components/schemas/SqlAttribute" }, "term_certification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Certification" } }, "required": ["data", "term_certification"], "title": "SqlAttributePatchResponse", "type": "object" }, "SqlAttributeUpdate": { "properties": { "description": { "title": "Description", "type": "string" }, "expression": { "minLength": 1, "title": "Expression", "type": "string" }, "name": { "minLength": 1, "title": "Name", "type": "string" }, "source": { "default": "manual", "title": "Source", "type": "string" }, "term_id": { "title": "Term Id", "type": "string" } }, "required": ["name", "description", "expression", "term_id"], "title": "SqlAttributeUpdate", "type": "object" }, "SqlAttributeValidate": { "properties": { "attribute_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Attribute Id" }, "expression": { "minLength": 1, "title": "Expression", "type": "string" }, "term_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Id" } }, "required": ["expression"], "title": "SqlAttributeValidate", "type": "object" }, "SqlExplorationColumn": { "additionalProperties": true, "description": "One Column the Sql node's own `SQL` edge connects to directly.\n\nSame shape as `ColumnAttributeExplorationColumn` — enough for a client\nto graft it on as a fully expandable Column node.", "properties": { "data_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Data Type" }, "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "table_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Id" }, "table_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Name" } }, "required": ["id"], "title": "SqlExplorationColumn", "type": "object" }, "SqlExplorationCustomAnalysis": { "additionalProperties": true, "description": "A CustomAnalysis HAS_SQL-linked to the same Sql node as a SqlAttribute.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "required": ["id"], "title": "SqlExplorationCustomAnalysis", "type": "object" }, "SqlExplorationDetails": { "additionalProperties": true, "description": "The CustomAnalysis, Column, Table and SqlAttribute nodes hanging off a Sql node.\n\n`custom_analyses` is empty for the common case of a Sql node with no\nCustomAnalysis sharing it; `columns` is every visible Column the Sql\nnode's own `SQL` edges reach directly; `tables` is every visible Table\nthe Sql node's own `SQL` edges reach directly; `sql_attributes` is every\nvisible SqlAttribute this same Sql node backs (the reverse of\n`SqlAttributeExplorationDetails.sql`) — see\n`fetch_sql_exploration_details`.", "properties": { "columns": { "items": { "$ref": "#/components/schemas/SqlExplorationColumn" }, "title": "Columns", "type": "array" }, "custom_analyses": { "items": { "$ref": "#/components/schemas/SqlExplorationCustomAnalysis" }, "title": "Custom Analyses", "type": "array" }, "sql_attributes": { "items": { "$ref": "#/components/schemas/SqlExplorationSqlAttribute" }, "title": "Sql Attributes", "type": "array" }, "tables": { "items": { "$ref": "#/components/schemas/SqlExplorationTable" }, "title": "Tables", "type": "array" } }, "title": "SqlExplorationDetails", "type": "object" }, "SqlExplorationSqlAttribute": { "additionalProperties": true, "description": "A SqlAttribute HAS_SQL-linked to the Sql node, with its owning Term.\n\n`term_id`/`term_name` are `None` only when the SqlAttribute has no\nowning Term at all — an out-of-scope owning Term instead drops the\nwhole row, same as `fetch_sql_attribute_exploration_details`'s own\n`term`.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "term_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Id" }, "term_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Name" } }, "required": ["id"], "title": "SqlExplorationSqlAttribute", "type": "object" }, "SqlExplorationTable": { "additionalProperties": true, "description": "One Table the Sql node's own `SQL` edge connects to directly.\n\nOne hop out from the statement along its own `SQL` edge — enough for a\nclient to graft it on as a fully expandable Table node, same shape as\n`SqlExplorationColumn` minus the column-only fields.", "properties": { "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "table_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Type" } }, "required": ["id"], "title": "SqlExplorationTable", "type": "object" }, "SqlExpressionValidationResult": { "additionalProperties": true, "description": "``/sql-attributes/validate`` — a parse failure is a 422, not ``valid: false``.", "properties": { "expression": { "title": "Expression", "type": "string" }, "valid": { "title": "Valid", "type": "boolean" } }, "required": ["valid", "expression"], "title": "SqlExpressionValidationResult", "type": "object" }, "SqlValidationResult": { "additionalProperties": true, "description": "``/custom-analyses/validate`` — a parse failure is a 422, not ``valid: false``.", "properties": { "sql": { "title": "Sql", "type": "string" }, "valid": { "title": "Valid", "type": "boolean" } }, "required": ["valid", "sql"], "title": "SqlValidationResult", "type": "object" }, "SsoFederationBody": { "properties": { "enabled": { "title": "Enabled", "type": "boolean" } }, "required": ["enabled"], "title": "SsoFederationBody", "type": "object" }, "SsoFederationState": { "additionalProperties": true, "description": "The one flag ``PATCH /connections/{database_name}/sso-federation`` sets.\n\nThe route deliberately echoes just the flag rather than the connection, so\na caller never has to re-send credentials to toggle it.", "properties": { "database_name": { "title": "Database Name", "type": "string" }, "sso_federation": { "title": "Sso Federation", "type": "boolean" } }, "required": ["database_name", "sso_federation"], "title": "SsoFederationState", "type": "object" }, "StatusResponse": { "additionalProperties": true, "description": "``{\"status\": \"ok\"}`` or ``{\"status\": \"accepted\"}`` for async triggers.", "properties": { "status": { "title": "Status", "type": "string" } }, "required": ["status"], "title": "StatusResponse", "type": "object" }, "TableColumns": { "additionalProperties": true, "description": "A table with one page of its columns.\n\nEvery field but ``columns`` is absent from the empty fallback the route\nreturns when the table (or its schema/database path) is missing.", "properties": { "columns": { "items": { "$ref": "#/components/schemas/ColumnSummary" }, "title": "Columns", "type": "array" }, "columns_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Columns Count" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "table_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Name" }, "table_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Type" } }, "title": "TableColumns", "type": "object" }, "TableExplorationDetails": { "additionalProperties": true, "description": "The table-detail modal: its SQL queries and one page of its Terms.", "properties": { "queries": { "items": { "$ref": "#/components/schemas/TableSqlQuery" }, "title": "Queries", "type": "array" }, "terms": { "items": { "$ref": "#/components/schemas/TableExplorationTerm" }, "title": "Terms", "type": "array" }, "terms_total": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Terms Total" } }, "title": "TableExplorationDetails", "type": "object" }, "TableExplorationTerm": { "additionalProperties": true, "description": "A Term linked to a table, with the relationship kind(s) reaching it.\n\n``relationship_types`` names how this term connects to the table —\n``REPRESENTS`` directly, and/or ``HAS_ATTRIBUTE``/``SEMANTIC_FK`` via one\nof its columns — the same way ``ExplorationEdge``/``GraphLink`` name\ntheirs, so a client can label the connection the same way it would read\nin the graph itself.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "relationship_types": { "items": { "type": "string" }, "title": "Relationship Types", "type": "array" } }, "required": ["id"], "title": "TableExplorationTerm", "type": "object" }, "TableSqlQuery": { "additionalProperties": true, "description": "A stored SQL query that references the table.\n\n``sql`` is nullable: unlike the other Sql reads in ``auto_ontology/dal/exploration``\nthis query has no ``_NON_EMPTY_SQL`` filter, so a Sql node with a null or\nblank ``sql_full_query`` reaches the response. Declaring it required would\nturn that row into a 500 for the whole table-detail modal.", "properties": { "id": { "title": "Id", "type": "string" }, "sql": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sql" } }, "required": ["id"], "title": "TableSqlQuery", "type": "object" }, "TableSummary": { "additionalProperties": true, "description": "One table of a schema, with its column / SQL / Term counts.", "properties": { "columns_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Columns Count" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Description Certified" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "sql_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sql Count" }, "table_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Type" }, "tags": { "items": { "$ref": "#/components/schemas/TagChip" }, "title": "Tags", "type": "array" }, "terms_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Terms Count" } }, "required": ["id"], "title": "TableSummary", "type": "object" }, "Tag": { "additionalProperties": true, "description": "A tag, as both the list and the create endpoint return it.\n\nThe four columns describing *when* are required, unlike most of this\nmodule: each is ``NOT NULL`` and ``auto_ontology.dal.tags`` selects them on every\npath.\n\n``created`` and ``modified`` are the first timestamps this module carries,\nso they set the convention: a timezone-aware ``datetime``, which Pydantic\nserialises as ISO 8601 and the client parses directly. They are read from\nthe database rather than the application clock, so a client comparing two\ntags is comparing one clock.\n\nThe two describing *who* are nullable, and each null says something\ndifferent. ``created_by`` is null for a tag made by a caller that reached\nFastAPI without the gateway's identity header. ``modified_by`` is\nadditionally null for a tag nobody has renamed, which is the same fact\n``modified == created`` states.\n\nBoth are opaque Better Auth user ids. Resolving one to a name is the\ngateway's job -- the accounts live in a schema this service does not own --\nso this API deliberately answers with the id it stored.", "properties": { "created": { "format": "date-time", "title": "Created", "type": "string" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "id": { "title": "Id", "type": "string" }, "modified": { "format": "date-time", "title": "Modified", "type": "string" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modified By" }, "name": { "title": "Name", "type": "string" } }, "required": ["id", "name", "created", "modified"], "title": "Tag", "type": "object" }, "TagChip": { "additionalProperties": true, "description": "A tag as rendered beside the object it labels.\n\nDeliberately narrower than :class:`Tag`: a chip needs the name to show and\nthe id to remove itself by, and the timestamps describe the tag rather than\nthe labelling, so carrying them on every chip of every row would say\nnothing the tag's own page does not say better.\n\nHere rather than with the tag models below because every taggable thing\ncarries it, and the catalog ones are modelled before the tags themselves.", "properties": { "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": ["id", "name"], "title": "TagChip", "type": "object" }, "TagCreate": { "properties": { "name": { "title": "Name", "type": "string" } }, "required": ["name"], "title": "TagCreate", "type": "object" }, "TagItem": { "additionalProperties": true, "description": "One object carrying a tag, whichever of the five kinds it is.\n\n``type`` is what tells them apart, as :class:`TagTargetType` spells the five.\n\n``path`` says where the object sits — ``database.schema`` for a Table,\n``database.schema.table`` for a Column, and the owning Term for either kind\nof attribute, which are properties of one in the same sense and so are\ndescribed the same way. Null only for a Term, which is a glossary entry\nrather than a catalog object and sits under nothing.\n\n``tagged_by`` and ``rule`` are where the label came from, for the page's\n\"Tagged By\" column: the account that applied it by hand, or the rule that\nmatched. At most one is set — a label has one source — and both null is an\nanswer rather than a gap: it is what an attach carrying no identity records,\nso the page reads it as \"Auto Generated\", the deployment having labelled\nthis itself. A row written before either column existed reads the same way,\nsince a label nobody claimed is a label nobody claimed.\n\n``tagged_by`` is an opaque Better Auth user id, resolved to a name by the\ngateway for the reason :class:`Tag`'s authors are: the accounts live in a\nschema this service does not own. An id that resolves to nothing reads as\n\"Auto Generated\" as well — these are not foreign keys, so an account can be\ndeleted and leave the label behind, and the column names a person or a rule\nor neither rather than spelling out which kind of nobody this is.\n\nThe four id fields are the same relationships as ids, which is what a link\nto the object's own page is built from: a Table and a Column are addressed\nby their whole catalog chain, an attribute by the Term whose page lists it,\nand a Term by its own id alone. Each kind fills only the ones it has.", "properties": { "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path" }, "rule": { "anyOf": [ { "$ref": "#/components/schemas/TagItemRule" }, { "type": "null" } ] }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "table_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Id" }, "tagged": { "format": "date-time", "title": "Tagged", "type": "string" }, "tagged_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tagged By" }, "term_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Term Id" }, "type": { "$ref": "#/components/schemas/TagTargetType" } }, "required": ["id", "name", "type", "tagged"], "title": "TagItem", "type": "object" }, "TagItemRule": { "additionalProperties": true, "description": "The rule that applied a label, named so a reader can recognise it.\n\nThe id as well as the name because a rule can be renamed: the name is what\nto print, and the id is what still refers to the same rule afterwards.", "properties": { "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": ["id", "name"], "title": "TagItemRule", "type": "object" }, "TagTarget": { "description": "The object to label: what kind it is, and which one.", "properties": { "id": { "title": "Id", "type": "string" }, "type": { "$ref": "#/components/schemas/TagTargetType" } }, "required": ["type", "id"], "title": "TagTarget", "type": "object" }, "TagTargetType": { "description": "Which of the five things a tag points at.\n\nUsed on both sides of tagging: it is the ``type`` of a :class:`TagItem` a\ntag's page reads, and the ``type`` the attach and detach routes validate\nagainst — which is what makes an unknown kind a 422 from FastAPI's own\nvalidation, listing the five it does accept.\n\nThe five strings are also the keys ``auto_ontology.dal.tags`` resolves to a\n``tag_target`` column, and they are spelled out here rather than imported\nfrom it: this module is the shape of the API, and pulling a five-string\nvocabulary out of the DAL made every importer of it load SQLAlchemy and the\nwhole table metadata too. ``auto_ontology/server/tests/test_tag_target_type.py`` is\nwhat keeps the two spellings identical, since a kind the DAL has no column\nfor would answer 500 rather than the 422 this enum exists to produce.", "enum": [ "term", "table", "column", "column_attribute", "sql_attribute" ], "title": "TagTargetType", "type": "string" }, "TagUpdate": { "description": "A rename. The name is the only part of a tag there is to edit.", "properties": { "name": { "title": "Name", "type": "string" } }, "required": ["name"], "title": "TagUpdate", "type": "object" }, "Term": { "additionalProperties": true, "description": "A Term with its certification rollup and resolved zone chips.", "properties": { "certification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Certification" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Description Certified" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "name_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Name Certified" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "synonyms": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Synonyms" }, "zones": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ZoneChip" }, "type": "array" }, { "type": "null" } ], "title": "Zones" } }, "required": ["id"], "title": "Term", "type": "object" }, "TermCountEntry": { "additionalProperties": true, "description": "``{term_id, count}`` — one per-term breakdown row. Zeroes are omitted.", "properties": { "count": { "title": "Count", "type": "integer" }, "term_id": { "title": "Term Id", "type": "string" } }, "required": ["term_id", "count"], "title": "TermCountEntry", "type": "object" }, "TermDetail": { "additionalProperties": true, "description": "One Term with the tables that represent it and its related terms.\n\n``tags`` is resolved here and on the paged list. The list reads them once\nfor the page, which is what its cards draw.", "properties": { "certification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Certification" }, "created": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Created" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Description Certified" }, "id": { "title": "Id", "type": "string" }, "modified": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Modified" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modified By" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "name_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Name Certified" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "related_terms": { "items": { "$ref": "#/components/schemas/TermSummary" }, "title": "Related Terms", "type": "array" }, "synonyms": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Synonyms" }, "table_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Table Count" }, "tables": { "items": { "$ref": "#/components/schemas/TermTable" }, "title": "Tables", "type": "array" }, "tags": { "items": { "$ref": "#/components/schemas/TagChip" }, "title": "Tags", "type": "array" }, "zones": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ZoneChip" }, "type": "array" }, { "type": "null" } ], "title": "Zones" } }, "required": ["id"], "title": "TermDetail", "type": "object" }, "TermExplorationDetails": { "additionalProperties": true, "description": "One ordered page of Tables linked to a Term, for expanding it on the graph.", "properties": { "tables": { "items": { "$ref": "#/components/schemas/TermExplorationTable" }, "title": "Tables", "type": "array" }, "tables_total": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tables Total" } }, "title": "TermExplorationDetails", "type": "object" }, "TermExplorationTable": { "additionalProperties": true, "description": "A Table linked to a term, with the relationship kind(s) reaching it.\n\nThe reverse of ``TableExplorationTerm``: ``relationship_types`` names how\nthis table connects to the term — ``REPRESENTS`` directly, and/or\n``HAS_ATTRIBUTE``/``SEMANTIC_FK`` via one of its columns — so a client can\nlabel an expansion edge from either end the same way.", "properties": { "database_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Id" }, "database_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Database Name" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "relationship_types": { "items": { "type": "string" }, "title": "Relationship Types", "type": "array" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" }, "schema_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Name" }, "table_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Table Type" } }, "required": ["id"], "title": "TermExplorationTable", "type": "object" }, "TermListItem": { "additionalProperties": true, "description": "A Term as it appears in the paged ``/terms`` list.\n\n``tags`` travels with the page so a card can show its chips without a\nsecond read. An untagged term is an empty list, not a missing field.", "properties": { "certification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Certification" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Description Certified" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "name_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Name Certified" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "schema_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Schema Names" }, "synonyms": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Synonyms" }, "tags": { "items": { "$ref": "#/components/schemas/TagChip" }, "title": "Tags", "type": "array" }, "zones": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ZoneChip" }, "type": "array" }, { "type": "null" } ], "title": "Zones" } }, "required": ["id"], "title": "TermListItem", "type": "object" }, "TermsPageResponse": { "additionalProperties": true, "description": "One page of the Terms list with its per-term count breakdowns.\n\n``total`` counts every matching term; the count lists cover only the\nterms on this page when a limit was given.", "properties": { "column_attribute_counts": { "items": { "$ref": "#/components/schemas/TermCountEntry" }, "title": "Column Attribute Counts", "type": "array" }, "related_counts": { "items": { "$ref": "#/components/schemas/TermCountEntry" }, "title": "Related Counts", "type": "array" }, "sql_attribute_counts": { "items": { "$ref": "#/components/schemas/TermCountEntry" }, "title": "Sql Attribute Counts", "type": "array" }, "terms": { "items": { "$ref": "#/components/schemas/TermListItem" }, "title": "Terms", "type": "array" }, "total": { "title": "Total", "type": "integer" } }, "required": [ "terms", "total", "column_attribute_counts", "sql_attribute_counts", "related_counts" ], "title": "TermsPageResponse", "type": "object" }, "TermSummary": { "additionalProperties": true, "description": "The three fields every Term projection carries.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "required": ["id"], "title": "TermSummary", "type": "object" }, "TermTable": { "additionalProperties": true, "description": "A table that REPRESENTS a Term, with its catalog path ids.", "properties": { "db_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Db Id" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "schema_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Id" } }, "required": ["id"], "title": "TermTable", "type": "object" }, "TermUpdate": { "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "description_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Description Certified" }, "name": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "title": "Name" }, "name_certified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Name Certified" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" } }, "title": "TermUpdate", "type": "object" }, "ValidationError": { "properties": { "ctx": { "title": "Context", "type": "object" }, "input": { "title": "Input" }, "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "title": "Location", "type": "array" }, "msg": { "title": "Message", "type": "string" }, "type": { "title": "Error Type", "type": "string" } }, "required": ["loc", "msg", "type"], "title": "ValidationError", "type": "object" }, "Zone": { "additionalProperties": true, "description": "A zone with its catalog data items.\n\n``items`` is absent on the list endpoint, a list of ``ZoneItem`` on the\ndetail/update endpoints, and a plain list of the ids that were linked on\ncreate.", "properties": { "color": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Color" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "id": { "title": "Id", "type": "string" }, "items": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/components/schemas/ZoneItem" }, { "type": "string" } ] }, "type": "array" }, { "type": "null" } ], "title": "Items" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "required": ["id"], "title": "Zone", "type": "object" }, "ZoneChip": { "additionalProperties": true, "description": "A zone as rendered next to something else it grants access to.\n\n``enabled`` is false for a zone whose ``Zone`` label was swapped for\n``disableZone``; those are returned to admins only.", "properties": { "color": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Color" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "id": { "title": "Id", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "required": ["id"], "title": "ZoneChip", "type": "object" }, "ZoneCreate": { "properties": { "color": { "title": "Color", "type": "string" }, "created_by": { "title": "Created By", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "items": { "items": { "type": "string" }, "title": "Items", "type": "array" }, "name": { "title": "Name", "type": "string" } }, "required": ["name", "color", "items", "created_by"], "title": "ZoneCreate", "type": "object" }, "ZoneItem": { "additionalProperties": true, "description": "A catalog node a zone grants access to (a database, schema or table).", "properties": { "id": { "title": "Id", "type": "string" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "required": ["id"], "title": "ZoneItem", "type": "object" }, "ZoneStatusUpdate": { "properties": { "enabled": { "title": "Enabled", "type": "boolean" } }, "required": ["enabled"], "title": "ZoneStatusUpdate", "type": "object" }, "ZoneUpdate": { "properties": { "color": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Color" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "items": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Items" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "title": "ZoneUpdate", "type": "object" } }, "securitySchemes": { "ApiToken": { "type": "apiKey", "in": "header", "name": "x-api-key", "description": "A Auto Ontology API token (`auto_ontology_…`), created under Account → API Tokens. The token carries its owner’s permissions. `Authorization: Bearer ` is accepted too." }, "SessionCookie": { "type": "apiKey", "in": "cookie", "name": "better-auth.session_token", "description": "A browser session from an interactive sign-in. Only the few operations that manage API tokens require this — a token may not mint or revoke tokens." } } } }