Skip to main content

Schema Editor

The Developer Portal provides multiple ways to design your API schema: visual 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
DescriptionOptional documentation

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

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

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)

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, updated)

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 Assistant

Generate schema from natural language descriptions.

Getting Started

  1. Go to AI Assistant
  2. Choose:
    • Use Existing Schema — Modify current schema
    • Create New Schema — Start fresh

Writing Prompts

Describe what you need:

Create a blog with posts, comments, and authors.
Each post has one author.
Posts should have title, content, publishedDate, and isPublished.
Comments belong to posts and have text and authorName.

Iterating

Continue the conversation to refine:

Add a categories collection and link it to posts.
Make the email property required and unique on authors.

Publishing

  1. Review the generated schema in Graphic or Source view
  2. Select the version you want
  3. Click Publish
  4. Confirm
warning

Publishing replaces your entire API schema. Review carefully.

Limitations

AI Assistant generates:

  • Collections and properties
  • Lookup relationships
  • Data types

It does not configure:

  • Access control rules
  • Views or queries
  • Advanced validation