為建立資料流 OneTrust Integration 來源使用 Flow Service API

NOTE
此 OneTrust Integration 來源僅支援擷取同意和偏好設定資料,不支援Cookie。

下列教學課程將逐步引導您完成建立來源連線和資料流的步驟,以便從取得歷史同意資料和排程同意資料 OneTrust Integration 至Adobe Experience Platform,使用 Flow Service API.

先決條件

IMPORTANT
此 OneTrust Integration 來源聯結器和檔案是由 OneTrust Integration 團隊。 如有任何查詢或更新請求,請聯絡 OneTrust 團隊 直接。

連線之前 OneTrust Integration 對於Platform,您必須先擷取存取權杖。 如需尋找存取權杖的詳細說明,請參閱 OneTrust Integration OAuth 2指南.

存取權杖過期後不會自動重新整理,因為系統間重新整理權杖不受支援 OneTrust. 因此,您必須確定您的存取權杖在過期之前已在連線中更新。 存取Token的最大可設定存留期為一年。 若要進一步瞭解如何更新存取權杖,請參閱 OneTrust 有關管理您的OAuth 2.0使用者端憑證的檔案.

Connect OneTrust Integration 至平台,使用 Flow Service API

NOTE
此 OneTrust Integration 正在與Adobe共用API規格以擷取資料。

下列教學課程將逐步引導您完成建立 OneTrust Integration 來源連線並建立資料流以帶來 OneTrust Integration 使用將資料傳送至Platform Flow Service API.

建立基礎連線 base-connection

基礎連線會保留您的來源和平台之間的資訊,包括來源的驗證認證、連線的目前狀態,以及您唯一的基本連線ID。 基本連線ID可讓您瀏覽和瀏覽來源內的檔案,並識別您要擷取的特定專案,包括其資料型別和格式的資訊。

POST若要建立基本連線ID,請向 /connections 端點,同時提供 OneTrust Integration 要求內文中的驗證認證。

API格式

POST /connections

要求

下列要求會建立 OneTrust Integration :

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": "ONETRUST base connection",
      "description": "ONETRUST base connection to authenticate to Platform",
      "connectionSpec": {
          "id": "cf16d886-c627-4872-9936-fb08d6cba8cc",
          "version": "1.0"
      },
      "auth": {
          "specName": "OAuth2 Refresh Code",
          "params": {
              "accessToken": "{ACCESS_TOKEN}"
          }
      }
  }'
屬性
說明
name
基礎連線的名稱。 確定基本連線的名稱是描述性的,因為您可以使用此名稱來查閱基本連線的資訊。
description
您可以納入的選擇性值,可提供基礎連線的詳細資訊。
connectionSpec.id
來源的連線規格ID。 在您的來源註冊並核准後,您便可以透過擷取此ID Flow Service API。
auth.specName
您用來向Platform驗證來源的驗證型別。
auth.params.
包含驗證您的來源所需的認證,包括連線至API的存取權杖。
auth.params.accessToken
與您的對應的存取權杖 OneTrust Integration 帳戶。

回應

成功回應會傳回新建立的基本連線,包括其唯一連線識別碼(id)。 在下一個步驟中探索來源的檔案結構和內容時,需要此ID。

{
     "id": "622124ca-6d18-47f7-999c-66f599955309",
     "etag": "\"2e026443-0000-0200-0000-621f1af80000\""
}

探索您的來源 explore

使用您在上一步中產生的基本連線ID,您可以透過執行GET請求來探索檔案和目錄。

使用以下呼叫來尋找您要帶入的檔案路徑 Platform:

API格式

GET /connections/{BASE_CONNECTION_ID}/explore?objectType=rest&object={OBJECT}&fileType={FILE_TYPE}&preview={PREVIEW}

執行GET請求以探索來源的檔案結構和內容時,您必須包括下表列出的查詢引數:

