Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

No Data Coming through Run Command Tool using curl.exe

OneandOnly13
8 - Asteroid

Hi!

 

I need to use a Run Command tool to execute a POST request to a url. This is part of an API that the tools before it will create a 10k record grouping for multiple runs via a batch macro. I have the Run Command Tool inside the batch macro so it'll run the POST call for each iteration it needs to (sometimes one but most times multiple iterations). I have the Run Command tool's Write Source setup as outputting to %temp%\temp.csv. I then need to find a way to include that temp.csv file in the command arguments field. The issue is that no data is being posted to the website through the API. Here is my working command argument if I test this with calling a file that was already created and only using the Run Command Tool in a separate workflow: -i -k --insecure -X DELETE <url> -H "Content-Type: application/json" -d @Temp.json but if I include the Run Command in the workflow that produces the data needed, it no longer works. Attached are screenshots of the workflow as well as the Write Source setup and the Run Command tool. Small admission, my curl knowledge is basic at best at the moment so my apologies if it's as simple as I have it in the wrong order.

 

Any help is appreciated!

 

2021-11-17_18-01-05.png2021-11-17_18-00-09.png2021-11-17_18-03-12.png

2 REPLIES 2
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

Have you tried doing this via the Download tool instead?

The settings will allow you to set all of these same options and you'll get a data field as your response, or you can push the response to a file.  Seems like it would be cleaner than doing it via cmd.

OneandOnly13
8 - Asteroid

Thanks for the response Patrick! I had to use the Run Command tool because the download tool wasn't providing the right JSON format that the API I was HTTPing to would accept. I ended up keeping the Run Command tool and writing the JSON file out prior to a Block Until Done tool. The Run Command tool then picks up the generated JSON file and POSTs/DELETEs as needed.

Labels