Databases

The Data API

Learn about The Data API in WaymakerOS.

RESTHTTPAuth

The Data API turns your database into a REST API automatically — reach your tables over HTTP, from a front-end or another service, with no server code to write. It's served from your own Waymaker address, and it respects who's signed in.

It's off by default. Turn it on from the Data API tab of the database workspace.

What it gives you

Once enabled, your tables are available as REST endpoints — list rows, filter them, read a single record — over standard HTTP. A browser app or an external system can read and write data directly, without you building and hosting an API layer yourself.

The endpoint lives on your own Waymaker domain, so what your callers see is your app's address, not a third-party service.

Sign-in comes first

The Data API is built to be exposed to real users, so it's secured by your app's own sign-in:

  1. Turn on end-user sign-in for the app first — the Auth tab, or see Site Auth. The Data API needs it.

  2. Callers include the signed-in user's token on each request:

    Authorization: Bearer <the user's token>
    
  3. Access rules apply per user, automatically. Because the Data API checks the same sign-in tokens your app issues, each request is scoped to the person making it — a signed-in user sees exactly the rows your access rules allow them, and no more. You define those rules once; the Data API enforces them on every call.

When to use it

Use the Data API when…Use in-code access when…
A browser front-end or outside service needs to read/write data directlyYour app's own server code, an Ambassador, or an Agent is doing the work
You want REST endpoints without writing an API layerYou're already running code with ctx available
Access should be scoped to the signed-in end-userYou control access in your own code

The two work together — many apps use in-code access (@waymakeros/db) for their backend logic and the Data API for their front-end to read data directly.

Next Steps