參數
說明
{BASE_CONNECTION_ID}
在上一步中產生的基本連線ID。
objectType=rest
您要探索的物件型別。 目前,此值一律設為 rest.
{OBJECT}
只有在檢視特定目錄時才需要此引數。 其值代表您要探索的目錄路徑。
fileType=json
您要帶到Platform的檔案型別。 目前, json 是唯一支援的檔案型別。
{PREVIEW}
定義連線內容是否支援預覽的布林值。

要求

curl -X GET \
    'https://platform.adobe.io/data/foundation/flowservice/connections/622124ca-6d18-47f7-999c-66f599955309/explore?objectType=rest&object=json&fileType=json&preview=true' \
    -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}'

回應

成功的回應會傳回查詢檔案的結構。

NOTE
為了簡單起見,以下JSON回應裝載已隱藏。 選取「按一下我」以檢視回應裝載。
按一下我
code language-json
{
    "format": "hierarchical",
    "schema": {
        "type": "object",
        "properties": {
            "number": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "size": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "numberOfElements": {
                "type": "integer",
                "minimum": -9007199254740992,
                "maximum": 9007199254740991
            },
            "last": {
                "type": "boolean"
            },
            "pageable": {
                "type": "object",
                "properties": {
                    "paged": {
                        "type": "boolean"
                    },
                    "pageNumber": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "offset": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "tokenId": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "limit": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "pageSize": {
                        "type": "integer",
                        "minimum": -9007199254740992,
                        "maximum": 9007199254740991
                    },
                    "unpaged": {
                        "type": "boolean"
                    },
                    "sort": {
                        "type": "object",
                        "properties": {
                            "unsorted": {
                                "type": "boolean"
                            },
                            "sorted": {
                                "type": "boolean"
                            },
                            "empty": {
                                "type": "boolean"
                            }
                        }
                    }
                }
            },
            "sort": {
                "type": "object",
                "properties": {
                    "unsorted": {
                        "type": "boolean"
                    },
                    "sorted": {
                        "type": "boolean"
                    },
                    "empty": {
                        "type": "boolean"
                    }
                }
            },
            "content": {
                "type": "object",
                "properties": {
                    "LastUpdatedDate": {
                        "type": "string"
                    },
                    "Identifier": {
                        "type": "string"
                    },
                    "Language": {
                        "type": "string"
                    },
                    "TestDataSubject": {
                        "type": "boolean"
                    },
                    "CreatedDate": {
                        "type": "string"
                    },
                    "DataElements": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {}
                        }
                    },
                    "Id": {
                        "type": "string"
                    },
                    "Purposes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "Status": {
                                    "type": "string"
                                },
                                "LastTransactionDate": {
                                    "type": "string"
                                },
                                "CustomPreferences": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {}
                                    }
                                },
                                "LastUpdatedDate": {},
                                "ExpiryDate": {},
                                "Topics": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "IsConsented": {
                                                "type": "boolean"
                                            },
                                            "Id": {
                                                "type": "string"
                                            },
                                            "Name": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                },
                                "TotalTransactionCount": {
                                    "type": "integer",
                                    "minimum": -9007199254740992,
                                    "maximum": 9007199254740991
                                },
                                "LastReceiptId": {},
                                "ConsentDate": {
                                    "type": "string"
                                },
                                "LastInteractionDate": {},
                                "Name": {
                                    "type": "string"
                                },
                                "FirstTransactionDate": {
                                    "type": "string"
                                },
                                "LastTransactionCollectionPointId": {
                                    "type": "string"
                                },
                                "LastTransactionCollectionPointVersion": {
                                    "type": "integer",
                                    "minimum": -9007199254740992,
                                    "maximum": 9007199254740991
                                },
                                "Version": {
                                    "type": "integer",
                                    "minimum": -9007199254740992,
                                    "maximum": 9007199254740991
                                },
                                "attributes": {
                                    "type": "object",
                                    "properties": {}
                                },
                                "Id": {
                                    "type": "string"
                                },
                                "PurposeNote": {},
                                "WithdrawalDate": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "first": {
                "type": "boolean"
            },
            "empty": {
                "type": "boolean"
            }
        }
    },
    "data": [
        {
            "number": 0,
            "size": 100,
            "numberOfElements": 100,
            "last": false,
            "pageable": {
                "limit": 100,
                "offset": 0,
                "sort": {
                    "sorted": true,
                    "unsorted": false,
                    "empty": false
                },
                "tokenId": 100,
                "pageSize": 100,
                "pageNumber": 0,
                "unpaged": false,
                "paged": true
            },
            "sort": {
                "sorted": true,
                "unsorted": false,
                "empty": false
            },
            "content": {
                "Id": "de1ab4d2-6ccf-42bd-b363-2d8cac60c88c",
                "Language": "en-us",
                "Identifier": "gkumar@onetrust.com",
                "LastUpdatedDate": "2019-06-05T12:02:07Z",
                "CreatedDate": "2018-05-02T03:14:28Z",
                "Purposes": [
                    {
                        "Id": "9edf57bb-0449-4c15-98e4-8641522e5ff4",
                        "Name": "Purpose_UAT",
                        "Version": 1,
                        "Status": "ACTIVE",
                        "FirstTransactionDate": "2018-05-02T03:14:27Z",
                        "LastTransactionDate": "2019-05-29T11:08:26Z",
                        "WithdrawalDate": "2019-05-29T11:05:30Z",
                        "ConsentDate": "2018-05-02T03:14:27Z",
                        "TotalTransactionCount": 5,
                        "Topics": [
                            {
                                "Id": "d6e3d675-3d6f-4f4e-a157-bd93829ee632",
                                "Name": "Topic_UAT",
                                "IsConsented": true
                            }
                        ],
                        "LastTransactionCollectionPointId": "735c85c8-c69c-44bc-8bad-ec0e806090bd",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "814c073a-95f1-4fc9-8263-1ec62225c5e9",
                        "Name": "Multi Pur_UAT",
                        "Version": 1,
                        "Status": "ACTIVE",
                        "FirstTransactionDate": "2018-05-02T03:17:33Z",
                        "LastTransactionDate": "2018-05-02T03:19:49Z",
                        "ConsentDate": "2018-05-02T03:17:33Z",
                        "TotalTransactionCount": 4,
                        "LastTransactionCollectionPointId": "9a5b7375-bc13-47e8-8a58-1ca7d9c06c8e",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "4d52dcc4-82bf-44bf-ac49-854eba6ff8f3",
                        "Name": "Eloqua_UAT",
                        "Version": 1,
                        "Status": "ACTIVE",
                        "FirstTransactionDate": "2018-05-02T03:26:36Z",
                        "LastTransactionDate": "2019-03-07T03:23:25Z",
                        "ConsentDate": "2018-05-02T03:26:36Z",
                        "TotalTransactionCount": 3,
                        "Topics": [
                            {
                                "Id": "690ad782-6280-4ea4-b62a-1514c39fc838",
                                "Name": "Eloqua_topic",
                                "IsConsented": true
                            }
                        ],
                        "LastTransactionCollectionPointId": "f8886377-e4b1-45e4-b1c0-d7dacb744db8",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "723300e3-96cb-4da4-abdd-4913c05be215",
                        "Name": "Purpose 1",
                        "Version": 2,
                        "Status": "EXPIRED",
                        "FirstTransactionDate": "2019-02-27T06:29:48Z",
                        "LastTransactionDate": "2019-02-28T12:00:45Z",
                        "ConsentDate": "2019-02-27T06:29:48Z",
                        "ExpiryDate": "2019-02-28T12:00:45Z",
                        "TotalTransactionCount": 2,
                        "LastTransactionCollectionPointId": "3dbfb978-10f9-44a9-9669-d699674edd9d",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "4a5e6278-17f1-4283-beee-29f81cde2bd0",
                        "Name": "kbpurpose1",
                        "Version": 1,
                        "Status": "NO_CONSENT",
                        "FirstTransactionDate": "2019-03-07T03:21:58Z",
                        "LastTransactionDate": "2019-05-29T03:56:37Z",
                        "TotalTransactionCount": 6,
                        "LastTransactionCollectionPointId": "cea42a12-5de4-421a-b429-092e8d523948",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "a36f98d0-c662-4f61-a2a1-8bdab69e3c3a",
                        "Name": "Pur 1",
                        "Version": 1,
                        "Status": "ACTIVE",
                        "FirstTransactionDate": "2019-03-07T03:23:25Z",
                        "LastTransactionDate": "2019-03-07T03:23:27Z",
                        "ConsentDate": "2019-03-07T03:23:25Z",
                        "TotalTransactionCount": 2,
                        "LastTransactionCollectionPointId": "f8886377-e4b1-45e4-b1c0-d7dacb744db8",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "41ebdf32-068b-4239-89ac-42e20262c5a9",
                        "Name": "Send Notifications about Changes to Preferences",
                        "Version": 1,
                        "Status": "ACTIVE",
                        "FirstTransactionDate": "2019-03-07T03:24:11Z",
                        "LastTransactionDate": "2019-03-07T03:27:29Z",
                        "ConsentDate": "2019-03-07T03:24:11Z",
                        "TotalTransactionCount": 2,
                        "LastTransactionCollectionPointId": "c29a99a9-de4d-4367-973b-95b0217d0640",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "759d8b24-e4c0-4107-86e2-3a408db13e6b",
                        "Name": "GJ Purpose 07",
                        "Version": 2,
                        "Status": "WITHDRAWN",
                        "FirstTransactionDate": "2019-03-07T03:27:29Z",
                        "LastTransactionDate": "2019-05-29T11:09:03Z",
                        "WithdrawalDate": "2019-05-29T11:09:03Z",
                        "ConsentDate": "2019-03-07T03:27:29Z",
                        "TotalTransactionCount": 18,
                        "LastTransactionCollectionPointId": "cea42a12-5de4-421a-b429-092e8d523948",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "a57ee9da-b494-49e2-b562-6dfa31f190df",
                        "Name": "kbpurpose2",
                        "Version": 1,
                        "Status": "WITHDRAWN",
                        "FirstTransactionDate": "2019-03-28T03:23:44Z",
                        "LastTransactionDate": "2019-03-28T03:24:29Z",
                        "WithdrawalDate": "2019-03-28T03:24:29Z",
                        "ConsentDate": "2019-03-28T03:23:44Z",
                        "TotalTransactionCount": 2,
                        "LastTransactionCollectionPointId": "c29a99a9-de4d-4367-973b-95b0217d0640",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "a1ccd810-94a0-4b58-946b-6705eae15c5b",
                        "Name": "Purpose01 v2",
                        "Version": 2,
                        "Status": "EXPIRED",
                        "FirstTransactionDate": "2019-05-29T04:05:42Z",
                        "LastTransactionDate": "2019-06-05T12:02:06Z",
                        "WithdrawalDate": "2019-05-29T11:09:12Z",
                        "ConsentDate": "2019-05-29T04:05:42Z",
                        "ExpiryDate": "2019-06-05T12:02:06Z",
                        "TotalTransactionCount": 8,
                        "Topics": [
                            {
                                "Id": "af7bf604-2058-4089-985c-c84083e3e3e3",
                                "Name": "New_Topic",
                                "IsConsented": true
                            }
                        ],
                        "LastTransactionCollectionPointId": "735c85c8-c69c-44bc-8bad-ec0e806090bd",
                        "LastTransactionCollectionPointVersion": 1
                    },
                    {
                        "Id": "a313353a-e13b-4554-be08-22cf4a78a31c",
                        "Name": "Purpose_1804 v2",
                        "Version": 2,
                        "Status": "ACTIVE",
                        "FirstTransactionDate": "2019-05-29T04:05:42Z",
                        "LastTransactionDate": "2019-05-29T11:09:30Z",
                        "WithdrawalDate": "2019-05-29T11:05:30Z",
                        "ConsentDate": "2019-05-29T04:05:42Z",
                        "TotalTransactionCount": 4,
                        "CustomPreferences": [
                            {
                                "Id": "4935d35a-7216-480d-9da9-1aef0e078b89",
                                "Name": "Custom_S",
                                "Options": [
                                    {
                                        "Id": "8acc2f9f-37f8-4ace-a513-fae6b7dd0aa9",
                                        "Name": "Option2",
                                        "IsConsented": true
                                    }
                                ]
                            }
                        ],
                        "LastTransactionCollectionPointId": "735c85c8-c69c-44bc-8bad-ec0e806090bd",
                        "LastTransactionCollectionPointVersion": 1
                    }
                ],
                "TestDataSubject": false
            },
            "first": true,
            "empty": false
        }
    ]
}

