This documentation requires that you have completed Step 3: Set PostgreSQL gateway as sink.
Step 1: Manage tables in PostgreSQL gateway APIs
Create a table
Open Postman
Sign in to Postman. You can also use the web version of Postman if you haven’t downloaded the tool.
Configure POST request
Select the request type as POST and enter your request URL -
https://{cluster}.cognitedata.com/api/v1/projects/{project}/postgresgateway/tables/{username}. See Setting up PostgreSQL gateway for more information.Where:
clusteris where your CDF instance exists. If you don’t know the cluster name, contact Cognite support.projectis the organization name of your CDF instance.usernamewith the username credentials
Set authorization
On the Authorization tab, select OAuth 2.0 as the type of Authorization. To get your access token, see setting up PostgreSQL gateway.
Configure request body
The Body tab allows you to specify the data you need to send with a request for every POST request. Inside the Body tab, select raw as the data model and select JSON from the dropdown as the data format and enter the below JSON:
tablename cannot be any of these built-in table names:assets, double_datapoints, events, extraction_pipeline_runs, extraction_pipelines, files, labels, raw_rows, raw_tables, relationships, sequence_rows, sequences, string_datapoints, time_series, data_models, views, containers, units, unit_systemsList tables
Configure GET request
Select the request type as GET and enter your request URL as
https://{cluster}.cognitedata.com/api/v1/projects/{project}/postgresgateway/tables/{username}Delete a table
Configure POST request
Select the request type as POST and enter your request URL as
https://{cluster}.cognitedata.com/api/v1/projects/{project}/postgresgateway/tables/{username}/deleteConfigure request body
Inside the Body tab, select raw as the data model and select JSON as the data format.Enter this JSON:


