Skip to main content

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​

  1. Go to Collections
  2. Click Create Collection
  3. Enter a name
  4. Add properties

Managing Properties​

Each property has:

SettingDescription
NameProperty identifier (camelCase recommended)
TypeData type (string, integer, decimal, boolean, date, etc.)
RequiredWhether the property must have a value
UniqueWhether values must be unique across records
Default ValueValue applied when property is not provided
DescriptionOptional 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​

TypeDescription
stringText up to 1024 characters
integerWhole numbers
decimalDecimal numbers
booleanTrue/false values
dateDate only
date-timeDate and time (UTC)
guidUnique identifier
objectFlexible JSON structure
blobBinary files
Collection nameLookup to another collection

Creating Lookups​

To create a relationship between collections:

  1. Add a property
  2. Set the type to the target collection name
  3. Configure the display property (shown when the lookup is expanded)

Access Settings​

Configure who can perform operations on each collection:

  1. Go to the collection's Access tab
  2. For each method (GET, POST, PUT, PATCH, DELETE, LISTEN), select allowed roles
  3. Save changes

Views Editor​

Creating a View​

From the Views section:

  1. Go to Views
  2. Click Create View
  3. Select the base collection
  4. Configure filters and properties

From a Collection: You can also create a view directly from a collection:

  1. Open the collection you want to create a view for
  2. Click Create View (only available when no unsaved changes exist)
  3. The new view is automatically linked to that collection

View Configuration​

SettingDescription
Base CollectionThe collection this view filters
FilterConditions that records must match
PropertiesWhich properties to include
AccessRole-based permissions (independent from collection)

Filter Builder​

Build filters visually:

  1. Click Add Condition
  2. Select a property
  3. Choose an operator (equals, contains, greater than, etc.)
  4. Enter a value
  5. 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-time
  • exp('now() - 7D') — 7 days ago
  • exp('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​

  1. Go to Queries
  2. Click Create Query
  3. Select collections to join
  4. Configure properties and aggregations

Query Configuration​

SettingDescription
CollectionsUp to 11 collections to join
Join TypeForward (FROM) or reverse (TO)
PropertiesFields to include with aliases
BehaviourNone, SUM, AVG, MIN, MAX, COUNT, or FILTER
AccessRole-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:

  1. Go to Data Model
  2. Explore collections, views, and queries visually
  3. See relationships as connecting lines
  • 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:

  1. Arrange nodes as desired
  2. Click Save Layout
  3. Enter a name
  4. Load saved layouts anytime

JSON Definition​

Edit your schema directly as JSON for advanced operations.

Opening the Editor​

  1. Go to JSON Definition
  2. 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​

  1. Edit the JSON
  2. Validation runs automatically
  3. Fix any errors shown
  4. Click Save
warning

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.