建立來源連線 source-connection

您可以向以下發出POST要求來建立來源連線: Flow Service API。 來源連線由連線ID、來源資料檔案的路徑和連線規格ID組成。

API格式

POST /sourceConnections

要求

以下請求會為建立來源連線 OneTrust Integration :

curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/sourceConnections' \
  -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": "ONETRUST Source Connection",
      "description": "ONETRUST Source Connection",
      "baseConnectionId": "622124ca-6d18-47f7-999c-66f599955309",
      "connectionSpec": {
          "id": "cf16d886-c627-4872-9936-fb08d6cba8cc",
          "version": "1.0"
      },
      "data": {
          "format": "json"
      },
      "params": {}
  }'
屬性
說明
name
來源連線的名稱。 確保來源連線的名稱是描述性的,因為您可以使用此名稱來查閱來源連線的資訊。
description
您可以納入的選擇性值,可提供來源連線的詳細資訊。
baseConnectionId
的基礎連線ID: OneTrust Integration. 此ID是在先前的步驟中產生的。
connectionSpec.id
與您的來源對應的連線規格ID。
data.format
的格式 OneTrust Integration 您要擷取的資料。 目前唯一支援的資料格式為 json.

回應

成功的回應會傳回唯一識別碼(id)。 此ID在後續步驟中是建立資料流的必要專案。

