Collections & Field Types
Every Collection in Microbase maps directly to a real PostgreSQL table (or VIEW), giving you full SQL compatibility alongside auto-generated REST endpoints.
Collection Types
Section titled “Collection Types”| Type | Description |
|---|---|
| Base | Standard PostgreSQL table with id, created_at, updated_at, and custom fields. |
| Auth | User authentication table with email, password_hash, verified, token_key, and built-in auth endpoints (e.g. users). |
| View | Read-only PostgreSQL VIEW defined by a SQL SELECT query. |
Supported Field Types (17)
Section titled “Supported Field Types (17)”| Category | Types |
|---|---|
| Text & Rich Content | text, editor, email, url, password |
| Numbers & IDs | number, int, uuid |
| Logic & Selection | bool, select (single/multi) |
| Dates | date, autodate |
| Structured & Spatial | json, geoPoint |
| Relations & Media | relation, file (single/multi with thumbnails) |
| AI / Embeddings | vector (pgvector column with configurable dimensions) |
Creating a Collection via API
Section titled “Creating a Collection via API”curl -X POST http://localhost:3000/api/collections \ -H "Authorization: Bearer <SUPERUSER_JWT>" \ -H "Content-Type: application/json" \ -d '{ "name": "posts", "type": "base", "fields": [ { "name": "title", "type": "text", "required": true }, { "name": "published", "type": "bool" }, { "name": "author", "type": "relation", "collection": "users" } ], "list_rule": "", "view_rule": "" }'