Is it possible to use OttoFMS webhooks to retreive an image from a FileMaker container field that the calling service can then consume? I was thinking if we could include an additional parameter with the OttoFMS webhook URL (e.g. imageID=12345) then the OttoReceiver script could parse out that parameter and find the record based on the imageID and return the contents of the container field somehow that the calling service could then consume.
The OttoReceiver script runs when you create the record with the payload
Whatever is in that is passed as a script parameter so your script can go and find the record and get the container… But you will have to pass it back as either Base64 encoded or a sharing link, neither of which might be what you are looking for.
You also need to make sure your script does not take too long before responding so it does not think there is timeout.
Why use a web hook? why not use an OData call to a script endpoint to do the same thing?
I need to provide a URL to the third party service to retrieve the contents of the FileMaker container field from a particular record so the solution needs to be a URL only. Does OData allow me to create a URL that will run the script to find a record by a supplied parameter and return the contents of the container field?
a get to server/fmi/odata/v4/file/tablealias(key)/container/$value will return the base64 encoded container contents
if you want the streaming link, you could write a script and pass the key value, then run the DataAPI on itself to get the link, and pass that back as the result
in either case you will need to send some authentication
So may be better to send the web hook to Otto, have the OttoReceiver script take the payload, parse it and run whichever query gives you the answer the originating service is looking for
With the new version of OttFMS you can turn on your DataOI keys for OData access too, so perhaps the url might become
server/Otto/fmi/odata/v4/file/tablealias(key)/container/$value?apiKey=dk_xxxx