API reference · Data plane
Tables
Read the schema of a project and change a table's access preset. Creating and altering tables is done in SQL or with the create_table / apply_migration tools.
Host: https://proj-<id>.manybases.com · Key: pk_ with X-Session, or sk_. The same routes exist for an account key under /v1/projects/:pid/tables….
/v1/tables/v1/tables/:table{ name, mode, columns }, where columns maps each column name to its type (TEXT, INTEGER, REAL, BOOLEAN, JSON)/v1/tables/:table { mode }sk_ and ak_ only; confirmed in two steps — see belowWhat the list returns#
| Caller | Receives |
|---|---|
sk_ / ak_ | { name, mode, row_count } for every table of the project |
| a signed-in user | { name, mode } for the tables they are allowed to list |
| anonymous | 401 — the map of tables is not public |
row_count is the total of the table, never what the caller may read, so it is reserved to the management side: on a prive table it would tell an end user how much data the others hold. mode is the access policy of the table; it travels only for tables the caller can list, because publishing the lock of a table you cannot read is publishing the lock.
The five platform columns exist on every table and are managed by the platform — see Conventions.
Changing a preset#
mode accepts exactly the eight wire identifiers: prive, partage, collaboratif, espaces, espace_modere, lecture_publique, journal, formulaire. Any other value is refused with 400 validation_error that lists them. What each one means is in Access presets.
This is the most consequential change in the product — it alters what other identities see — so it always confirms in two steps:
- First call →
428 confirmation_required. Nothing has changed. The body describes who gains or loses reading, who gains or loses writing, and how many rows become invisible, plus aconfirmation_token. - Second call, same body plus
confirmation_token→ executed. The token is single-use, lives 5 minutes, and is bound to this account, this project, this table, the current preset and the target preset. If the preset moved in between, the token dies and the API answers428again with a fresh summary.
Two more rules:
- Opening a table that already holds rows to the public requires a signed-in human. When the switch opens reading to
users(everyone signed in) oranon(everyone), and the table is not empty, the caller must presentX-Account-Session; without it,401and no token is issued. An empty table holds no data deposited under a promise, so no human is required there — the two-step confirmation still applies. Closing a preset, moving to a spaces preset, or widening writes (partage→collaboratif) never require a human. - Switching a non-empty table to
espacesorespace_modereis refused with409 conflict: existing rows have no space. Empty the table, or create it on a spaces preset from the start. Switching between the two spaces presets always passes, rows included; switching out of a spaces preset resets the rows'space_idtonull.
Every preset change is written in the request log at level warn.
