创建 Microsoft SQL Server基连接使用 Flow Service API

基本连接表示源与Adobe Experience Platform之间经过验证的连接。

本教程将指导您完成为 Microsoft SQL Server 使用 Flow Service API.

快速入门

本指南要求您对Adobe Experience Platform的以下组件有一定的了解:

  • : Experience Platform 允许从各种源摄取数据,同时让您能够使用来构建、标记和增强传入数据 Platform 服务。
  • 沙箱: Experience Platform 提供分区单个沙箱的虚拟沙箱 Platform 实例迁移到单独的虚拟环境中,以帮助开发和改进数字体验应用程序。

以下部分提供了成功连接到所需了解的其他信息 Microsoft SQL Server 使用 Flow Service API。

收集所需的凭据

为了连接到 Microsoft SQL Server,则必须提供以下连接属性:

凭据 描述
connectionString 与 Microsoft SQL Server 帐户。 的 Microsoft SQL Server 连接字符串模式为: Data Source={SERVER_NAME}\\<{INSTANCE_NAME} if using named instance>;Initial Catalog={DATABASE};Integrated Security=False;User ID={USERNAME};Password={PASSWORD};.
connectionSpec.id 连接规范返回源的连接器属性,包括与创建基连接和源连接相关的验证规范。 的连接规范ID Microsoft SQL Server is 1f372ff9-38a4-4492-96f5-b9a4e4bd00ec.

有关获取连接字符串的详细信息,请参阅此 Microsoft SQL Server 文档.

使用Platform API

有关如何成功调用Platform API的信息,请参阅 Platform API快速入门.

创建基本连接

基本连接保留了源和平台之间的信息,包括源的身份验证凭据、连接的当前状态和唯一基本连接ID。 基本连接ID允许您从源中浏览和导航文件,并标识要摄取的特定项目,包括有关其数据类型和格式的信息。

要创建基本连接ID,请向 /connections 提供 Microsoft SQL Server 身份验证凭据作为请求参数的一部分。

API格式

POST /connections

请求

以下请求会为 Microsoft SQL Server:

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": "Base connection for sql-server",
        "description": "Base connection for sql-server",
        "auth": {
            "specName": "Connection String Based Authentication",
            "params": {
                "connectionString": "Data Source={SERVER_NAME}\\<{INSTANCE_NAME} if using named instance>;Initial Catalog={DATABASE};Integrated Security=False;User ID={USERNAME};Password={PASSWORD};"
            }
        },
        "connectionSpec": {
            "id": "1f372ff9-38a4-4492-96f5-b9a4e4bd00ec",
            "version": "1.0"
    }'
属性 描述
auth.params.connectionString 与 Microsoft SQL Server 帐户。 的 Microsoft SQL Server 连接字符串模式为: Data Source={SERVER_NAME}\\<{INSTANCE_NAME} if using named instance>;Initial Catalog={DATABASE};Integrated Security=False;User ID={USERNAME};Password={PASSWORD};.
connectionSpec.id 的 Microsoft SQL Server 连接规范ID是: 1f372ff9-38a4-4492-96f5-b9a4e4bd00ec.

响应

成功的响应会返回新创建连接的详细信息,包括其唯一标识符(id)。 在下一个教程中浏览数据库时需要此ID。

{
    "id": "0b8224e4-0de8-4293-8224-e40de80293c6",
    "etag": "\"5802c519-0000-0200-0000-5e4d89520000\""
}

后续步骤

通过阅读本教程,您已创建 Microsoft SQL Server 基本连接使用 Flow Service API。 在以下教程中,您可以使用此基本连接ID:

在此页面上