{
     "id": "eb5833d3-230d-4700-80cc-bda396e7af8a",
     "etag": "\"da04c07f-0000-0200-0000-621f1afc0000\""
}

建立目標XDM結構描述 target-schema

為了在Platform中使用來源資料,必須建立目標結構描述,以根據您的需求來建構來源資料。 然後,目標結構描述會用於建立包含來源資料的Platform資料集。

可透過對以下專案執行POST請求來建立目標XDM結構描述: 結構描述登入API.

如需建立目標XDM結構的詳細步驟,請參閱以下教學課程: 使用API建立結構描述.

建立目標資料集 target-dataset

您可以透過對「 」執行POST請求來建立目標資料集 目錄服務API,在裝載中提供目標結構描述的ID。

如需建立目標資料集的詳細步驟,請參閱以下教學課程: 使用API建立資料集.

建立目標連線 target-connection

目標連線代表與要儲存所擷取資料的目的地之間的連線。 若要建立目標連線,您必須提供對應至 Data Lake. 此ID為: c604ff05-7f1a-43c0-8e18-33bf874cb11c.

您現在將目標結構描述、目標資料集和連線規格ID視為唯一識別碼。 Data Lake. 使用這些識別碼,您可以使用 Flow Service 指定將包含傳入來源資料之資料集的API。

