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
    Setting up

    Get the written rows back

    Send this header with a write to receive the rows as they were stored.

    Prefer: return=representation

    A write answers with no body by default. With this header it answers the rows it wrote, read back with the request's select, so you can embed relations in the answer of a write.

    Writes are off until the server turns them on for a resource. In this page, tags can be created, and a todo's name, status and owner can be changed.

    Examples

    Create a tag and see it.
    POST /tags?select=id,name
    Prefer: return=representation
    
    { "id": 4, "name": "later" }

    Asking the database...

    Hand a todo to Ada and read the new owner in the same answer.
    PATCH /todos/2?select=name,owner(name)
    Prefer: return=representation
    
    { "owner_id": 1 }

    Asking the database...

    The database in this page is yours: writes stay until you load the page again.

    See alsoOne row by its key
    PreviousWrites and proceduresNext Node, Fastify, Express
    restloom - a REST API generated from your database catalog
    DocumentationDownloadSource