PostgREST API Setup #2913
-
Everyone, I am new to API setup but well experienced with database. I am trying got setup API service using PostgREST on our PostgreSQL Database Server. This service will help user access the PostgREST service to make API calls to the PostgreSQL Database. I understand that we need to setup anonymous database account for users not having any database account setup or using the service as guest. Also, that we will need a database account for PostgREST service to start and keep the service running. My question is that - If I want the user to use their database accounts to access the PostgreSQL database, then how shall i go about setting this up in PostgREST and/or PostgreSQL. This is to make user accessing the database can only access what they are setup for in the Database Roles/Groups. Any help is greatly appreciated. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@mchatrvd Thanks for reaching out! Detailed documentation on PostgREST API and setup is available on our website here. |
Beta Was this translation helpful? Give feedback.
Hi, I'm assuming you're using a single PostgREST instance for one database and manage your users with roles using JWT as specified in the docs. Then:
GRANT role TO authenticator;
for each role.jwt-secret
configuration parameter.db-uri
, which we refer as "authenticator". This authenticator (suggested to have…