[Beta]{class="badge informative"}
Flow Service API를 사용하여 흐름 사양 업데이트
새 연결 사양 ID를 생성한 후 데이터 흐름을 생성하려면 이 ID를 흐름 사양에 추가해야 합니다.
흐름 사양에는 흐름이 지원되는 소스 및 대상 연결 ID, 데이터에 적용해야 하는 변환 사양, 흐름을 생성하는 데 필요한 예약 매개 변수 등 흐름을 정의하는 정보가 포함됩니다. /flowSpecs
끝점을 사용하여 흐름 사양을 편집할 수 있습니다.
다음 문서에서는 셀프 서비스 소스용 Flow Service API(Streaming SDK)를 사용하여 흐름 사양을 검색하고 업데이트하는 방법에 대한 단계를 설명합니다.
시작하기
계속하기 전에 시작 안내서를 검토하여 관련 문서에 대한 링크, 이 문서의 샘플 API 호출 읽기 지침 및 Experience Platform API를 성공적으로 호출하는 데 필요한 필수 헤더에 대한 중요 정보를 확인하십시오.
흐름 사양 조회 lookup
generic-streaming
템플릿으로 만든 원본은 모두 GenericStreamingAEP
흐름 사양을 사용합니다. 이 흐름 사양은 /flowSpecs/
끝점에 대한 GET 요청을 만들고 e77fde5a-22a8-11ed-861d-0242ac120002
의 flowSpec.id
을(를) 제공하여 검색할 수 있습니다.
API 형식
GET /flowSpecs/e77fde5a-22a8-11ed-861d-0242ac120002
요청
다음 요청은 e77fde5a-22a8-11ed-861d-0242ac120002
흐름 사양을 검색합니다.
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/flowSpecs/e77fde5a-22a8-11ed-861d-0242ac120002' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
응답
성공적인 응답은 질의된 플로우 사양의 상세내역을 반환합니다.
{
"items": [
{
"id": "e77fde5a-22a8-11ed-861d-0242ac120002",
"name": "GenericStreamingAEP",
"providerId": "521eee4d-8cbe-4906-bb48-fb6bd4450033",
"version": "1.0",
"sourceConnectionSpecIds": [
"e77fd9d2-22a8-11ed-861d-0242ac120002"
],
"targetConnectionSpecIds": [
"c604ff05-7f1a-43c0-8e18-33bf874cb11c"
],
"optionSpec": {
"name": "OptionSpec",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"errorDiagnosticsEnabled": {
"title": "Error diagnostics.",
"description": "Flag to enable detailed and sample error diagnostics summary.",
"type": "boolean",
"default": false
},
"partialIngestionPercent": {
"title": "Partial ingestion threshold.",
"description": "Percentage which defines the threshold of errors allowed before the run is marked as failed.",
"type": "number",
"exclusiveMinimum": 0
},
"inletUrl": {
"title": "Inlet Url.",
"description": "Inlet Url which defines the streaming endpoint.",
"type": "string"
}
}
}
},
"transformationSpecs": [
{
"name": "Mapping",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "defines various params required for different mapping from source to target",
"properties": {
"mappingId": {
"type": "string"
},
"mappingVersion": {
"type": "string"
}
}
}
}
],
"attributes": {
"isSourceFlow": true,
"flacValidationSupported": true,
"frequency": "streaming",
"uiAttributes": {
"apiFeatures": {
"updateSupported": true,
"flowRunsSupported": true
}
}
},
"permissionsInfo": {
"manage": [
{
"@type": "lowLevel",
"name": "StreamingSource",
"permissions": [
"write"
]
}
],
"view": [
{
"@type": "lowLevel",
"name": "StreamingSource",
"permissions": [
"read"
]
}
]
}
}
]
}
플로우 사양 업데이트 update
PUT 작업을 통해 플로우 사양의 필드를 갱신할 수 있습니다. PUT 요청을 통해 흐름 사양을 업데이트할 때 본문에는 POST 요청에서 새 흐름 사양을 만들 때 필요한 모든 필드가 포함되어야 합니다.
sourceConnectionSpecIds
배열에 추가해야 합니다. 이렇게 하면 새 소스가 기존 플로우 사양에서 지원되므로 새 소스로 데이터 흐름 생성 프로세스를 완료할 수 있습니다.API 형식
PUT /flowSpecs/e77fde5a-22a8-11ed-861d-0242ac120002
요청
다음 요청은 연결 사양 ID bdb5b792-451b-42de-acf8-15f3195821de
을(를) 포함하도록 e77fde5a-22a8-11ed-861d-0242ac120002
의 흐름 사양을 업데이트합니다.
PUT -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/e77fde5a-22a8-11ed-861d-0242ac120002' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
-d '{
"id": "e77fde5a-22a8-11ed-861d-0242ac120002",
"name": "GenericStreamingAEP",
"providerId": "521eee4d-8cbe-4906-bb48-fb6bd4450033",
"version": "1.0",
"sourceConnectionSpecIds": [
"e77fd9d2-22a8-11ed-861d-0242ac120002",
"bdb5b792-451b-42de-acf8-15f3195821de"
],
"targetConnectionSpecIds": [
"c604ff05-7f1a-43c0-8e18-33bf874cb11c"
],
"optionSpec": {
"name": "OptionSpec",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"errorDiagnosticsEnabled": {
"title": "Error diagnostics.",
"description": "Flag to enable detailed and sample error diagnostics summary.",
"type": "boolean",
"default": false
},
"partialIngestionPercent": {
"title": "Partial ingestion threshold.",
"description": "Percentage which defines the threshold of errors allowed before the run is marked as failed.",
"type": "number",
"exclusiveMinimum": 0
},
"inletUrl": {
"title": "Inlet Url.",
"description": "Inlet Url which defines the streaming endpoint.",
"type": "string"
}
}
}
},
"transformationSpecs": [
{
"name": "Mapping",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "defines various params required for different mapping from source to target",
"properties": {
"mappingId": {
"type": "string"
},
"mappingVersion": {
"type": "string"
}
}
}
}
],
"attributes": {
"isSourceFlow": true,
"flacValidationSupported": true,
"frequency": "streaming",
"uiAttributes": {
"apiFeatures": {
"updateSupported": true,
"flowRunsSupported": true
}
}
},
"permissionsInfo": {
"view": [
{
"@type": "lowLevel",
"name": "StreamingSource",
"permissions": [
"read"
]
}
],
"manage": [
{
"@type": "lowLevel",
"name": "StreamingSource",
"permissions": [
"write"
]
}
]
}
}'
응답
성공한 응답은 업데이트된 sourceConnectionSpecIds
목록을 포함하여 쿼리된 흐름 사양의 세부 정보를 반환합니다.
{
"id": "e77fde5a-22a8-11ed-861d-0242ac120002",
"updatedAt": 1633393222979,
"updatedBy": "1633393222979",
"updatedClient": "{UPDATED_CLIENT}",
"sandboxId": "{SANDBOX_ID}",
"sandboxName": "{SANDBOX_NAME}",
"imsOrgId": "{ORG_ID}",
"name": "GenericStreamingAEP",
"providerId": "521eee4d-8cbe-4906-bb48-fb6bd4450033",
"version": "1.0",
"sourceConnectionSpecIds": [
"e77fd9d2-22a8-11ed-861d-0242ac120002"
],
"targetConnectionSpecIds": [
"c604ff05-7f1a-43c0-8e18-33bf874cb11c"
],
"optionSpec": {
"name": "OptionSpec",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"errorDiagnosticsEnabled": {
"title": "Error diagnostics.",
"description": "Flag to enable detailed and sample error diagnostics summary.",
"type": "boolean",
"default": false
},
"partialIngestionPercent": {
"title": "Partial ingestion threshold.",
"description": "Percentage which defines the threshold of errors allowed before the run is marked as failed.",
"type": "number",
"exclusiveMinimum": 0
},
"inletUrl": {
"title": "Inlet Url.",
"description": "Inlet Url which defines the streaming endpoint.",
"type": "string"
}
}
}
},
"transformationSpecs": [
{
"name": "Mapping",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "defines various params required for different mapping from source to target",
"properties": {
"mappingId": {
"type": "string"
},
"mappingVersion": {
"type": "string"
}
}
}
}
],
"attributes": {
"isSourceFlow": true,
"flacValidationSupported": true,
"frequency": "streaming",
"uiAttributes": {
"apiFeatures": {
"updateSupported": true,
"flowRunsSupported": true
}
}
},
"permissionsInfo": {
"manage": [
{
"@type": "lowLevel",
"name": "StreamingSource",
"permissions": [
"write"
]
}
],
"view": [
{
"@type": "lowLevel",
"name": "StreamingSource",
"permissions": [
"read"
]
}
]
}
}
]
}
다음 단계
새 연결 사양이 적절한 흐름 사양에 추가되면 이제 새 소스 테스트 및 제출로 진행할 수 있습니다. 자세한 내용은 새 소스 테스트 및 제출에 대한 안내서를 참조하십시오.