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
    Reference

    Cheat sheet

    Every word of the query language on one page, and a box to try them in.

    Every example in the docs reads and writes this small to-do app: three people, four todos, their steps and their tags.

    owner / todostodo / stepstags / todosthrough todo_tagsmanager / usersusersidnameemailpassword_hash hiddenlimitmanager_idtodosidnamestatusowner_idestimatepinnedcreated_atstepsidtitletodo_idprioritydue_ontagsidname

    Type a request below and send it. The database lives in this page, so nothing you do here reaches a server.

    a to-do database, running in this page

    Type a request.

    Reading

    selectList the columns you want, in the order you want them.select=col,col
    /{key}Add the primary key to the path to read a single row as an object./todos/1
    relation(...)Put a relation's name in select, with the columns you want from it in parentheses.select=name,owner(name)
    orderSort by one or more columns, ascending or descending.order=name
    limit, offsetTake limit rows, after skipping offset of them.limit=2
    relation.order, .limit, .offsetPrefix order, limit or offset with a relation's name to apply it inside the embed.steps.order=priority.desc
    countAsk for count=exact to get the total number of matching rows in the Content-Range header.count=exact
    count(), sum(), avg(), min(), max()Put aggregates in select; the plain columns beside them become the groups.select=count()
    "name"Wrap a column name in double quotes so it can never be read as a keyword."limit"=gte.2

    Filtering

    eq, neqKeep the rows whose column equals, or differs from, a value.status=eq.open
    gt, gte, lt, lteCompare numbers, text, dates and times.estimate=gt.2
    inKeep the rows whose column takes one of the listed values.id=in.(1,3)
    like, ilikeKeep the text that matches a pattern, where * stands for any text.name=like.*rent
    match, imatchPostgreSQL, MySQL onlyKeep the text that matches a regular expression; imatch ignores case.name=match.^f
    isTest for null, for a boolean value, or for a relation with no rows.owner_id=is.null
    ov, cs, cdPostgreSQL onlyCompare an array column with a list: overlaps, contains, contained by.labels=ov.{a,b}
    notPut not. before any operator to keep the rows it would have left out.status=not.eq.done
    relation.columnName a related column with a dot to filter on what a row is linked to.owner.name=eq.Ada
    or, andGroup terms in or=(...) to keep rows matching any of them.or=(status.eq.done,owner.name.eq.Linus)

    Writing

    Prefer: return=representationSend this header with a write to receive the rows as they were stored.Prefer: return=representation
    PreviousAdding a databaseNext Errors
    restloom - a REST API generated from your database catalog
    DocumentationDownloadSource