Connect PostgreSQL to Experience Platform on Azure

Read the steps below to learn how to connect your PostgreSQL account to Experience Platform on Azure.

Create a base connection

A base connection retains information between your source and Experience Platform, including your source’s 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:

View request example
curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/connections' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}' \
  -H 'Content-Type: application/json' \
  -d '{
      "name": "PostgreSQL base connection",
      "description": "PostgreSQL base connection via connection string",
      "auth": {
          "specName": "Connection String Based Authentication",
          "params": {
              "connectionString": "Server={SERVER};Database={DATABASE};Port={PORT};UID={USERNAME};Password={PASSWORD}"
          }
      },
      "connectionSpec": {
          "id": "74a1c565-4e59-48d7-9d67-7c03b8a13137",
          "version": "1.0"
      }
  }'
PropertyDescription
auth.params.connectionStringThe connection string associated with your PostgreSQL account. The PostgreSQL connection string pattern is: Server={SERVER};Database={DATABASE};Port={PORT};UID={USERNAME};Password={PASSWORD}.
connectionSpec.idThe PostgreSQL connection specification IDs: 74a1c565-4e59-48d7-9d67-7c03b8a13137.

Response

A successful response returns the unique identifier (id) of the newly created base connection.

View response example
{
    "id": "056dd1b4-da33-42f9-add1-b4da3392f94e",
    "etag": "\"1700e582-0000-0200-0000-5e3c85180000\""
}

Request

The following request creates a base connection for PostgreSQL using basic authentication:

View request example
curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/connections' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}' \
  -H 'Content-Type: application/json' \
  -d '{
      "name": "PostgreSQL base connection",
      "description": "PostgreSQL base connection via basic authentication",
      "auth": {
          "specName": "Basic Authentication",
          "params": {
              "server": "localhost",
              "port": "3306",
              "database": "postgresql-acme",
              "username": "acme",
              "password": "xxxx",
              "sslMode": "Allow"
          }
      },
      "connectionSpec": {
          "id": "74a1c565-4e59-48d7-9d67-7c03b8a13137",
          "version": "1.0"
      }
  }'
PropertyDescription
auth.params.serverThe name or IP address of your PostgreSQL database.
auth.params.portThe port number of the database server.
auth.params.databaseThe name of your PostgreSQL database.
auth.params.usernameThe username associated with your PostgreSQL database authentication.
auth.params.passwordThe password associated with your PostgreSQL database authentication.
auth.params.sslModeThe method by which data is encrypted during data transfer. The available values include: Disable, Allow, Prefer, Verify Ca, and Verify Full.
connectionSpec.idThe PostgreSQL connection specification IDs: 74a1c565-4e59-48d7-9d67-7c03b8a13137.

Response

A successful response returns the unique identifier (id) of the newly created base connection.

View response example
{
    "id": "2c15b1c5-73bf-47ab-9098-0467fcd854d9",
    "etag": "\"2600fc39-0000-0200-0000-67dd48f80000\""
}