Actions are the functions of your backend. They accept typed parameters, execute logic, modify the database, and return data.Documentation Index
Fetch the complete documentation index at: https://docs.withsutro.com/llms.txt
Use this file to discover all available pages before exploring further.
Defining an action
Actions have a signature defining inputs and the return type.Data access
SLang provides high-level keywords for querying data.Fetching a single record (single)
Use single when you expect exactly one result (e.g., looking up by ID). It throws an error (404 in HTTP context) if the record is not found.
Fetching lists (pageOf)
Use pageOf to retrieve a Page<Model> value matching a condition. A page is an object with items, total, and offset; use page.items when you need the underlying array.
Modifying data
Creating records
Updating records
Control flow
Loops
Iterate over theitems array on a page returned by pageOf.