Data API

The auto-generated REST API, keys, securing tables, RPC and generated types.

7 pages · start with The Data API (REST)

  1. 01The Data API (REST)How the auto-generated REST API works on SupaHost: project URLs, PostgREST, request headers, supabase-js and curl examples, row limits, the schema cache and capacity.
  2. 02API keysThe anon and service_role keys on SupaHost: where to find them, what each one can do, how they're sent with requests, how user tokens fit in, and what isn't supported (new key formats, rotation).
  3. 03Securing your APILock down a SupaHost project's Data API with schemas, grants and Row Level Security, control function access, and understand the apikey check and the 1000-row limit.
  4. 04Querying and filtering dataRead, filter, sort, paginate, join, insert, update, upsert and delete rows through the SupaHost Data API with supabase-js, with the equivalent REST calls and the 1000-row limit.
  5. 05Calling database functions (RPC)Call Postgres functions through the SupaHost Data API with supabase.rpc() or plain HTTP: arguments, return types, filtering results, GET vs POST, errors and access control.
  6. 06Generating TypeScript typesGenerate TypeScript types for a SupaHost project's database with the MCP server or the Supabase CLI over an SSH tunnel, and use them with supabase-js for typed queries.
  7. 07Exposed schemasWhich Postgres schemas the SupaHost Data API serves (public, storage, graphql_public, pgmq_public), why the list is fixed, how to query them, and how to work with data in other schemas.