This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi - I'm a complete Alteryx novice, so please be gentle with me! I'm probably asking a question that beginners ask all the time, apologies in advance.
We have third party API, and we currently use a Perl script to talk to the API and download data on a daily basis. We would like to see if we can move away from the script and have everything done within Alteryx. The API doc is:
It is RESTful, but where it differs is that the first endpoint call generates a task to start running on the server. It returns two bits of info - a status value i.e. RUNNING, and a new URL. The new URL is the url to check if the taks has finished. In the Perl script we usually sleep for 20 seconds before calling the URL, and we sleep 20 seconds between every call until the task has completed. Once it has completed the status value changes to FINSHED and we get a URL to download the actual data. The data comes down in CSV format.
Can this sort of interactive session be done in Alteryx?
Alternatively you can use the excellent Wait a Second macro which is part of the CReW macro pack.
If you start the workflow running in the second half of any given minute it should loop a few times and then stop looping at the top of the minute.
To run configure the workflow you will need to open the yxzp file and download both yxdb files, then right click on the blue macro and open it from the parent workflow, and then configure the Run command tool with the _in and _out yxdb files.
For some reason, I couldn't find a way to package these up with the workflow. You may also wonder why the run command tool isn't on the looping output... again, this is down to quirks with the Run Command tool. The end result is that you're waiting before each call not after, and there is a slight time penalty from doing this.
It's possible this solution will be a bit buggy as I haven't really tested it much but it should show you the principal of how you can achieve what you're trying to.