Contacts
Sales: 603-546-6751
Email: sales@cairnapps.com

General:

Services:

Resources:

The Handshake

Endpoint: https://www.dumpster.software/controller.html.

The first step in any interaction is the Box Tracker handshake. Here you will submit the user name from your static IP Address and the system will respond with a JSON that includes:

Arguments Req Data Type Example
command Y N/A cmdBoxTPortalHandShake
username Y N/A to be issued
password Y N/A to be issued

Box Tracker Response:: A JSON with the following fields:

Field Example Explanation
status 200 See the status code section
errorString ERROR: Invalid Session Key What if anything went wrong
sessionKey SEFhbsefjhDSCuu74g Identifies the session at Box Tracker. Sessions last 5 minutes unless they are kept alive with subsequent requests



Sample Code ( Perl ):

     #!/usr/bin/perl
     use strict; 
     use LWP::UserAgent;
     use Data::Dumper; 
     use JSON;  
     use URI::Encode qw(uri_decode uri_encode); 

     my $destination; 

     my %fields = ( 
          command   => 'cmdBoxTPortalHandShake', 
          username  => "username", 
          password  => "password"
     );  

     my @args = (); 

     foreach my $key (keys %fields) { 
          my $value = uri_encode($fields{$key});  
          push @args, "$key=$value"; 
     }

     my $queryString = join('&', @args);  
     $destination = "https://www.dumpster.software/controller.html?$queryString"; 

     my $ua = LWP::UserAgent->new; 
     my $response =  $ua->request(HTTP::Request->new(GET => $destination));

     my $json = JSON->new(); 
     my $obj = $json->decode($response->content);  

     print Data::Dumper->Dump([$obj]);