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
    Filtering

    Filter through a relation

    Name a related column with a dot to filter on what a row is linked to.

    owner.name=eq.Adatags.name=eq.homesteps.priority=gte.4

    Through a to-one relation, the related row must match: owner.name=eq.Ada keeps Ada's todos.

    Through a to-many or many-to-many relation, at least one related row must match: tags.name=eq.home keeps the todos with a home tag among their tags.

    The filter does not change what is embedded. Select the relation to see it.

    Examples

    Ada's todos.
    /todos?select=name&owner.name=eq.Ada

    Asking the database...

    Todos tagged home, with all their tags shown.
    /todos?select=name,tags(name)&tags.name=eq.home

    Asking the database...

    Both must hold: tagged home and owned by Grace.
    /todos?select=name&tags.name=eq.home&owner.name=eq.Grace

    Asking the database...

    See alsoBring related rows along Null, true, false, empty Turn a filter around
    PreviousTurn a filter aroundNext Either-or
    restloom - a REST API generated from your database catalog
    DocumentationDownloadSource