But why would a web-crawler authenticate against the running live server?
Yes.... I see the curl examples... But I have my alerts sent to Jabber and Email. I want to "CLICK" on an href in the email or IM alert and have the item acked... I can't do this out of the box. I have to have do a http://intermapper/ack.cgi?q=g499cbac0:zAzzzazzzJd ... which then takes that... and does an LWP::Simple Post to covert that ID over to do a post.. (and also revealing my username/password in the process) and then grab that results and paste it into the window. It's not ideal when you have to have a running apache server on all 4 Intermapper servers just to server one CGI script. BTW, if anyone is interested #!/usr/bin/perl use strict; use CGI; use LWP::UserAgent; use HTTP::Request; use HTTP::Headers; my $q = new CGI; my $username = "XXXXXX"; my $password = "XXXXXXX"; my $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); my $h = new HTTP::Headers; $h->authorization_basic($username,$password); my $fullstring = $q->param('q'); my ($mapid,$deviceid) = split(/:/,$fullstring); my $req = HTTP::Request->new(POST => "http://intermapper:8080/$mapid/device/$deviceid/*acknowledge.cgi?message=ACKd+VIA+IM", $h); $req->content("test"); my $res = $ua->request($req); print $q->header; if ($res->is_success) { print $res->content; } else { print $res->status_line, "\n"; } Brian On Sep 1, 2010, at 9:15 AM, Richard E. Brown wrote: > --- Brian Gannon <gann...@rgmadvisors.com> wrote: > Yeah. This is one of the features I really really want. The GET to > acknowledge. Currently had to write a perl script to convert the get to a > post and repost onto the API interface. It's not the best way to do > things.... But it works > --- end of quote --- > > We thought about allowing a GET to do this, but decided against it, both for > a theoretical and a practical reason. > > - By definition, a GET request should retrieve data, but not affect the state > of the system. Obviously, ack'ing a device would change the state. > > - In practice, it's even worse: Any web crawler would *automatically* > acknowledge every device on the site. This is hardly desirable. > > So for both these reasons, we do not and will not allow a GET request to > acknowledge a device. > > I'll note that nete's HTML code (in a previous message of this thread) will > address this nicely, and that the Dev Guide also gives curl and Python > examples for doing this. (see > http://download.dartware.com/docs/DevGuide/Content/02-CustomProbes/APIAcknowledgements.htm) > > Please get back to me if you have further questions. Thanks. > > Rich Brown richard.e.br...@dartware.com > Dartware, LLC http://www.intermapper.com > 66-7 Benning Street Telephone: 603-643-9600 > West Lebanon, NH 03784-3407 Fax: 603-643-2289 > ____________________________________________________________________ > List > archives:http://www.mail-archive.com/intermapper-talk%40list.dartware.com/ > To unsubscribe: send email to: intermapper-talk-...@list.dartware.com > ____________________________________________________________________ List archives: http://www.mail-archive.com/intermapper-talk%40list.dartware.com/ To unsubscribe: send email to: intermapper-talk-...@list.dartware.com