Alpha (platform kernel). Suitable for demos and custom modules. Not for production or regulated workloads.
Core DevAlpha

Creating APIs

Three ways to expose behaviour to clients and the workspace UI.

Use path-based POST /api/rpc/ for external CRUD and integrations: authenticate with auth.login, then call {model}/{method} with an API key. Full quick start, headers, and every public method are documented in the RPC API reference. For UI-created keys and header forms, see API keys. RPC enforces the same ACLs and record rules as the web UI.

2. Custom HTTP routes

Register addon routes from init() using sumeru/core/server/router:

Auth modeUse when
AuthNonePublic endpoints (careful)
AuthSessionBrowser or cookie client
AuthAPIKeyMachine clients

How-to: Custom HTTP route.

CSRF: Web POST handlers that mutate state require a CSRF token (core/server/web/csrf.go). API-key and GET routes follow different rules.

3. Object actions (workspace buttons)

Register handlers for toolbar buttons on forms and lists:

go
go
orm.RegisterObjectAction("crm.lead", "action_set_won", func(ctx context.Context, ids []int64) error {
    // ...
    return nil
})

Wire the button in XML with type="object" and name="action_set_won". Used heavily in CRM and Accounting modules.

Choosing an approach

NeedUse
External system CRUDRPC API + API key
Printable report or file downloadCustom HTTP route
User clicks button on a recordObject action
React to another module's data changeEvent bus subscription

See also