Show Menu
TOPICS×

Create an IBM DB2 connector using the Flow Service API

The IBM DB2 connector is in beta. See the Sources overview for more information on using beta-labelled connectors.
Flow Service is used to collect and centralize customer data from various disparate sources within Adobe Experience Platform. The service provides a user interface and RESTful API from which all supported sources are connectable.
This tutorial uses the Flow Service API to walk you through the steps to connect IBM DB2 (hereinafter referred to as "DB2") to Experience Platform.

Getting started

This guide requires a working understanding of the following components of Adobe 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 Platform services.
  • Sandboxes : Experience Platform provides virtual sandboxes which partition a single 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 DB2 using the Flow Service API.
Credential
Description
server
The name of the DB2 server. You can specify the port number following the server name delimited by a colon. For example: server:port.
database
The name of the DB2 database.
username
The username used to connect to the DB2 database.
password
The password for the user account you specified for the username.
connectionSpec.id
The unique identifier needed to create a connection. The connection specification ID for DB2 is 09182899-b429-40c9-a15a-bf3ddbc8ced7 .
For more information about getting started refer to this DB2 document .

Reading sample API calls

This tutorial provides example API calls to demonstrate how to format your requests. These include paths, required headers, and properly formatted request payloads. Sample JSON returned in API responses is also provided. For information on the conventions used in documentation for sample API calls, see the section on how to read example API calls in the Experience Platform troubleshooting guide.

Gather values for required headers

In order to make calls to Platform APIs, you must first complete the authentication tutorial . Completing the authentication tutorial provides the values for each of the required headers in all Experience Platform API calls, as shown below:
  • Authorization: Bearer {ACCESS_TOKEN}
  • x-api-key: {API_KEY}
  • x-gw-ims-org-id: {IMS_ORG}
All resources in Experience Platform, including those belonging to the Flow Service, are isolated to specific virtual sandboxes. All requests to Platform APIs require a header that specifies the name of the sandbox the operation will take place in:
  • x-sandbox-name: {SANDBOX_NAME}
All requests that contain a payload (POST, PUT, PATCH) require an additional media type header:
  • Content-Type: application/json

Create a connection

A connection specifies a source and contains your credentials for that source. Only one connector is required per DB2 account as it can be used to create multiple source connectors to bring in different data.
API format
POST /connections

Request
In order to create an DB2 connection, its unique connection specification ID must be provided as part of the POST request. The connection specification ID for DB2 is 09182899-b429-40c9-a15a-bf3ddbc8ced7 .
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: {IMS_ORG}' \
    -H 'x-sandbox-name: {SANDBOX_NAME}' \
    -H 'Content-Type: application/json' \
    -d '{
        "name": "DB2 connection",
        "description": "DB2 test connection",
        "auth": {
            "specName": "Basic Authentication",
            "params": {
                    "server": "{SERVER}",
                    "database": "{DATABASE}",
                    "authenticationType": "{AUTHENTICATION_TYPE}",
                    "username": "{USERNAME}",
                    "password": "{PASSWORD}"
                }
        },
        "connectionSpec": {
            "id": "09182899-b429-40c9-a15a-bf3ddbc8ced7",
            "version": "1.0"
        }
    }'

Parameter
Description
auth.params.connectionString
The connection string associated with your DB2 account.
connectionSpec.id
The DB2 connection specification ID: 09182899-b429-40c9-a15a-bf3ddbc8ced7 .
Response
A successful response returns details of the newly created connection, including its unique identifier ( id ). This ID is required to explore your data in the next tutorial.
{
    "id": "575abae5-c99a-452c-9aba-e5c99ac52c4d",
    "etag": "\"e5012c89-0000-0200-0000-5eaa036b0000\""
}

Next steps

By following this tutorial, you have created an IBM DB2 connection using the Flow Service API and have obtained the connection's unique ID value. You can use this ID in the next tutorial as you learn how to explore databases using the Flow Service API .