← All open source projects

PostgREST

PostgREST/postgrest

PostgREST is a server that turns an existing PostgreSQL database into a REST API.

Forks 1,212
Author PostgREST
Language Haskell
License MIT
Synced 2026-06-27

What It Is

PostgREST is a server that creates a full REST API from an existing PostgreSQL database. It is useful when the database schema already describes the data model.

The project offers a different view of backend work: instead of writing handlers for every table, teams design PostgreSQL schemas, permissions, views, and functions.

What Is Inside

PostgREST is written in Haskell and uses a fast HTTP stack. Its documentation emphasizes performance, security, versioning, and API self-documentation.

The key principle is leaning on PostgreSQL. Constraints, foreign keys, roles, and views become part of the public data model, not just internal implementation.

How People Use It

PostgREST is often placed in front of a database when a team needs a fast API for an admin panel, internal service, prototype, or product where logic is already well expressed in SQL.

Roles and access policies must be designed carefully. The tool removes some server code, but it does not remove security design.

Example

The example shows the basic launch path: PostgREST reads a configuration file and serves an HTTP API over the configured database.

Starting The API Server

The command shows basic startup with a configuration file describing PostgreSQL connection and roles.

Language: Bash
postgrest postgrest.conf

Strengths And Limits

PostgREST’s strength is directness. A well-designed PostgreSQL schema can become an API without a bulky intermediate layer.

The limit is the boundary of the approach. If business logic does not fit SQL, has complex side effects, or spans several external systems, an additional server layer is needed.

Project Context

PostgREST is maintained in the PostgREST/postgrest repository; its public project history starts on 2014-06-13. GitHub reports the primary language as Haskell, and the license as MIT. The project also has a dedicated site: https://postgrest.org.

For a catalog page, this context matters because the reader sees a real project with an owner, license, technical base, and public change history rather than an abstract name.