Alteryx Designer Desktop Discussions

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

Alteryx API call, 302 Found

LEXQ2005
8 - Asteroid

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:

LEXQ2005_1-1628593897594.png

I also attached my Alteryx workflow to this post. 

 

10 REPLIES 10
mceleavey
17 - Castor
17 - Castor

Hi @LEXQ2005 ,

the URL appears to be unreachable from outside the company firewall, this means you'll need to pass in your login credentials in the Download tool.

 

@TheOC , can you provide any help on this?

 

M.



Bulien

TheOC
15 - Aurora
15 - Aurora

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?


Bulien
jrgo
14 - Magnetar

@LEXQ2005 

 

Try adding the constant Content-Type:application/json to your headers.

 

jrgo_0-1628606680515.png

 

LEXQ2005
8 - Asteroid

@TheOC @mceleavey 

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:

LEXQ2005_0-1628674412191.png

 

LEXQ2005
8 - Asteroid

@jrgo 

I added the Header as you suggested to the workflow, still do not download the data successfully.

Attached is the workflow with headers added.

 

TheOC
15 - Aurora
15 - Aurora

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


Bulien
LEXQ2005
8 - Asteroid

@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)

LEXQ2005_0-1628676369023.png

 

jrgo
14 - Magnetar

@LEXQ2005 

 

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). 

jrgo_0-1628717421020.png

 

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. 

jrgo_1-1628718036280.png

 

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

LEXQ2005
8 - Asteroid

@jrgo 

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:

LEXQ2005_0-1628808265389.png

 

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. 

 

 

 

 

Labels