vsql_rest serves your tables over HTTP from inside the database process. A
client reads rows with a URL instead of a connection, filters them with query
parameters, and calls stored functions under /rpc/. There is no application
to write and no second process to run.
Install
vsql_rest.veb is already in the server’s lib/veb/ directory if you installed
VillageSQL with the install script, the Docker image, or a release tarball.
Install it into the server with one statement:
What it adds
It adds no SQL functions. You configure it withSET GLOBAL, and every request
it answers arrives over HTTP.
Example
Create the table first, because the listener caches the database layout when it starts and holds it forschema_ttl seconds:
A setting written with
SET PERSIST survives a restart, but
UNINSTALL EXTENSION deletes it. After an uninstall and reinstall every
setting is back at its default, and no restart brings the old value back.Every string setting is read back through the server, which returns at most
1022 bytes. A longer
schema, allowed_tables, allowed_routines,
table_methods, jwt_secret or jwt_public_key makes every request fail
with 500; a longer ssl_cert or ssl_key keeps the listener from
starting.See also
- Serving Tables as a REST API — filters, per-table methods, and the defaults to change first
- Managing extensions — how extension settings are read and written
- Preview capabilities — what the preview flag turns on and what it promises
- Available extensions — the full catalog
- villagesql/vsql-rest — source, the full route syntax, and the known limitations