API格式

POST /targetConnections

要求

以下請求會建立目標連線 OneTrust Integration :

curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
  -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": "ONETRUST Target Connection",
      "description": "ONETRUST Target Connection",
      "connectionSpec": {
          "id": "c604ff05-7f1a-43c0-8e18-33bf874cb11c",
          "version": "1.0"
      },
      "data": {
          "format": "json"
      },
      "params": {
          "dataSetId": "61f6ca3f33978c19486bb463"
      }
  }'
屬性
說明
name
目標連線的名稱。 確保目標連線的名稱是描述性的,因為您可以使用此名稱來查詢目標連線的資訊。
description
您可以納入的選擇性值,可提供目標連線的詳細資訊。
connectionSpec.id
對應至的連線規格ID Data Lake. 此固定ID為: c604ff05-7f1a-43c0-8e18-33bf874cb11c.
data.format
的格式 OneTrust Integration 您要帶到Platform的資料。
params.dataSetId
在上一步中擷取的目標資料集ID。

回應

成功回應會傳回新目標連線的唯一識別碼(id)。 此ID在後續步驟中是必要的。

{
     "id": "495f761f-310a-4a7b-ae78-5b1152d74b38",
     "etag": "\"410a7b0c-0000-0200-0000-621f1afd0000\""
}

