[Version bêta]{class="badge informative"}
Mise à jour d’une spécification de connexion à l’aide de l’API Flow Service
Vous pouvez mettre à jour les propriétés d’une spécification de connexion par le biais d’une opération de PUT. Lors de la mise à jour d’une spécification de connexion via une requête de PUT, le corps doit inclure tous les champs requis lors de la création d’une spécification de connexion dans une requête de POST.
Format d’API
PUT /connectionSpecs/{CONNECTION_SPEC_ID}
Requête
La requête suivante ajoute une description à la spécification de connexion en continu créée dans le tutoriel précédent.
PUT -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/f6c0de0c-0a42-4cd9-9139-8768bf2f1b55' \
-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 '{
"name": "generic-streaming",
"type": "generic-streaming",
"description": "A sample streaming source for ACME data"
"providerId": "521eee4d-8cbe-4906-bb48-fb6bd4450033",
"version": "1.0",
"attributes": {
"category": "Streaming",
"isSource": true,
"documentationLink": "https://docs.adobe.com/content/help/fr-FR/platform-learn/tutorials/data-ingestion/understanding-streaming-ingestion.html",
"uiAttributes": {
"apiFeatures": {
"updateSupported": false
}
}
},
"authSpec": [],
"name": "generic-streaming",
"permissionsInfo": {
"view": [
{
"name": "StreamingSource",
"@type": "lowLevel",
"permissions": [
"read"
]
}
],
"manage": [
{
"name": "StreamingSource",
"@type": "lowLevel",
"permissions": [
"write"
]
}
]
},
"providerId": "521eee4d-8cbe-4906-bb48-fb6bd4450033",
"sourceSpec": {
"attributes": {
"authRequired": false,
"uiAttributes": {
"documentationLink": "http://www.adobe.com/go/understanding-data-streaming-ingestion-en",
"isSource": true,
"monitoringSupported": false,
"category": {
"key": "streaming"
},
"icon": {
"key": "Generic-Streaming"
},
"description": {
"text": "Generic Streaming Connector"
},
"label": {
"text": "Generic"
},
"frequency": {
"text": "streaming"
}
}
}
},
"exploreSpec": {
"type": "StreamingConnection"
},
"type": "generic-streaming",
"version": "1.0"
}'
Réponse
Un appel réussi renvoie les détails de la spécification de connexion mis à jour, y compris son nom mis à jour.
{
"items": [
{
"id": "bdb5b792-451b-42de-acf8-15f3195821de",
"createdAt": 1667536504101,
"updatedAt": 1667536504101,
"createdBy": "{CREATED_BY}",
"updatedBy": "{UPDATED_BY}",
"createdClient": "{CREATED_CLIENT}",
"updatedClient": "{CREATED_CLIENT}",
"sandboxId": "d537df80-c5d7-11e9-aafb-87c71c35cac8",
"sandboxName": "prod",
"imsOrgId": "{ORG_ID}",
"name": "generic-streaming",
"description": "A sample streaming source for ACME data",
"providerId": "521eee4d-8cbe-4906-bb48-fb6bd4450033",
"version": "1.0",
"type": "generic-streaming",
"sourceSpec": {
"attributes": {
"authRequired": false,
"uiAttributes": {
"documentationLink": "http://www.adobe.com/go/understanding-data-streaming-ingestion-en",
"isSource": true,
"monitoringSupported": false,
"category": {
"key": "streaming"
},
"icon": {
"key": "Generic-Streaming"
},
"description": {
"text": "Generic Streaming Connector"
},
"label": {
"text": "Generic"
},
"frequency": {
"text": "streaming"
}
}
}
},
"exploreSpec": {
"type": "StreamingConnection"
},
"attributes": {
"category": "Streaming",
"isSource": true,
"documentationLink": "https://docs.adobe.com/content/help/fr-FR/platform-learn/tutorials/data-ingestion/understanding-streaming-ingestion.html",
"uiAttributes": {
"apiFeatures": {
"updateSupported": false
}
}
},
"permissionsInfo": {
"view": [
{
"@type": "lowLevel",
"name": "StreamingSource",
"permissions": [
"read"
]
}
],
"manage": [
{
"@type": "lowLevel",
"name": "StreamingSource",
"permissions": [
"write"
]
}
]
}
}
]
}
Étapes suivantes
Une fois que vous avez terminé vos mises à jour de votre spécification de connexion, vous pouvez passer à test et envoyer votre source pour l’intégration.