Skip to Content
Admin ConsoleDatabase Explorer

Database Explorer

The Database Explorer lets you connect external databases to the Auris console, browse their schemas, run SQL queries, and monitor connection health — all from the browser, without leaving the admin console.

Access it from the sidebar: Database Explorer with sub-sections Connections, Query Editor, Schema Browser, Data Viewer, Monitoring, and Actions.


Overview

Each Auris tenant maintains its own set of database connections. A connection stores the host, credentials (encrypted at rest), engine type, and optional SSH tunnel and pool configuration. Once a connection is saved and tested, you can:

  • Browse tables, columns, indexes, and foreign keys in the Schema Browser
  • Run arbitrary SQL in the Query Editor, save queries for reuse, and review execution history
  • Page through table data in the Data Viewer with column visibility controls and CSV export
  • Monitor active connections, database size, and slow queries in the Monitoring view
  • Execute maintenance actions such as VACUUM, ANALYZE, and REINDEX from the Actions page

Adding a Connection

Open the Connections page

Navigate to Database ExplorerConnections. Click New Connection.

Fill in the connection details

FieldRequiredNotes
NameYesMust be unique within your tenant
EngineYesSee supported engines below
HostYesHostname or IP address
PortYesDefault varies by engine
DatabaseYesDatabase name
UsernameYes
PasswordYesStored encrypted; never shown after save
Connection StringNoOverrides host/port/database when provided
SSLNoToggle to enable TLS
SSL ModeNodisable, require, verify-ca, or verify-full
EnvironmentNodevelopment, staging, production, testing, or other
TagsNoFree-form labels for filtering
ColorNoVisual indicator in the connections list
Read-onlyNoBlocks any write or DDL statements
Vault CredentialNoLink to a stored Vault credential instead of entering a password
SSH TunnelNoJump-host configuration for private networks
Pool ConfigNoConnection pool size and timeout settings

Test the connection

Click Test Connection before saving. The console sends a probe to the target host and reports the latency. The connection status is updated to online on success or error on failure.

Save

Click Save. The connection appears in the list with its current status badge.

Supported Database Engines

EngineValue
PostgreSQLpostgresql
MySQLmysql
MariaDBmariadb
MongoDBmongodb
Redisredis
SQLitesqlite
Microsoft SQL Servermssql
CockroachDBcockroachdb
PlanetScaleplanetscale
Supabasesupabase
Neonneon
Elasticsearchelasticsearch
ClickHouseclickhouse
Tursoturso
Prismaprisma

Editing and Deleting Connections

From the connections list, click the row menu (three dots) to access View, Edit, Test, and Delete options. Deletion is a soft-delete — the connection is removed from all views but the record is retained for query history integrity.


Schema Browser

Navigate to Database ExplorerSchema Browser.

  1. Select a connection from the dropdown.
  2. Optionally select a schema (for engines that support multiple schemas, such as PostgreSQL). The default schema is public.
  3. Use the search box to filter tables by name.

The table list shows each table with its estimated row count and storage size. Click any row to expand it and load the table detail panel, which includes:

Columns

ColumnDescription
NameColumn name
TypeData type as reported by the database engine
NullableWhether the column accepts NULL
DefaultDefault value expression, if any
Primary KeyMarked if the column is part of the primary key

Indexes

Each index shows its name, the columns it covers, whether it is unique, and the index type (B-tree, Hash, GIN, etc., depending on the engine).

Foreign Keys

Each foreign key shows the local column(s), the referenced table and column(s), and the ON DELETE / ON UPDATE actions.

The schema endpoint paginates at the table list level (up to 100 tables per page). Table detail (columns, indexes, foreign keys) is loaded separately when you expand a row.


Query Editor

Navigate to Database ExplorerQuery Editor.

Running a Query

  1. Select a connection from the dropdown at the top. The first available connection is selected automatically.
  2. Enter SQL in the editor area.
  3. Press Ctrl+Enter or click Run to execute.

Results appear in the Results tab as a paginated table. Each cell value can be copied to the clipboard with a single click. The full result set can be downloaded as a CSV file.

If the result set is very large, a truncation warning appears above the table indicating that only a subset of rows is shown.

SQL execution errors are shown inline in the Results tab rather than as a dialog. A red error banner appears below the editor with the database error message. The HTTP request itself returns 200 — this is intentional so that the editor can display the error in context rather than triggering a generic error handler.

Queries are validated server-side before being sent to the database. Statements that fail validation (for example, obvious injection patterns) are rejected before reaching the connection.

Saved Queries

Click Save Query after writing a query. Enter a name and press Enter to confirm. Saved queries are associated with the current connection.

In the Saved tab:

  • All saved queries for the active connection are listed with their names and descriptions.
  • Click a row to load its SQL back into the editor.
  • Shared queries (with the Shared badge) are visible to all users in the tenant with the execute:db_queries permission.
  • Hover over a row to reveal the delete button.

To mark a query as shared, use Edit from the saved queries list and toggle the Shared option.

Query History

The History tab lists all queries executed in the current session and recent past for the selected connection, in reverse chronological order. Each entry shows the SQL, execution time, row count, and status (success or error).

Click any history entry to reload its SQL into the editor.

History is scoped to your user and tenant. Other users’ query history is not visible. The list shows up to 200 entries.


Data Viewer

Navigate to Database ExplorerData Viewer to browse the actual rows in a table without writing SQL.

  1. Select a connection.
  2. Click the table picker (a searchable popover). Filter by schema if needed, then select a table.
  3. The data grid loads the first page of rows.