建立對應 mapping

為了將來源資料內嵌到目標資料集中,必須先將其對應到目標資料集所遵守的目標結構描述。 這是透過向執行POST請求來達成 Data Prep API 要求裝載中定義資料對應。

API格式

POST /conversion/mappingSets

要求

curl -X POST \
  'https://platform.adobe.io/data/foundation/conversion/mappingSets' \
  -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 '{
      "version": 0,
      "xdmSchema": "https://ns.adobe.com/{TENANT_ID}/schemas/cfc8cee182e546c1fb35071185524b465e06bf1acb74f30d",
      "xdmVersion": "1.0",
      "id": null,
      "mappings": [{
              "sourceType": "ATTRIBUTE",
              "source": "content.Identifier",
              "destination": "_id",
              "name": "id",
              "description": "Identifier field"
          },
          {
              "sourceType": "ATTRIBUTE",
              "source": "content.Identifier",
              "destination": "_exchangesandboxbravo.Identifier"
          },
          {
              "sourceType": "ATTRIBUTE",
              "source": "content.Language",
              "destination": "_exchangesandboxbravo.Language",
              "description": "Language field"
          },
          {
              "sourceType": "ATTRIBUTE",
              "source": "content.CreatedDate",
              "destination": "_exchangesandboxbravo.CreatedDate",
              "description": "Created Date field"
          },
          {
              "sourceType": "ATTRIBUTE",
              "source": "content.LastUpdatedDate",
              "destination": "_exchangesandboxbravo.LastUpdatedDate",
              "description": "Created Date field"
          },
          {
              "sourceType": "ATTRIBUTE",
              "source": "content.DataElements",
              "destination": "_exchangesandboxbravo.DataElements"
          },
          {
              "sourceType": "ATTRIBUTE",
              "source": "content.Purposes",
              "destination": "_exchangesandboxbravo.Purposes"
          }

      ]
  }'
屬性
說明
xdmSchema
的ID 目標XDM結構描述 已在先前步驟中產生。
mappings.destinationXdmPath
來源屬性對應到的目的地XDM路徑。
mappings.sourceAttribute
需要對映至目的地XDM路徑的來源屬性。

回應

成功回應會傳回新建立對應的詳細資料,包括其唯一識別碼(id)。 在後續步驟中需要此值,才能建立資料流。

{
    "id": "a87f130e82f04d5188da01f087805c4b",
    "version": 0,
    "createdDate": 1646205694395,
    "modifiedDate": 1646205694395,
    "createdBy": "{CREATED_BY}",
    "modifiedBy": "{MODIFIED_BY}"
}

建立流程 flow

從以下來源取得資料的最後一步 OneTrust Integration 對Platform而言,就是建立資料流。 到現在為止,您已準備下列必要值:

資料流負責從來源排程及收集資料。 您可以執行POST要求,同時在裝載中提供先前提及的值,藉此建立資料流。

若要排程內嵌,您必須先將開始時間值設為以秒為單位的epoch時間。 然後,您必須將頻率值設定為下列五個選項之一: onceminutehourday,或 week. 間隔值會指定兩個連續內嵌之間的期間,但是建立一次性內嵌不需要設定間隔。 對於所有其他頻率,間隔值必須設定為等於或大於 15.

API格式

POST /flows

要求

curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/flows' \
  -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": "ONETRUST dataflow",
      "description": "ONETRUST dataflow",
      "flowSpec": {
          "id": "6499120c-0b15-42dc-936e-847ea3c24d72",
          "version": "1.0"
      },
      "sourceConnectionIds": [
          "eb5833d3-230d-4700-80cc-bda396e7af8a"
      ],
      "targetConnectionIds": [
          "495f761f-310a-4a7b-ae78-5b1152d74b38"
      ],
      "transformations": [
          {
              "name": "Mapping",
              "params": {
                  "mappingId": "a87f130e82f04d5188da01f087805c4b",
                  "mappingVersion": 0
              }
          }
      ],
      "scheduleParams": {
          "startTime": "1625040887",
          "frequency": "minute",
          "interval": 15
      }
  }'
屬性
說明
name
資料流的名稱。 確保資料流的名稱是描述性的,因為您可以使用此名稱來查閱資料流上的資訊。
description
您可以納入的選用值,可提供資料流的詳細資訊。
flowSpec.id
建立資料流所需的流量規格ID。 此固定ID為: 6499120c-0b15-42dc-936e-847ea3c24d72.
flowSpec.version
流程規格ID的對應版本。 此值預設為 1.0.
sourceConnectionIds
來源連線ID 已在先前步驟中產生。
targetConnectionIds
目標連線ID 已在先前步驟中產生。
transformations
此屬性包含套用至您的資料所需的各種轉換。 將非XDM相容的資料引進Platform時,需要此屬性。
transformations.name
指定給轉換的名稱。
transformations.params.mappingId
對應ID 已在先前步驟中產生。
transformations.params.mappingVersion
對應ID的對應版本。 此值預設為 0.
scheduleParams.startTime
此屬性包含資料流擷取排程的相關資訊。
scheduleParams.frequency
資料流收集資料的頻率。 可接受的值包括: onceminutehourday,或 week.
scheduleParams.interval
間隔會指定兩個連續資料流執行之間的期間。 間隔值應為非零整數。 當頻率設定為時,不需要間隔 once 和應大於或等於 15 (其他頻率值)。

回應

成功的回應會傳回ID (id)。 您可以使用此ID來監視、更新或刪除資料流。

{
     "id": "70045189-42f0-493d-9b9e-be1045a9f4fa",
     "etag": "\"1601e900-0000-0200-0000-621f1b080000\""
}

附錄

下節提供您可以監視、更新和刪除資料流的步驟相關資訊。

監視資料流

建立資料流後,您可以監視透過它擷取的資料,以檢視有關資料流執行、完成狀態和錯誤的資訊。 如需完整的API範例,請閱讀以下指南: 使用API監控您的來源資料流.

更新您的資料流

透過向以下專案發出PATCH請求,更新資料流的詳細資訊,例如其名稱和說明,及其執行排程和相關聯的對應集 /flows 端點 Flow Service API,同時提供資料流的ID。 提出PATCH請求時,您必須提供資料流的 etagIf-Match 標頭。 如需完整的API範例,請閱讀以下指南: 使用API更新來源資料流.

更新您的帳戶

透過對執行PATCH請求,更新來源帳戶的名稱、說明和認證 Flow Service API時,提供您的基本連線ID作為查詢引數。 提出PATCH請求時,您必須提供來源帳戶的唯一值 etagIf-Match 標頭。 如需完整的API範例,請閱讀以下指南: 使用API更新您的來源帳戶.

刪除您的資料流

透過對執行DELETE請求來刪除您的資料流 Flow Service API,同時提供您要作為查詢引數的一部分刪除的資料流的ID。 如需完整的API範例,請閱讀以下指南: 使用API刪除您的資料流.

刪除您的帳戶

透過對執行DELETE請求來刪除您的帳戶 Flow Service API,同時提供您要刪除之帳戶的基本連線ID。 如需完整的API範例,請閱讀以下指南: 使用API刪除您的來源帳戶.

recommendation-more-help
337b99bb-92fb-42ae-b6b7-c7042161d089