REST from your database catalog
    DocumentationCheat sheetQuestionsDownloadSource
    Questions
    • How do I...?
    Start here
    • Getting started
    • What a table becomes
    • Compared with PostgREST
    Setting up
    • Tables, columns and relations
    • Security and hooks
    • Writes and procedures
    • Prefer: return=representation
    • Node, Fastify, Express
    Reading
    • select
    • /{key}
    • relation(...)
    • order
    • limit, offset
    • relation.order, .limit
    • count
    • count(), sum(), avg()...
    • "name"
    Filtering
    • eq, neq
    • gt, gte, lt, lte
    • in
    • like, ilike
    • match, imatch
    • is
    • ov, cs, cd
    • not
    • relation.column
    • or, and
    Databases
    • Supported databases
    • Adding a database
    Reference
    • Cheat sheet
    • Errors

    Documentation

    Start with the guide, look a word up in the grammar, or find your question among the answers. The examples are answered by a small to-do database that lives in your browser.

    Start readingGrammar cheat sheetQuestions and answers

    Start here

    Getting startedInstall the core and a database package, serve a schema, curl it.What a table becomesEvery endpoint restloom serves for a table, and the options that turn each one on.Compared with PostgRESTWhat reads the same, what differs, and why restloom runs inside your backend.

    Setting up

    Tables, columns and relationsWhat becomes a resource, which columns are hidden, and how relations are named.Security and hooksWho may ask, row security, tenants, and the limits on every request.Writes and proceduresCreating, updating and deleting rows, in bulk too, and calling database functions.Get the written rows backSend this header with a write to receive the rows as they were stored.Node, Fastify, ExpressServing restloom from plain Node or a framework, or calling it from your own code.

    Reading

    Choose the columnsList the columns you want, in the order you want them.One row by its keyAdd the primary key to the path to read a single row as an object.Bring related rows alongPut a relation's name in select, with the columns you want from it in parentheses.Sort the rowsSort by one or more columns, ascending or descending.Read a pageTake limit rows, after skipping offset of them.Sort and page what is embeddedPrefix order, limit or offset with a relation's name to apply it inside the embed.Know how many there areAsk for count=exact to get the total number of matching rows in the Content-Range header.Totals per groupPut aggregates in select; the plain columns beside them become the groups.Names that are keywordsWrap a column name in double quotes so it can never be read as a keyword.

    Filtering

    Equal, not equalKeep the rows whose column equals, or differs from, a value.Greater or less thanCompare numbers, text, dates and times.One of a listKeep the rows whose column takes one of the listed values.Match a patternKeep the text that matches a pattern, where * stands for any text.Match a regular expressionKeep the text that matches a regular expression; imatch ignores case.Null, true, false, emptyTest for null, for a boolean value, or for a relation with no rows.Array overlap and containmentCompare an array column with a list: overlaps, contains, contained by.Turn a filter aroundPut not. before any operator to keep the rows it would have left out.Filter through a relationName a related column with a dot to filter on what a row is linked to.Either-orGroup terms in or=(...) to keep rows matching any of them.

    Databases

    Supported databasesWhat each database package supports and where they differ.Adding a databaseIntrospection, the SQL renderer, transactions and errors for a new database.

    Reference

    Cheat sheetEvery word of the query language on one page, and a box to try them in.ErrorsEvery error code, its status, and what to change.
    restloom - a REST API generated from your database catalog
    DocumentationDownloadSource