While our apps will have these fetch calls written in javascript, we can start experimenting with data queries using postman or any other api endpoint testing tool.
Note that you can use any filtering techniques that SQL has to offer
RLS (Row Level Security) is the approach that supabase uses to protect tables. Even when RLS is disabled, you still need a secure token in order to query data.
Find these in the Project Settings / API tab
- The public anon api key
- The project endpoint
- In the API Docs Tab, find code snippits in Javascript and Bash (the bash ones contain endpoints that you can use)
- your queries would look something like (this one selects all the blog titles):
https://qutbudvmcbuqapdgtegd.supabase.co/rest/v1/blog?select=title
- in the headers field, add the key
apikey
and then add the public anon key from settings to the value field - Note: later when you have more authentication steps involved such as user auth, you'll need to also have a Bearer token.
- Fetch all columns from a table
- Fetch only a few columns from a table
- Filter the columns with WHERE in your query