Cercare una specifica di flusso
Tutte le origini create con il modello generic-streaming
utilizzano la specifica di flusso GenericStreamingAEP
. Questa specifica di flusso può essere recuperata effettuando una richiesta di GET all'endpoint /flowSpecs/
e fornendo flowSpec.id
di e77fde5a-22a8-11ed-861d-0242ac120002
.
Formato API
GET /flowSpecs/e77fde5a-22a8-11ed-861d-0242ac120002
Richiesta
La richiesta seguente recupera la specifica di flusso 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}'
Risposta
In caso di esito positivo, la risposta restituisce i dettagli della specifica di flusso sottoposta a query.
{
"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"
]
}
]
}
}
]
}
Aggiornare una specifica di flusso
È possibile aggiornare i campi di una specifica di flusso tramite un'operazione PUT. Quando si aggiorna una specifica di flusso tramite una richiesta PUT, il corpo deve includere tutti i campi necessari per la creazione di una nuova specifica di flusso in una richiesta POST.
sourceConnectionSpecIds
delle specifiche di flusso corrispondenti alla propria origine. In questo modo la nuova origine sarà supportata da una specifica di flusso esistente, consentendo di completare il processo di creazione del flusso di dati con la nuova origine.Formato API
PUT /flowSpecs/e77fde5a-22a8-11ed-861d-0242ac120002
Richiesta
La richiesta seguente aggiorna la specifica di flusso di e77fde5a-22a8-11ed-861d-0242ac120002
per includere l'ID della specifica di connessione bdb5b792-451b-42de-acf8-15f3195821de
.
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"
]
}
]
}
}'
Risposta
In caso di esito positivo, la risposta restituisce i dettagli della specifica di flusso sottoposta a query, incluso l'elenco aggiornato di 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"
]
}
]
}
}
]
}