Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Having Issues getting Download Tool to work with NOAA API

mreinsch
7 - Meteor

I used to download xml from the NOAA API http://alerts.weather.gov/cap/us.php?x=0. I then parsed it out and drew geo fences to store it with some of our other data. Now when I go to download it seems that something has changed. I am unable to get it to work with the download tool. I switched the URL to look at this address https://api.weather.gov/alerts/active. It seemed that I could not get to the raw xml with the other url through explorer. However, I am still getting an access denied message. I have attached the workflow to show you what I am talking about. Any help is greatly appreciated.

 

Thanks

Matt

3 REPLIES 3
mreinsch
7 - Meteor

add this header to the download tool so that it knows the browser you want to use is chrome.

 

name: user-agent

value: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36

KevinP
Alteryx Alumni (Retired)

@mreinsch You can actually set the User-Agent to anything. This API requires that the User-Agent be provided, but doesn't seem to care what it is set to. So you could set the value to 'Alteryx Designer 11.5' (or your installed version) to more accurately reflect the actual agent, or you could set it to 'I am Groot' if you wanted just to have some fun with it.

 

Additionally I am starting to see this situation more often with open/public API's. It seems that while they don't require any form of authentication that more and more often they are requiring a User-Agent be provided, and if one isn't provided they fail the request in some way. The most common response codes I see for this issue are 400, 401, or 403. 

SGolnik
11 - Bolide
11 - Bolide

Ya'll just saved me so much time! This is my first project using an API and this is the exact one I'm using and I was stuck in the same place. I love the community!

Labels