Also available: Markdown version · llms.txt · full site content
Database
Exposing tables
A table is private until you expose it. Select, insert, update, and delete are separate switches, and each one maps to a real PostgreSQL grant.
One switch per operation
customers · exposure illustration
Served at /rest/v1/customers for the operations you switched on.
| Switch | HTTP | PostgreSQL grant to the API role |
|---|---|---|
select | GET /rest/v1/{table} | GRANT SELECT |
insert | POST /rest/v1/{table} | GRANT INSERT |
update | PATCH /rest/v1/{table}/{id} | GRANT UPDATE |
delete | DELETE /rest/v1/{table}/{id} | GRANT DELETE |
Turning a switch off revokes the grant immediately. A request for an operation that is not exposed returns 405 method_not_allowed.
Choosing what to expose
- Start with
selectonly, and add write operations when a screen needs them. - A shared catalog might expose
selectto everyone; a per-user table pairs writes with a user column. - Exposure is not authorization by itself: every request still needs a publishable key and an end-user JWT.
- The Console row browser is unaffected — it uses the SQL role, not the API role.