Hi @brent_frakes ,
In FME Server there are two types of Webhook.
1. Create a Webhook from a Workspace
This is a URL endpoint generated to send data to FME Server via a GET or POST request. The data being the workspace submission under a specific transformation service.
This type of Webhook will generate a token because FME Server authorization is required to grant access to the service, workspace, and any other items used by the workspace e.g. resources or connections.
2. Webhook Trigger in Automations
This is a URL endpoint that is unique to the Webhook trigger and can be set up to receive data from another application. As it is receiving rather than sending data, it must be requested using POST, and the upload body must include the message.
This webhook type does not generate an API token because there are no permissions required on specific items in FME Server to be able to receive the incoming message.
When you say are testing the webhook trigger - are you submitting this request using POST and specifying the message body e.g. using the HTTPCaller or some other application like Postman?
Hi Holly,
I think I am confused about what I should provide in the message body since there isn't anything I want to communicate other than to trigger the process to run. What I am currently doing (albeit incorrectly) is:
First, copy the following webhook url --> e.g.,
<WebhookURL>
Second, call it using python:
import requests as r
r.post('<WebhookURL>',
verify=False)
Hi Holly,
I think I am confused about what I should provide in the message body since there isn't anything I want to communicate other than to trigger the process to run. What I am currently doing (albeit incorrectly) is:
First, copy the following webhook url --> e.g.,
<WebhookURL>
Second, call it using python:
import requests as r
r.post('<WebhookURL>',
verify=False)
Hi @brent_frakes ,
It is not possible to trigger a webhook without including a message, you'll receive a 500 Internal Server Error reporting 'an unhandled exception has occurred due to some unexpectedly omitted information'.
So in this case you'll need to specify something in the body, then in FME Server don't use the 'Message Content' key and nothing will be done with the message value, but it should trigger successfully.
In later versions of FME Server I think we have made some improvements to the workflow you are looking to create. We have introduced a manual trigger that has a Rest API endpoint, and this does not require a message value to perform the trigger.
Whoop! That worked. Here is the python snippet using the requests package and the webhook url that I copied from FME Server. As suggested, I just created a dummy message:
import requests as r
r.post(
'<WebhookURL>',
verify=False,
data = {'thanks': 'for the help'})
I get a 202 warning, but everything ran successfully
Hi @brent_frakes ,
It is not possible to trigger a webhook without including a message, you'll receive a 500 Internal Server Error reporting 'an unhandled exception has occurred due to some unexpectedly omitted information'.
So in this case you'll need to specify something in the body, then in FME Server don't use the 'Message Content' key and nothing will be done with the message value, but it should trigger successfully.
In later versions of FME Server I think we have made some improvements to the workflow you are looking to create. We have introduced a manual trigger that has a Rest API endpoint, and this does not require a message value to perform the trigger.
Hi,
Would you please do me a favor regarding the posts I added regarding webhooks: would you please obfuscate the webhook url and scrub out the domain information
Thanks,
Brent
Hi @brent_frakes ,
It is not possible to trigger a webhook without including a message, you'll receive a 500 Internal Server Error reporting 'an unhandled exception has occurred due to some unexpectedly omitted information'.
So in this case you'll need to specify something in the body, then in FME Server don't use the 'Message Content' key and nothing will be done with the message value, but it should trigger successfully.
In later versions of FME Server I think we have made some improvements to the workflow you are looking to create. We have introduced a manual trigger that has a Rest API endpoint, and this does not require a message value to perform the trigger.
Hi @brent_frakes ,
Sorry I just saw this message! I've updated your previous comment and this one. For future reference I believe you can edit your own posts by clicking on the downward-facing arrow in the top right corner of each post.