On this page

Share a table with non-developers

Give a client or a support person a simple page with one table: chosen columns and rows, only the edits you allow, sign-in by e-mail link, every change logged.

Some people need to look at or fix data without being developers: a client checking their orders, a support person correcting a customer's address. A shared view gives them a plain page with one table. They see only the columns and rows you choose, change only what you allow, and never see SQL, Studio, other tables or API keys. They do not need a StitchDB account.

#Create a shared view

  1. In Studio open Database › Shared views and choose New shared view. Give it a name (the people you share it with see it) and pick a table in the public schema.
  2. Under Columns, tick what is shown and what people can change. A new view shows every column and allows no changes. Primary key and generated columns cannot be changed.
  3. Optionally allow adding and deleting rows.
  4. Under Rows, add filters so only some rows are in the view, for example customer_id is 42. Rows outside the filters are never shown, changed or deleted.
  5. Under People, enter their e-mail addresses and choose Share. Each gets an e-mail with a link to open the view.

#How people sign in

The view lives at https://stitchdb.com/share/<id> (Copy link in Studio). The first e-mail has a link that opens it directly and works once, for 7 days. After that, people open the page, enter their e-mail address and get a new sign-in link that works once, for 30 minutes. Only addresses you added receive a link; the page never tells anyone else whether an address has access. A sign-in lasts 7 days in that browser, or until they sign out.

Removing a person, turning the view off or deleting it ends their access at once, also in a browser where the view is already open.

#What people can do

RightWhat it allows
Read (always)See the shown columns of the rows inside the filters, search them, sort by a column, page through them.
Change columnsEdit the columns marked can change, one row at a time. A change that would move a row out of the view (for example changing a filtered status) is refused.
Add rowsAdd a row by filling the columns they can change. Columns with an is filter get the filter value, so the new row lands in the view; the rest get their defaults.
Delete rowsDelete a row inside the view.

Changes and deletes need a primary key on the table. A view of a table without one is read only.

#Activity log

Every row changed, added or deleted through a view is recorded with the person's e-mail address, the time, the primary key and the shown columns before and after. See it under Activity on the view in Studio. Entries are kept 90 days.

#Things to know

  • A shared view reads and writes as the project, like Studio: Row Level Security policies do not limit it. The columns, filters and rights of the view are the limits, so choose them with care.
  • Triggers, constraints and defaults of the table apply as usual, and changes reach Realtime and webhooks like any other write.
  • If a shown column is dropped from the table it disappears from the view. If a filter column is dropped, the view stops working until you remove that filter.
  • A view can be shared with up to 50 people. Only project owners and admins can create and change shared views.

#Limits

LimitFreeProScaleEnterprise
Shared views per project11050500