Skip to content
esc

Search pages and sections. Try a tool name, an error code, a route.

↑↓ navigate↵ openesc close

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….

GET/v1/tables
The tables of the project. What you get depends on who asks — see below
GET/v1/tables/:table
One table: { name, mode, columns }, where columns maps each column name to its type (TEXT, INTEGER, REAL, BOOLEAN, JSON)
PATCH/v1/tables/:table { mode }
Change the access preset. sk_ and ak_ only; confirmed in two steps — see below

What the list returns#

CallerReceives
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
anonymous401 — 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:

  1. 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 a confirmation_token.
  2. 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 answers 428 again 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) or anon (everyone), and the table is not empty, the caller must present X-Account-Session; without it, 401 and 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 espaces or espace_modere is refused with 409 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_id to null.

Every preset change is written in the request log at level warn.