Core Concepts
Before diving into the API, it helps to understand the backend that the Studio runs on, and the four core building blocks of the platform.
Backends
The Studio runs on one of two backends:
- Buildpad Engine: a standalone API server. It holds the database, the users, the sign-in and the files. The browser that shows the Studio, and your application, call the Engine directly.
- Supabase: the Studio’s own API routes, over a Supabase project (PostgreSQL, Supabase Auth and Supabase Storage).
How the Studio picks its backend
The Studio reads the backend from its environment when its server starts:
| Setting | Backend |
|---|---|
DAAS_BACKEND=go, with DAAS_GO_URL set to the Engine’s origin | Buildpad Engine. This is also called Go mode |
DAAS_BACKEND not set, or any other value | Supabase |
A change needs a restart of the Studio, not a new build. To see which backend a running Studio uses, send GET /api/server/health to the Studio. The answer holds backend.mode: go for the Buildpad Engine, supabase for Supabase. These docs use the same answer to show the backend of the Studio that serves them. See Run the Studio on the Buildpad Engine for the setup.
What differs
The API paths, the response format, the filter syntax and the access model (permissions, policies, roles) are the same on the two backends. These features differ:
| Feature | Buildpad Engine | Supabase |
|---|---|---|
| Where the API is | At the Engine’s URL. The Studio URL serves only the Studio | At the Studio’s URL |
| Sign-in | The Engine’s /api/auth/login, and a Supabase-compatible /auth/v1/token. Sign-in with an XAppHub ID token is available when the operator configures it | Supabase Auth, through /api/auth/login |
| Sessions | Bearer tokens only. The Engine sets no cookie | Bearer tokens or session cookies |
| Access rules | The Engine applies roles and permissions before each request. There is no PostgreSQL row-level security (RLS) to write | Roles and permissions in the API, and RLS policies in PostgreSQL |
| Tenants | Each first-level scope is a tenant with its own data model, users and files. Each session belongs to one tenant. The platform operator works in the host. See Host and Tenants | Every scope, first level included, is a row filter in one set of tables |
| Static tokens | A credential for the MCP endpoint. A token written as a data token, for an account that is not an administrator, also works on the item routes | A credential on every route |
| Files | Kept on the Engine’s disk or in a private Amazon S3 bucket. Served at /api/files/assets/:id, with image transforms | Kept in Supabase Storage. Served at /api/assets/:id |
| Hooks, cron jobs and custom services | Stored in the database and run by the Engine. File-based extensions and /api/ext/* endpoints are not available | Stored in the database, plus file-based extensions with custom endpoints |
| Deleting a user | The account is kept with the status deleted, and an administrator can restore it | The account is removed |
| API Explorer | Shows the Engine’s OpenAPI document | Shows the Studio’s OpenAPI document |
A change of backend does not move your data. To move a project from Supabase to the Buildpad Engine, see Move to the Buildpad Engine.
Collections
A collection is a database table (or view). Every collection has a name, a primary key, and zero or more fields.
daas_users ← system collection (managed by the platform)
daas_roles ← system collection
posts ← custom collection you create
products ← custom collection you createYou interact with any collection’s data through the Items API:
GET /api/items/posts → list posts
POST /api/items/posts → create a post
GET /api/items/posts/:id → get one post
PATCH /api/items/posts/:id → update a post
DELETE /api/items/posts/:id → delete a postFields
A field maps to a database column. Each field has a name, a data type, and optional metadata (interface type, display options, validation rules).
| Field type | PostgreSQL type |
|---|---|
string | text / varchar |
integer | int4 |
bigInteger | int8 |
float | float8 |
boolean | bool |
json | jsonb |
dateTime | timestamptz |
uuid | uuid |
Additional types such as text, decimal, date, time, csv, hash, and binary are also supported.
Relational patterns — M2O (many-to-one), O2M (one-to-many), and M2M (many-to-many) — are local types that describe how a field relates to other collections. At the storage level, they use uuid columns with foreign key constraints.
Fields also carry interface metadata that drives the Data Studio’s form renderer (e.g., show a <input>, a rich-text editor, a file picker, etc.).
Items
An item is a single row in a collection. The platform treats every table the same way — system tables and user-defined tables share the same CRUD API surface.
Items support:
- Filtering —
?filter[status][_eq]=active - Field selection —
?fields=id,title,author - Sorting —
?sort=-created_at - Pagination —
?limit=20&page=2 - Relational data —
?fields=*,author.*(deep reads) - Aggregates —
?aggregate[count]=*
See Filter Rules for the complete filter syntax.
Access Control Model
Access control is built on four layers that compose from the most granular to the broadest:
- Read Posts (public = true)
- Read Users (name & id only)
- Create Posts
- Edit Posts (own rows only)
- Delete Posts
- Edit All Posts
- Read Public Data
- Manage Own Posts
- Full Moderator
- Viewer
- User
- Moderator
- User 1
- User 2
- User 3
- User 4
- User 5
Permissions
A permission is the most granular unit of access control. It is always scoped to a collection and an action (create, read, update, delete, share), and can further restrict:
- Item filter — which rows the rule applies to, using the same filter syntax as the API (e.g., only rows where
user_created = $CURRENT_USER) - Field access — which columns are readable or writable for that action
- Field validation — value constraints that must pass before a write is accepted
- Field presets — default values automatically injected on create or update
A permission can grant all access, no access, or custom access for its collection/action pair.
Collection: posts
Action: read
Item filter: { "status": { "_eq": "published" } }
Fields: id, title, slug, published_atPolicies
A policy is a named bundle of permissions that can be assigned to any number of roles or users. Instead of configuring permissions per-role, you define them once in a policy and reuse that policy wherever it applies.
Each policy also carries three top-level flags:
- Admin access — bypasses all permission checks entirely
- App access — allows the user to log in to the DaaS Studio
- Delegate access — allows a service account to act on behalf of another user via the
X-On-Behalf-Ofrequest header
Policies can additionally grant module access keys — named app capabilities (e.g. system:logs to view the Logs page) configured on the policy’s Module-Level Access tab. A user’s module access is the OR-merge of the keys across all their policies. See Roles & Policies.
When a user has multiple policies (through multiple roles, or ones attached directly), their effective access is the additive union of all applicable policies:
- Field access is merged — if Policy A exposes
titleand Policy B exposesbody, the user sees both. - Item filters are combined with
OR— a user matching either policy’s row condition can access those rows.
Policies only expand access — they can never revoke access granted by another policy. Design each policy around the minimum access it needs, then layer policies up to build more permissive roles.
Roles
A role is an organisational group (e.g., viewer, editor, moderator). Roles hold one or more policies and can be assigned to any number of users. Users can belong to multiple roles simultaneously — their effective permissions are the union of all policies across all their roles.
Two roles are seeded by default:
| Role | Linked policy | Behaviour |
|---|---|---|
| Administrator | Admin Policy (admin_access = true) | Full system access — bypasses all permission checks. |
| User | User Policy (admin_access = false) | Standard user access — subject to all permission rules. |
You can create additional roles and attach any combination of policies to them.
Public access applies to every authenticated user regardless of role. It is represented by policy entries in daas_access with no role and no user set. Any policy linked this way grants its permissions to all logged-in users as a default layer. Unauthenticated access is not supported — every data API route requires authentication. On the Buildpad Engine, the one exception is a file: a request with no session can read a file that the public policy grants, from the tenant that its X-Tenant-Id header names. All access is off by default — opt-in only.