09-11-2015 09:18 AM
Hi,
I use OpenDNS family shield and really appreciate the ability to view the blocked list, but don't often take the time to log in and actually view it. I'd like to simplify this by making an API call to retrieve the daily blocked list, and send it as an email notification. What I haven't been able to find is a simple way to make this API call.
I recognize that, when logged in, the URL is similar to this: https://dashboard.opendns.com/stats/all/topdomains/2015-09-11/blocked.print, of course using the date of the day I'm interested in. The trouble is the login process. Ideally I'd be able to perform an HTTP GET to that URL (or some similar URL), providing my username and password in the Authentication header. Unfortunately, a GET to that URL just results in a redirect to the login html page.
I've looked at the code used in this project: https://github.com/opendns/opendns-fetchstats, and while it would seem to work, it's also very brittle. Having to capture and parse html forms and cookies is incredibly inefficient and prone to break the next time there are changes to the website.
Is there a REST API which I can use for this purpose? If not, is there another method that would allow me to do an automated pull of the blocked report?
Thanks in advance!
09-11-2015 10:16 AM
See here: https://support.opendns.com/entries/21691004-opendns-fetchstats
You can fully automate everything.
09-11-2015 12:03 PM
Thanks rotblitz. I see how this could be done using fetchstats, I'm just concerned that the method that fetchstats is using to authenticate is likely to break anytime there is a change to the opendns website and was hoping that there was a more direct (stateless) method of accomplishing the same thing.
I'm thinking about creating a web application that could simplify this process for myself and others, since it's clearly something people want to do but is not a straight-forward process for non-technical users. I could use the same method that fetchstats does to negotiate a login, but would prefer not to go that route if there is a better alternative.
10-27-2020 04:38 AM
@bbcoder Did you ever make that web application you were speaking about back in 2015?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide