Show Menu
TOPICS×

Create an SFTP connector using the Flow Service API

The SFTP connector is in beta. The features and documentation are subject to change. 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 Experience Platform to an SFTP (Secure File Transfer Protocol) server.
If you would prefer to use the user interface in Experience Platform, the UI tutorial provides step-by-step instructions for performing similar actions.

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 an SFTP server using the Flow Service API.

Gather required credentials

In order for Flow Service to connect to SFTP, you must provide values for the following connection properties:
Credential
Description
host
The name or IP address associated with your SFTP server.
username
The username with access to your SFTP server.
password
The password for your SFTP server.

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 connection is required per SFTP account as it can be used to create multiple source connectors to bring in different data.
API format
POST /connections

Request
curl -X POST \
    'http://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  "auth": {
        "specName": "Basic Authentication for sftp",
        "params": {
            "host": "{HOST_NAME}",
            "userName": "{USER_NAME}",
            "password": "{PASSWORD}"
        }
    },
    "connectionSpec": {
        "id": "b7bf2577-4520-42c9-bae9-cad01560f7bc",
        "version": "1.0"
    }
}

Property
Description
auth.params.host
The host name of your SFTP server.
auth.params.username
The username associated with your SFTP server.
auth.params.password
The password associated with your SFTP server.
connectionSpec.id
The STFP server connection specification ID: b7bf2577-4520-42c9-bae9-cad01560f7bc
Response
A successful response returns the unique identifier ( id ) of the newly created connection. This ID is required to explore your SFTP server in the next tutorial.
{
    "id": "bf367b0d-3d9b-4060-b67b-0d3d9bd06094",
    "etag": "\"1700cc7b-0000-0200-0000-5e3b3fba0000\""
}

Next steps

By following this tutorial, you have created an SFTP connection using the Flow Service API, and have obtained the connection's unique ID value. You can use this connection ID to explore cloud storages using the Flow Service API or ingest parquet data using the Flow Service API .