I'm trying to learn more about working with APIs. I thought it would be fun to use Zamzar to convert files. Their documentation is here. They've made it super easy and supplied the curl command I should use:
curl https://sandbox.zamzar.com/v1/jobs \ -u my API key: \ -X POST \ -F "source_file=@/tmp/portrait.gif" \ -F "target_format=png"
where I put in my actual API key that I got for free yesterday. When I setup the download tool, I can't quite figure out how to setup the -F part. Here is my attempt on the payload tab:
The response back from the API is :
{"errors":[{"context":{"parameter":"source_file"},"code":10,"message":"no value was specified for a mandatory parameter"}]}
Any ideas on how to get this to work? I tried using Curl.exe instead of the download tool, but I'm getting this error:
curl: (1) libcurl was built with SSL disabled, https: not supported!
Solved! Go to Solution.
See the replies by @TashaA :
https://community.alteryx.com/t5/Data-Sources/RESTful-API-using-POST-to-upload-a-file/m-p/43828
If you want to upload a file with POST, you can use cURL via the Run Command.
Thanks @Joe_Mako. It looks like the cURL.exe that I found in my Alteryx folders wasn't created with ssl support. I was able to make some headway downloading another version of cURL.
Hello,
I am trying to use --insecure/-K in download tool, but its not working out. I added the Run command tool and it gives me the key in cmd, but the download tool still gives the Error: Download (3): Error transferring data: SSL peer certificate or SSH remote key was not OK with POST request.
Need help.