On my fme server is a workspace for download which I can start with a webhook. I want to use that webhook in a Python Script. Are there any examples for calling the webhook and receiving the data in python?
Β
Best regards Gerhard
On my fme server is a workspace for download which I can start with a webhook. I want to use that webhook in a Python Script. Are there any examples for calling the webhook and receiving the data in python?
Β
Best regards Gerhard
Best answer by markwatsafe
HiΒ @gkvoelklβ!Β Β ThisΒ isΒ certainlyΒ possible,Β butΒ theΒ workflowΒ willΒ dependΒ onΒ theΒ typeΒ ofΒ dataΒ you'reΒ outputtingΒ fromΒ theΒ webhookΒ workspace.Β Β ForΒ example,Β areΒ youΒ planningΒ toΒ receiveΒ JSONΒ orΒ XMLΒ inΒ Python?Β Β HereΒ areΒ myΒ findingsΒ withΒ differentΒ FMEΒ ServerΒ services:
Β
DataΒ StreamingΒ Service
webhook_callΒ =Β requests.get('https://fme-server.com/fmedatastreaming/repository/workspace.fmw?PARAMETER=value&token=tokenvalue')
newFeatureΒ =Β fmeobjects.FMEFeature()
newFeature.setAttribute("response",webhook_call.text)DataΒ DownloadΒ Service
Β
PleaseΒ letΒ meΒ knowΒ ifΒ youΒ haveΒ anyΒ furtherΒ questionsΒ aboutΒ this!
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.