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 markw
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!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.