Schema Editor
The Developer Portal provides multiple ways to design your API schema: form-based editors for collections, views, and queries, plus a JSON editor for advanced users.
Collections Editor
Creating a Collection
- Go to Collections
- Click Create Collection
- Enter a name
- Add properties
Managing Properties
Each property has:
| Setting | Description |
|---|---|
| Name | Property identifier (camelCase recommended) |
| Type | Data type (string, integer, decimal, boolean, date, etc.) |
| Required | Whether the property must have a value |
| Unique | Whether values must be unique across records |
| Default Value | Value applied when property is not provided |
| Description | Optional documentation |
Default Values
Set default values that are automatically applied when creating items:
Static values:
- String:
"pending","active" - Number:
42,19.99 - Boolean:
true,false
Expression-based values:
- Date/time:
now(),now() + 7D,now() - 1H - GUID:
newId()(generates unique ID per item) - Numeric:
10 + 5,Floor(18.97)
Time units for date expressions: D (days), H (hours), M (minutes), S (seconds)
Lookup defaults: Select a specific item to use as the default parent reference.
Property Types
| Type | Description |
|---|---|
string | Text up to 1024 characters |
integer | Whole numbers |
decimal | Decimal numbers |
boolean | True/false values |
date | Date only |
date-time | Date and time (UTC) |
guid | Unique identifier |
object | Flexible JSON structure |
blob | Binary files |
| Collection name | Lookup to another collection |
Creating Lookups
To create a relationship between collections:
- Add a property
- Set the type to the target collection name
- Configure the display property (shown when the lookup is expanded)
Access Settings
Configure who can perform operations on each collection:
- Go to the collection's Access tab
- For each method (GET, POST, PUT, PATCH, DELETE, LISTEN), select allowed roles
- Save changes
Views Editor
Creating a View
From the Views section:
- Go to Views
- Click Create View
- Select the base collection
- Configure filters and properties
From a Collection: You can also create a view directly from a collection:
- Open the collection you want to create a view for
- Click Create View (only available when no unsaved changes exist)
- The new view is automatically linked to that collection
View Configuration
| Setting | Description |
|---|---|
| Base Collection | The collection this view filters |
| Filter | Conditions that records must match |
| Properties | Which properties to include |
| Access | Role-based permissions (independent from collection) |
Filter Builder
Build filters visually:
- Click Add Condition
- Select a property
- Choose an operator (equals, contains, greater than, etc.)
- Enter a value
- Combine with AND/OR logic
Special functions:
userId()— Current user's ID (for user-specific views)
Dynamic expressions with exp():
Use exp() in filter values for date calculations. The expression must be wrapped in single or double quotes:
exp('now()')— Current date-timeexp('now() - 7D')— 7 days agoexp('now() + 30D')— 30 days from now
Date/time tokens: now(), D (days), H (hours), M (minutes), S (seconds). Tokens are case-insensitive.
Queries Editor
Creating a Query
- Go to Queries
- Click Create Query
- Select collections to join
- Configure properties and aggregations
Query Configuration
| Setting | Description |
|---|---|
| Collections | Up to 11 collections to join |
| Join Type | Forward (FROM) or reverse (TO) |
| Properties | Fields to include with aliases |
| Behaviour | None, SUM, AVG, MIN, MAX, COUNT, or FILTER |
| Access | Role-based permissions |
Joins
- Forward (FROM) — Follow a lookup property to the related collection
- Reverse (TO) — Find records that reference the current collection
Property Aliasing
Since joined collections may have properties with the same name, you must provide unique aliases:
customers.name → customerName
orders.name → orderName
Data Model Visualization
View your schema as an interactive diagram:
- Go to Data Model
- Explore collections, views, and queries visually
- See relationships as connecting lines
Navigation
- Zoom — Mouse wheel or buttons
- Pan — Click and drag
- Click nodes — View details
- Drag nodes — Reposition
Display Options
Toggle visibility of:
- Views
- Queries
- System fields (id, created, modified)
Layouts
Save custom layouts for different purposes:
- Arrange nodes as desired
- Click Save Layout
- Enter a name
- Load saved layouts anytime
JSON Definition
Edit your schema directly as JSON for advanced operations.
Opening the Editor
- Go to JSON Definition
- View your complete schema as JSON
Editor Features
- Syntax highlighting
- Line numbers
- Code folding
- Auto-completion for property names and types
- Real-time validation
- Error messages
Schema Structure
{
"collections": [
{
"name": "products",
"properties": [
{ "name": "sku", "typeName": "string", "isRequired": true },
{ "name": "name", "typeName": "string" },
{ "name": "price", "typeName": "decimal" },
{ "name": "category", "typeName": "categories" }
]
}
]
}
Use Cases
- Bulk renaming properties
- Copying schema between APIs
- Version control (export for git)
- Complex edits faster than UI
- Learning schema structure
Saving Changes
- Edit the JSON
- Validation runs automatically
- Fix any errors shown
- Click Save
Invalid JSON cannot be saved. Fix all errors before saving.
AI Schema Generation
AI schema generation is available only when creating a new API — see Create with AI. Once your API exists, all schema changes are made here in the schema editor or via the JSON definition.