Flow Service API를 사용하여 Microsoft Dynamics을(를) Experience Platform에 연결
작성 대상:
- 개발자
Flow Service API를 사용하여 Microsoft Dynamics 소스를 Adobe Experience Platform에 연결하는 방법에 대해 알아보려면 이 안내서를 참조하십시오.
시작하기
이 안내서를 사용하려면 Adobe Experience Platform의 다음 구성 요소에 대해 이해하고 있어야 합니다.
Experience Platform API 사용
Experience Platform API를 성공적으로 호출하는 방법에 대한 자세한 내용은 Experience Platform API 시작에 대한 안내서를 참조하십시오.
다음 섹션에서는 Flow Service API를 사용하여 Experience Platform을 Dynamics 계정에 성공적으로 연결하기 위해 알아야 할 추가 정보를 제공합니다.
필요한 자격 증명 수집
Flow Service이(가) Dynamics에 연결하려면 다음 연결 속성에 대한 값을 제공해야 합니다.
자격 증명 | 설명 |
---|---|
serviceUri | Dynamics 인스턴스의 서비스 URL. |
username | Dynamics 사용자 계정의 사용자 이름입니다. |
password | Dynamics 계정의 암호입니다. |
자격 증명 | 설명 |
---|---|
servicePrincipalId | Dynamics 계정의 클라이언트 ID. 서비스 주체 및 키 기반 인증을 사용할 때 이 ID가 필요합니다. |
servicePrincipalKey | 서비스 주체 비밀 키. 서비스 주체 및 키 기반 인증을 사용할 때 이 자격 증명이 필요합니다. |
시작하기에 대한 자세한 내용은 이 Dynamics 문서를 참조하세요.
기본 연결 만들기
기본 연결은 소스의 인증 자격 증명, 연결의 현재 상태 및 고유한 기본 연결 ID를 포함하여 소스와 Experience Platform 간에 정보를 유지합니다. 기본 연결 ID를 사용하면 소스 내에서 파일을 탐색 및 탐색하고 데이터 유형 및 형식에 대한 정보를 포함하여 수집할 특정 항목을 식별할 수 있습니다.
기본 연결 ID를 만들려면 Dynamics 인증 자격 증명을 요청 매개 변수의 일부로 제공하는 동안 /connections
끝점에 대한 POST 요청을 만듭니다.
API 형식
POST /connections
기본 인증을 사용하여 Dynamics 기본 연결을 만들려면 연결의 serviceUri
, username
및 password
에 대한 값을 제공하는 동안 Flow Service API에 대한 POST 요청을 만듭니다.
요청
다음 요청은 기본 인증을 사용하여 Dynamics 소스에 대한 기본 연결을 만듭니다.
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": "Dynamics connection",
"description": "Dynamics connection using basic auth",
"auth": {
"specName": "Basic Authentication for Dynamics-Online",
"params": {
"serviceUri": "{SERVICE_URI}",
"username": "{USERNAME}",
"password": "{PASSWORD}"
}
},
"connectionSpec": {
"id": "38ad80fe-8b06-4938-94f4-d4ee80266b07",
"version": "1.0"
}
}'
auth.params.serviceUri
auth.params.username
auth.params.password
connectionSpec.id
38ad80fe-8b06-4938-94f4-d4ee80266b07
응답
성공한 응답은 고유 식별자(id
)를 포함하여 새로 만든 기본 연결을 반환합니다.
{
"id": "4cb0c374-d3bb-4557-b139-5712880adc55",
"etag": "\"9e0052a2-0000-0200-0000-5e35tb330000\""
}
서비스 사용자 키 기반 인증을 사용하여 Dynamics 기본 연결을 만들려면 연결의 serviceUri
, servicePrincipalId
및 servicePrincipalKey
에 대한 값을 제공하는 동안 Flow Service API에 POST 요청을 수행합니다.
요청
다음 요청은 기본 서비스 사용자 키 기반 인증을 사용하여 Dynamics 소스에 대한 기본 연결을 만듭니다.
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": "Dynamics connection",
"description": "Dynamics connection using key-based authentication",
"auth": {
"specName": "Service Principal Key Based Authentication",
"params": {
"serviceUri": "{SERVICE_URI}",
"servicePrincipalId": "{SERVICE_PRINCIPAL_ID}",
"servicePrincipalKey": "{SERVICE_PRINCIPAL_KEY}"
}
},
"connectionSpec": {
"id": "38ad80fe-8b06-4938-94f4-d4ee80266b07",
"version": "1.0"
}
}'
auth.params.serviceUri
auth.params.servicePrincipalId
auth.params.servicePrincipalKey
connectionSpec.id
38ad80fe-8b06-4938-94f4-d4ee80266b07
응답
응답이 성공하면 고유 식별자(id
)를 포함하여 새로 만든 연결이 반환됩니다.
{
"id": "4cb0c374-d3bb-4557-b139-5712880adc55",
"etag": "\"9e0052a2-0000-0200-0000-5e35tb330000\""
}
데이터 테이블 탐색
Dynamics 데이터 테이블을 탐색하려면 /connections/{BASE_CONNECTION_ID}/explore
끝점에 GET 요청을 만들고 기본 연결 ID를 쿼리 매개 변수의 일부로 제공합니다.
API 형식
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=root
{BASE_CONNECTION_ID}
요청
다음 요청은 기본 연결 ID가 dd668808-25da-493f-8782-f3433b976d1e
인 Dynamics 소스에 대해 사용 가능한 테이블 및 보기 목록을 검색합니다.
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/dd668808-25da-493f-8782-f3433b976d1e/explore?objectType=root' \
-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' \
응답
성공한 응답은 루트 수준에서 Dynamics개의 테이블 및 뷰 디렉터리를 반환합니다.
[
{
"type": "table",
"name": "systemuserlicenses",
"path": "systemuserlicenses",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Process Dependency",
"path": "workflowdependency",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "view",
"name": "accountView1",
"path": "accountView1",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "view",
"name": "Inactive_ACC_custom",
"path": "Inactive_ACC_custom",
"canPreview": true,
"canFetchSchema": true
}
]
기본 키를 사용하여 데이터 탐색 최적화
primaryKey
을(를) 쿼리 매개 변수의 일부로 제공하여 탐색 쿼리를 최적화할 수 있습니다. primaryKey
을(를) 쿼리 매개 변수로 포함할 때 Dynamics 테이블의 기본 키를 지정해야 합니다.
API 형식
GET /connections/{BASE_CONNECTION_ID}/explore?preview=true&object={OBJECT}&objectType={OBJECT_TYPE}&previewCount=10&primaryKey={PRIMARY_KEY}
{BASE_CONNECTION_ID}
preview
{OBJECT}
{OBJECT_TYPE}
previewCount
{PRIMARY_KEY}
요청
curl -X GET \
'https://platform-stage.adobe.io/data/foundation/flowservice/connections/dd668808-25da-493f-8782-f3433b976d1e/explore?preview=true&object=lead&objectType=table&previewCount=10&primaryKey=leadid' \
-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' \
테이블 구조 검사
특정 테이블의 구조를 검사하려면 /connections/{BASE_CONNECTION_ID}/explore
에 GET 요청을 하고 특정 테이블에 대한 경로를 쿼리 매개 변수로 제공하십시오.
API 형식
GET /connections/{BASE_CONNECTION_ID}/explore?object={TABLE_PATH}&objectType=table
{BASE_CONNECTION_ID}
{TABLE_PATH}
요청
다음 요청은 경로가 workflowdependency
인 Dynamics 테이블의 구조와 내용을 검색합니다.
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/dd668808-25da-493f-8782-f3433b976d1e/explore?object=workflowdependency&objectType=table' \
-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' \
응답
성공한 응답이 workflowdependency
경로의 내용을 반환합니다.
{
"format": "flat",
"schema": {
"columns": [
{
"name": "first_name",
"type": "string",
"meta": {
"originalType": "String"
}
},
{
"name": "last_name",
"type": "string",
"meta": {
"originalType": "String"
}
},
{
"name": "email",
"type": "string",
"meta": {
"originalType": "String"
}
}
]
}
}
보기 구조 검사
Dynamics에서 보기는 표시할 열, 각 열의 너비, 레코드 목록이 정렬되는 기본 시스템 및 목록에 표시될 레코드를 제한하는 데 적용되는 기본 필터를 참조합니다.
보기의 구조를 검사하려면 /connections/{BASE_CONNECTION_ID}/explore
에 GET 요청을 만들고 쿼리 매개 변수에 보기 경로를 지정하십시오. 또한 objectType
을(를) view
(으)로 지정해야 합니다.
API 형식
GET /connections/{BASE_CONNECTION_ID}/explore?object={VIEW_PATH}&objectType=view
{BASE_CONNECTION_ID}
{VIEW_PATH}
요청
다음 요청은 accountView1
을(를) 검색합니다.
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/dd668808-25da-493f-8782-f3433b976d1e/explore?object=accountView1&objectType=view' \
-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' \
응답
응답이 성공하면 accountView1
구조가 반환됩니다.
{
"format": "flat",
"schema": {
"columns": [
{
"name": "name",
"type": "string",
"meta": {
"originalType": "string"
},
"xdm": {
"type": "string"
}
},
{
"name": "fetchxml",
"type": "string",
"meta": {
"originalType": "string"
},
"xdm": {
"type": "string"
}
},
{
"name": "querytype",
"type": "integer",
"meta": {
"originalType": "int"
},
"xdm": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
{
"name": "userqueryid",
"type": "string",
"meta": {
"originalType": "guid"
},
"xdm": {
"type": "string"
}
}
]
}
}
엔터티 형식 보기 미리 보기
보기의 내용을 미리 보려면 /connections/{BASE_CONNECTION_ID}/explore
에 GET을 요청하고 쿼리 매개 변수에 보기 경로와 preview=true
을(를) 포함하십시오.
API 형식
GET /connections/{BASE_CONNECTION_ID}/explore?object={VIEW_PATH}&preview=true&objectType=view
{BASE_CONNECTION_ID}
{VIEW_PATH}
요청
다음 요청은 accountView1
의 내용을 미리 봅니다.
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/dd668808-25da-493f-8782-f3433b976d1e/explore?object=accountView1&preview=true&objectType=view' \
-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' \
응답
응답이 성공하면 accountView1
의 내용이 반환됩니다.
{
"format": "flat",
"schema": {
"columns": [
{
"name": "emailaddress1",
"type": "string",
"meta": {
"originalType": "string"
},
"xdm": {
"type": "string"
}
},
{
"name": "contactid",
"type": "string",
"meta": {
"originalType": "guid"
},
"xdm": {
"type": "string"
}
},
{
"name": "fullname",
"type": "string",
"meta": {
"originalType": "string"
},
"xdm": {
"type": "string"
}
}
]
},
"data": [
{
"contactid": "396e19de-0852-ec11-8c62-00224808a1df",
"fullname": "Tim Barr",
"emailaddress1": "barrtim@googlemedia.com"
}
]
}
수집 보기에 대한 소스 연결 만들기
소스 연결을 만들고 보기를 수집하려면 /sourceConnections
끝점에 대한 POST 요청을 만들고 테이블 이름을 제공한 다음 요청 본문에서 entityType
을(를) view
(으)로 지정하십시오.
API 형식
POST /sourceConnections
요청
다음 요청은 Dynamics 소스 연결을 만들고 보기를 수집합니다.
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": "Dynamics Source Connection",
"description": "Dynamics Source Connection",
"baseConnectionId": "dd668808-25da-493f-8782-f3433b976d1e",
"data": {
"format": "tabular",
"schema": null,
"properties": null
},
"params": {
"tableName": "Contacts with name TIM",
"entityType": "view"
},
"connectionSpec": {
"id": "38ad80fe-8b06-4938-94f4-d4ee80266b07",
"version": "1.0"
}
}'
응답
성공한 응답은 새로 생성된 소스 연결 ID와 해당 etag를 반환합니다.
{
"id": "e566bab3-1b58-428c-b751-86b8cc79a3b4",
"etag": "\"82009592-0000-0200-0000-678121030000\""
}
기본 키를 사용하여 데이터 흐름 최적화
기본 키를 요청 본문 매개 변수의 일부로 지정하여 Dynamics 데이터 흐름을 최적화할 수도 있습니다.
API 형식
POST /sourceConnections
요청
다음 요청은 기본 키를 contactid
(으)로 지정하는 동안 Dynamics 원본 연결을 만듭니다.
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": "Dynamics Source Connection",
"description": "Dynamics Source Connection",
"baseConnectionId": "dd668808-25da-493f-8782-f3433b976d1e",
"data": {
"format": "tabular"
},
"params": {
"tableName": "contact",
"primaryKey": "contactid"
},
"connectionSpec": {
"id": "38ad80fe-8b06-4938-94f4-d4ee80266b07",
"version": "1.0"
}
}'
baseConnectionId
data.format
params.tableName
params.primaryKey
connectionSpec.id
응답
성공한 응답은 새로 생성된 소스 연결 ID와 해당 etag를 반환합니다.
{
"id": "e566bab3-1b58-428c-b751-86b8cc79a3b4",
"etag": "\"82009592-0000-0200-0000-678121030000\""
}
다음 단계
이 자습서에 따라 Flow Service API를 사용하여 Microsoft Dynamics 기본 연결을 만들었습니다. 다음 자습서에서 이 기본 연결 ID를 사용할 수 있습니다.