I was trying to do an API call using Alteryx Designer from a company’s internal URL. But I was not able to download anything, run to an HTTP/1.1 302 Found error.
When I enter the URL in a web browser, it shows below (partial):
*Removed Image*
The Download tool result is:
I also attached my Alteryx workflow to this post.
hey @mceleavey and @LEXQ2005
I suspect its very similar to what is found in this thread:
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Download-tool-not-working/td-p/619851
I cannot run the workflow as i don't have access to that URL, but i would suspect it would require Selenium in the Python tool - to replicate a user using the site.
is there any additional information within the output fields?
I read the article in your reply before posting my question here. I think it is a different use case. There is no additional information within my Download output field. The result of the download is like this:
I added the Header as you suggested to the workflow, still do not download the data successfully.
Attached is the workflow with headers added.
hey @LEXQ2005
There is additional information in the 'Download Data' field, are you able to output that into a CSV, it may include information of the issue.
Cheers,
TheOC
In the Download tool configuration, when I select download to a file, attached is the data written to a file.
(BTW: I downloaded the data as .csv, but when attached the csv file to this post, this website gives me the below message. Thus I converted it to .xlsx for posting here)
It might be that the get request is not satisfying the endpoints authentication requirements as I'm seeing some login error messaging in the file you shared. When you access that URL from a web browser, it's likely supplying the connection with your domain credentials automatically (Windows Auth).
You may try entering in your domain credentials in the domain\username format along with your windows password. no guarantee this will work though as the API may require authentication to be included in the request (i.e. request token).
Also, if you expand what's shown in the "DownloadHeaders" field (where the first line returns "HTTP/1.1 302 Found") what else is contained in the fields value? From doing some googling, 302 found usually refers to that there's a redirect link. My thought being that if there may be a different URL that may need to be parsed out of that field that can then be pushed into another download tool. I ran the URL https://google.com through the download tool and the DownloadHeaders included a 301 message saying it's permanently moved and the next line (when looking at the field in "Cell Viewer" (you can double-click the field value to show)) shows the permanent location.
Again, no guarantees here, but give you some additional troubleshooting ideas to explore.
If none of those help, I think you'll need to refer to the service provide hosting that API for additional guidance.
Hope this helps!
Jimmy
I added my workspace log in user name and password to Download tool Connection, do not get any more results.
Double click DownlaodHeaders cell shows below message, no valid url is in the message:
I was thinking that was I given a wrong url? Or maybe the authentication to the data is not my login username and password? -If so, how to explain that when I paste the url to a web browser, it does return some json format data, without asking my username and password.