Grid controls:

ControlDescription
SearchFull-text row search applied server-side
SortClick a column header to sort ascending, click again for descending, again to clear
Column visibilityToggle which columns are shown via the Columns button
Copy cellClick any cell to copy its value to the clipboard
CSV exportDownload the current result set (all pages) as a CSV file
PaginationNavigate pages; page size is configurable

Monitoring

Navigate to Database ExplorerMonitoring.

Select a connection to view its live health data. The monitoring view shows four summary cards at the top:

CardDescription
Active ConnectionsNumber of currently open connections to the database server
Database SizeTotal storage used by the selected database
Slow QueriesNumber of queries that exceeded the slow-query threshold
Avg LatencyAverage query latency from the last monitoring poll

Below the cards, the Slow Queries list shows the individual slow query entries in descending order of execution time. The list is paginated at 10 per page.

The monitoring data refreshes automatically. You can also trigger a manual refresh.

Monitoring data is fetched from the database engine’s internal statistics views (for example, pg_stat_activity on PostgreSQL). Availability of individual metrics depends on the engine.


Actions

Navigate to Database ExplorerActions to execute maintenance operations on a connected database.

  1. Select a connection.
  2. Browse or search the actions catalog. Actions are grouped by category (currently: Maintenance).
  3. Click an action to see its description. Destructive actions are visually flagged.
  4. Click Execute. A confirmation dialog appears before the action runs.

Available maintenance actions include: VACUUM, ANALYZE, REINDEX, CLUSTER, CHECK TABLE, OPTIMIZE TABLE, and similar engine-specific equivalents. The exact set of available actions depends on the connected engine.

Maintenance actions run directly against the connected database. Some operations (such as VACUUM FULL or REINDEX) can lock tables and impact application performance. Run them during low-traffic windows.


Access Control

The Database Explorer uses four distinct permissions. Assign them to admin roles from Users & RolesRoles.

PermissionWhat it grants
view:db_connectionsView the connections list and individual connection details. Test connections. Browse schema, data, stats, and monitoring.
manage:db_connectionsCreate, edit, and delete connections. Requires view:db_connections.
execute:db_queriesRun SQL in the Query Editor. Access query history. Create, edit, and delete saved queries.
manage:db_actionsExecute maintenance actions (VACUUM, ANALYZE, REINDEX, etc.).

A typical separation of responsibilities:

  • Read-only DB analyst: view:db_connections + execute:db_queries
  • DB administrator: all four permissions
  • Ops / SRE: view:db_connections + manage:db_actions (monitoring and maintenance without query access)

The execute:db_queries permission allows running arbitrary SQL against any connection the user can view, including write statements on connections that are not marked read-only. Grant it only to trusted administrators.

Read-Only Connections

When a connection is marked Read-only, the server blocks any statement that is not a read query, regardless of the user’s permissions. This is an additional safeguard for production databases. Enable it when adding production connections where accidental writes would be harmful.


Console Navigation

The Database Explorer sections are accessible from the left sidebar under the Database Explorer group:

Sidebar entryURL path
Connections/db/connections
Query Editor/db/query
Schema Browser/db/schema
Data Viewer/db/data
Monitoring/db/monitoring
Actions/db/actions

API Reference

All Database Explorer endpoints are under /api/db/. They require a valid admin Bearer token and the appropriate permission.

Connections

MethodPathPermissionDescription
GET/api/db/connectionsview:db_connectionsList connections. Filter by search, engine, environment, status.
POST/api/db/connectionsmanage:db_connectionsCreate a connection.
GET/api/db/connections/:idview:db_connectionsGet a single connection.
PATCH/api/db/connections/:idmanage:db_connectionsUpdate a connection (partial).
DELETE/api/db/connections/:idmanage:db_connectionsSoft-delete a connection.
POST/api/db/connections/:id/testview:db_connectionsTest connectivity. Updates status and latency.
POST/api/db/connections/:id/queryexecute:db_queriesExecute SQL. Body: { sql: string }.
GET/api/db/connections/:id/schemaview:db_connectionsList tables. Supports page, limit (max 100), search, schema.
GET/api/db/connections/:id/schema/:tableview:db_connectionsGet columns, indexes, and foreign keys for a table. Supports ?schema=.
POST/api/db/connections/:id/dataview:db_connectionsPaginated table rows. Body: { table, schema?, page?, limit?, search?, sortColumn?, sortDirection? }.
GET/api/db/connections/:id/monitoringview:db_connectionsActive connections, database sizes, slow queries.
POST/api/db/connections/:id/actionsmanage:db_actionsExecute a maintenance action. Body: { action: string }.

Query History

MethodPathPermissionDescription
GET/api/db/query-historyexecute:db_queriesList history. Filter by connectionId. Max 200 entries.

Saved Queries

MethodPathPermissionDescription
GET/api/db/saved-queriesexecute:db_queriesList saved queries. Filter by connectionId.
POST/api/db/saved-queriesexecute:db_queriesCreate a saved query. Body: { connectionId, name, sql, description?, isShared? }.
PATCH/api/db/saved-queries/:idexecute:db_queriesUpdate a saved query.
DELETE/api/db/saved-queries/:idexecute:db_queriesDelete a saved query.

Stats

MethodPathPermissionDescription
GET/api/db/statsview:db_connectionsOverview counts (total/online/offline/error), engine breakdown, environment breakdown, saved query count, recent history.