NJustyBaseDocumentation

reference guide

Web Editor API reference

Document the existing Web Editor authentication, REST, query-session, export, import, and WebSocket contracts without changing runtime behavior.

Web onlyv3.16.38 · verified 2026-08-19

#Web Editor API reference

This page describes the currently implemented server surface. The API is authenticated unless a route is marked health/authentication. Request and response types are defined in packages/contracts; the API does not promise that every web-internal shape is stable for third-party clients.

#Stability labels

Surface Stability Guidance
/healthz, /api/auth/*, connection/profile, metadata, history, query, import/export routes Stable product surface Use contracts and expect additive fields.
/api/lsp/* REST helpers and /api/ws, /api/lsp WebSockets Web-internal protocol Use the shared contracts and protocol version from the same product release.
Local embedded database details, event timing, generated SQL text Implementation detail Do not build a long-lived integration on undocumented internals.

#REST route inventory

Route Contract surface
/api/admin/backup Web API route
/api/admin/restore Web API route
/api/admin/users Web API route
/api/admin/users/:id Web API route
/api/audit Web API route
/api/auth/login Web API route
/api/auth/logout Web API route
/api/auth/me Web API route
/api/connections Web API route
/api/connections/:id Web API route
/api/connections/:id/test Web API route
/api/connections/test Web API route
/api/history Web API route
/api/lsp Web API route
/api/lsp/completion Web API route
/api/lsp/diagnostics Web API route
/api/lsp/format Web API route
/api/lsp/snippets Web API route
/api/metadata/columns Web API route
/api/metadata/databases Web API route
/api/metadata/objects Web API route
/api/metadata/schemas Web API route
/api/preferences/editor Web API route
/api/query Web API route
/api/query/:id/aggregate Web API route
/api/query/:id/cancel Web API route
/api/query/:id/export Web API route
/api/query/:id/group Web API route
/api/query/:id/page Web API route
/api/query/edit Web API route
/api/query/edit/preview Web API route
/api/query/import Web API route
/api/query/import-file Web API route
/api/query/import-file/preview Web API route
/api/query/import/preview Web API route
/api/query/preview Web API route
/api/schema/search Web API route
/api/schema/tree Web API route
/api/ws Web API route
/healthz Web API route

#Query session model

POST /api/query starts a job and returns a query id. GET /api/ws streams sequenced query events; clients can reconnect with afterSequence. Page, aggregate, group, export, and cancel operations address the query/session id. Results are stored in a separate SQLite query-session directory and expire after one hour by default.

The server enforces row limits, query timeouts, per-user rate limits, ownership checks, CSRF on mutating routes, and a read-only boundary for profiles marked read-only. A cancelled or expired session is not a complete result.

#Import and export

The Web Editor result export contract supports CSV, CSV.GZ, CSV.ZST, JSON, XML, SQL INSERT, Markdown, XLSX, and XLSB. File import accepts CSV, XLSX, and XLSB through preview and confirmed import routes. Desktop-only Parquet/file-preview/XPT workflows are not silently presented as Web API support.

#LSP protocol

REST completion, diagnostics, and formatting use shared SQL core contracts. /api/lsp is an authenticated JSON-RPC WebSocket for the Monaco language client. It shares parser concepts with the desktop extension but has no vscode dependency.

#Error handling

Errors use a code/message shape such as UNAUTHENTICATED, CSRF_FAILED, NOT_FOUND, RESULT_EXPIRED, or a route-specific validation code. Clients should show the message, stop dependent actions, and avoid retrying authorization or validation errors indefinitely.

See Web Editor administration for deployment, secrets, cookies, backup, and reverse-proxy requirements.

#Active AI and MCP contracts

Tool Surface
netezza_explain_plan Language Model Tool
netezza_find_table_locations Language Model Tool
netezza_get_columns Language Model Tool
netezza_get_comments Language Model Tool
netezza_get_databases Language Model Tool
netezza_get_ddl Language Model Tool
netezza_get_dependencies Language Model Tool
netezza_get_external_tables Language Model Tool
netezza_get_favorites Language Model Tool
netezza_get_procedures Language Model Tool
netezza_get_schemas Language Model Tool
netezza_get_sql_diagnostics Language Model Tool
netezza_get_sql_schema Language Model Tool
netezza_get_table_stats Language Model Tool
netezza_get_tables Language Model Tool
netezza_get_tuning_advice Language Model Tool
netezza_get_views Language Model Tool
netezza_inspect_import_file Language Model Tool
netezza_propose_import_mapping Language Model Tool
netezza_search_schema Language Model Tool
netezza_validate_sql Language Model Tool
netezza_validate_sql_on_database Language Model Tool

#MCP tools

Tool Surface
analyze_query_plan Read-only MCP catalog
explain_sql Read-only MCP catalog
get_columns Read-only MCP catalog
get_comments Read-only MCP catalog
get_databases Read-only MCP catalog
get_ddl Read-only MCP catalog
get_dependencies Read-only MCP catalog
get_external_tables Read-only MCP catalog
get_procedures Read-only MCP catalog
get_schemas Read-only MCP catalog
get_table_constraints Read-only MCP catalog
get_table_stats Read-only MCP catalog
get_tables Read-only MCP catalog
get_views Read-only MCP catalog
search_schema Read-only MCP catalog
validate_sql Read-only MCP catalog