Requirements
- PostgreSQL database set up with track_commit_timestamp option enabled
Enabling track_commit_timestamp on PostgreSQL
To ensure data consistency and synchronization between your application and Permify, enable track_commit_timestamp on your PostgreSQL server. This can be done by executing the following options in your PostgreSQL:Option 1: SQL Command
- Open your PostgreSQL command line interface.
-
Execute the following command:
-
Reload the configuration with the following command:
Option 2: Editing postgresql.conf
-
Find and open the postgresql.conf file in a text editor. Its location depends on your PostgreSQL installation. Common
locations are:
- Debian-based systems: /etc/postgresql/[version]/main/postgresql.conf
- Red Hat-based systems: /var/lib/pgsql/data/postgresql.conf
-
Add or modify the following line in the postgresql.conf file:
- Save and close the postgresql.conf file.
-
Reload the PostgreSQL configuration for the changes to take effect. This can be done via the PostgreSQL console:
Or if you have command line access, use:
Important Configuration Requirement: To use the Watch API, it must be enabled in your configuration file. Add or modify the following lines:
Path Parameters
Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.
Body
application/json
WatchRequest is the request message for the Watch RPC. It contains the details needed to establish a watch stream.
Response
A successful response.(streaming responses)
The response is of type object
.