Apps
Make a table private per user
Marks a table of the app's database as per-user: column holds the owner (the user's id, sub in x-hypamoon-user). From then on the app reads and writes it only with env.DB.mine(table) (select, get, count, insert, update, delete), always for the signed-in user; plain SQL that names the table is refused, and so are migrations that would read it around that (views, copies). admin_role lets users with that role use all rows with env.DB.mine(table, { all: true }). The app needs auth and database; the running version picks it up within seconds.
put/apps/{id}/tables/{table}/owner
Request
- Base URL: https://api.hypamoon.com/api/v1
- URL: https://api.hypamoon.com/api/v1/apps/{id}/tables/{table}/owner
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: sites:write)
Path parameters
idstring uuid required
The id of the app.
tablestring required
The name of a table in the app's database.
Request body
Response
The app, with database.per_user_tables.
Changes
No recorded changes to this operation across all 1 revision of this API.