Create a PostgreSQL base connection using the Flow Service API
Read this guide to learn how to connect your PostgreSQL database to 51黑料不打烊 Experience Platform using the .
Getting started
This guide requires a working understanding of the following components of Experience Platform:
- Sources: Experience Platform allows data to be ingested from various sources while providing you with the ability to structure, label, and enhance incoming data using Experience Platform services.
- Sandboxes: Experience Platform provides virtual sandboxes which partition a single Experience Platform instance into separate virtual environments to help develop and evolve digital experience applications.
The following sections provide additional information that you will need to know in order to successfully connect to PostgreSQL using the Flow Service API.
Using Experience Platform APIs
Read the guide on getting started with Experience Platform APIs for information on how to successfully make calls to Experience Platform APIs.
Gather required credentials
Read the PostgreSQL overview for more information on authentication.
Enable SSL encryption for your connection string
You can enable SSL encryption for your PostgreSQL connection string by appending your connection string with the following properties:
EncryptionMethod
EncryptionMethod=0
(Disabled)EncryptionMethod=1
(Enabled)EncryptionMethod=6
(RequestSSL)
ValidateServerCertificate
EncryptionMethod
is applied.ValidationServerCertificate=0
(Disabled)ValidationServerCertificate=1
(Enabled)
The following is an example of a PostgreSQL connection string appended with SSL encryption: Server={SERVER};Database={DATABASE};Port={PORT};UID={USERNAME};Password={PASSWORD};EncryptionMethod=1;ValidateServerCertificate=1
.
Connect PostgreSQL to Experience Platform on Azure azure
Read the steps below to learn how to connect your PostgreSQL account to Experience Platform on Azure.
Create a base connection azure-base
A base connection retains information between your source and Experience Platform, including your source鈥檚 authentication credentials, the current state of the connection, and your unique base connection ID. The base connection ID allows you to explore and navigate files from within your source and identify the specific items that you want to ingest, including information regarding their data types and formats.
To create a base connection ID, make a POST request to the /connections
endpoint while providing your PostgreSQL authentication credentials as part of the request parameters.
API format
POST /connections
Request
The following request creates a base connection for PostgreSQL using account key based authentication:
accordion | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
View request example | ||||||||||
|
Response
A successful response returns the unique identifier (id
) of the newly created base connection.
accordion | ||
---|---|---|
View response example | ||
|
Request
The following request creates a base connection for PostgreSQL using basic authentication:
accordion | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
View request example | ||||||||||||||||||||
|
Response
A successful response returns the unique identifier (id
) of the newly created base connection.
accordion | ||
---|---|---|
View response example | ||
|
Connect PostgreSQL to Experience Platform on Amazon Web Services aws
Read the steps below for information on how to connect your PostgreSQL database to Experience Platform on AWS.
Create a base connection aws-base
To create a base connection ID, make a POST request to the /connections
endpoint while providing your PostgreSQL authentication credentials as part of the request parameters.
API format
POST /connections
Request
The following request creates a base connection for PostgreSQL to connect to Experience Platform on AWS.
code language-shell |
---|
|
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 7-row-2 | |
---|---|
Property | Description |
auth.params.server |
The name or IP address of your PostgreSQL database. |
auth.params.port |
The port number of the database server. |
auth.params.database |
The name of your PostgreSQL database. |
auth.params.username |
The username associated with your PostgreSQL database authentication. |
auth.params.password |
The password associated with your PostgreSQL database authentication. |
auth.params.sslMode |
The method by which data is encrypted during data transfer. The available values include: Disable , Allow , Prefer , Verify Ca , and Verify Full . |
connectionSpec.id |
The PostgreSQL connection specification IDs: 74a1c565-4e59-48d7-9d67-7c03b8a13137 . |
Response
A successful response returns the unique identifier (id
) of the newly created base connection.
code language-json |
---|
|
Next steps
Now that you have created a connection between your PostgreSQL database and Experience Platform, you can now proceed to next steps and bring your PostgreSQL data to Experience Platform. For more information, read the following documentation: