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
    Reading

    Sort and page what is embedded

    Prefix order, limit or offset with a relation's name to apply it inside the embed.

    steps.order=priority.descsteps.limit=1

    An embedded array is sorted by the related key unless you say otherwise, and holds at most 1000 rows without a limit. steps.order, steps.limit and steps.offset act on the steps inside each todo, not on the list of todos.

    The relation must be embedded in select, or the request answers not_embedded.

    Examples

    Each todo with its most important step only.
    /todos?select=name,steps(title,priority)&steps.order=priority.desc&steps.limit=1

    Asking the database...

    Paging a relation that is not embedded.
    /todos?select=name&steps.limit=1

    Asking the database...

    See alsoBring related rows along Sort the rows Read a page
    PreviousRead a pageNext Know how many there are
    restloom - a REST API generated from your database catalog
    DocumentationDownloadSource