Skip to main content

Custom API Overview

Custom API lets you define your own HTTP endpoints using YAML. Each definition describes exactly one endpoint — its URL, method, permissions, logic, and database connection.

Unlike Auto API which generates standard CRUD routes from your schema, Custom API gives you full control:

  • Write raw SQL queries
  • Transform data with Starlark or Expr
  • Chain multiple steps — query → transform → insert → return
  • Cache results, version your endpoints, and roll back on failure

When to Use Custom API

SituationUse
Simple CRUD on a tableAuto API
JOIN across multiple tablesCustom API
Data transformation before returningCustom API
Insert + select in one requestCustom API
Aggregations, computed fieldsCustom API
Business logic in the API layerCustom API

How It Works

You write a YAML definition and POST it to Minimal. Minimal registers the endpoint immediately — no restart, no redeploy.

Your YAML definition

POST {yourdomain}/minimal/rest/definition/v1

Minimal registers the endpoint

Endpoint is live at {yourdomain}/{org_abbreviation}/{project_abbreviation}/{uri}

Any REST client works — curl, Postman, Bruno, or your backend service.

Endpoint URL Pattern

The live URL for your endpoint combines your org abbreviation, project abbreviation, and the uri from your definition:

{yourdomain}/{org_abbreviation}/{project_abbreviation}/{uri}

For example, with org abbreviation lbl, project abbreviation crm, and uri: users/all:

GET https://your-domain.com/lbl/crm/users/all

The org and project abbreviations are set when you create your organization and project. The uri field in your definition is the final path segment only — do not include the org or project prefix in it.