diff --git a/apps/docs/pages/guides/api/api-keys.mdx b/apps/docs/pages/guides/api/api-keys.mdx index 4dd674d5b1d..6d99558c6a1 100644 --- a/apps/docs/pages/guides/api/api-keys.mdx +++ b/apps/docs/pages/guides/api/api-keys.mdx @@ -3,12 +3,12 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'api-keys', title: 'Understanding API Keys', - description: 'Securing your Serverless API with Postgres Row Level Security.', + description: 'Securing your Data API with Postgres Row Level Security.', } Supabase provides two default keys when you create a project: an `anon` key, and a `service_role` key. You can find both keys in the [API Settings](https://supabase.com/dashboard/project/_/settings/api). -The Serverless APIs are designed to work with Postgres Row Level Security (RLS). These keys both map to Postgres roles. You can find an `anon` user and a `service_role` user in the [Roles](http://supabase.com/dashboard/project/_/database/roles) section of the dashboard. +The data APIs are designed to work with Postgres Row Level Security (RLS). These keys both map to Postgres roles. You can find an `anon` user and a `service_role` user in the [Roles](http://supabase.com/dashboard/project/_/database/roles) section of the dashboard. The keys are both long-lived JWTs. If you decode these keys, you will see that they contain the "role", an "issued date", and an "expiry date" ~10 years in the future. diff --git a/apps/docs/pages/guides/api/joins-and-nesting.mdx b/apps/docs/pages/guides/api/joins-and-nesting.mdx index f8ce890deb2..0eeb9f961eb 100644 --- a/apps/docs/pages/guides/api/joins-and-nesting.mdx +++ b/apps/docs/pages/guides/api/joins-and-nesting.mdx @@ -3,10 +3,10 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'joins-and-nested-tables', title: 'Querying Joins and Nested tables', - description: 'The Serverless APIs automatically detect relationships between Postgres tables.', + description: 'The Data APIs automatically detect relationships between Postgres tables.', } -The Serverless APIs automatically detect relationships between Postgres tables. Since Postgres is a relational database, this is a very common scenario. +The data APIs automatically detect relationships between Postgres tables. Since Postgres is a relational database, this is a very common scenario. ## One-to-many joins @@ -176,7 +176,7 @@ GET https://[REF].supabase.co/rest/v1/countries?select=id,name,cities(id,name) ## Many-to-many joins -The Serverless APIs will detect many-to-many joins. For example, if you have a database which stored teams of users (where each user could belong to many teams): +The data APIs will detect many-to-many joins. For example, if you have a database which stored teams of users (where each user could belong to many teams): ```sql create table users ( diff --git a/apps/docs/pages/guides/api/securing-your-api.mdx b/apps/docs/pages/guides/api/securing-your-api.mdx index 95009ca66cf..df3354c715a 100644 --- a/apps/docs/pages/guides/api/securing-your-api.mdx +++ b/apps/docs/pages/guides/api/securing-your-api.mdx @@ -3,10 +3,10 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'securing-your-api', title: 'Securing your API', - description: 'Securing your Serverless API with Postgres Row Level Security.', + description: 'Securing your Data API with Postgres Row Level Security.', } -The Serverless APIs are designed to work with Postgres Row Level Security (RLS). If you use [Supabase Auth](/docs/guides/auth), you can restrict data based on the logged-in user. +The data APIs are designed to work with Postgres Row Level Security (RLS). If you use [Supabase Auth](/docs/guides/auth), you can restrict data based on the logged-in user. To control access to your data, you can use [Policies](/docs/guides/auth#policies). ## Enabling Row Level Security diff --git a/apps/docs/pages/guides/api/using-custom-schemas.mdx b/apps/docs/pages/guides/api/using-custom-schemas.mdx index c52ef67e29e..94b69a3fa11 100644 --- a/apps/docs/pages/guides/api/using-custom-schemas.mdx +++ b/apps/docs/pages/guides/api/using-custom-schemas.mdx @@ -3,10 +3,10 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'using-custom-schemas', title: 'Using Custom Schemas', - description: 'You need additional steps to use custom database schemas with Serverless APIs.', + description: 'You need additional steps to use custom database schemas with data APIs.', } -By default, your database has a `public` schema which is automatically exposed on Serverless APIs. You can also expose custom database schemas - to do so you need to follow these steps: +By default, your database has a `public` schema which is automatically exposed on data APIs. You can also expose custom database schemas - to do so you need to follow these steps: 1. Go to [API settings](https://supabase.com/dashboard/project/_/settings/api) and add your custom schema to "Exposed schemas". 2. Run the following SQL, substituting `myschema` with your schema name: @@ -21,7 +21,7 @@ ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA myschema GRANT ALL ON ROUTI ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA myschema GRANT ALL ON SEQUENCES TO anon, authenticated, service_role; ``` -Now you can access these schemas from Serverless APIs: +Now you can access these schemas from data APIs: