data_query
Run a database query on one of your servers — passwordless. It executes the engine's own client on the host over Termalin's keyless tunnel, using the database's local trust (Postgres peer auth via sudo -u postgres, MySQL/MariaDB unix-socket via sudo mysql, redis-cli, mongosh, sqlite3) — so no database password is needed or stored anywhere. Read-only by default: only SELECT/SHOW-style statements run unless allowWrites is set (full-access keys only). SQL engines return CSV/TSV with a header. For MongoDB pass a shell expression, e.g. db.products.find({}).limit(20).toArray().
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Server id from hosts_list | |
| query | Yes | The statement / command / expression to run | |
| engine | No | Database engine on that server (default postgres) | |
| database | No | Database name (for sqlite: the .db file path) | |
| username | No | SSH login user (defaults to the tunnel's user, else root) | |
| allowWrites | No | Allow a non-read statement (full-access keys only; default false) | |
| timeoutSeconds | No | Max seconds to wait (default 60, up to 300) |