Commmand-line Options for RemoteAccess

You can call InterMapper RemoteAccess from a command line, and control a significant number of functions. This can be useful for automating the updating of maps, or for various testing purposes.

InterMapper RemoteAccess currently supports the following command-line arguments:

Argument

Description

-host --host <HOST>

connect to the specified HOST

-port --port <PORT>

connect to the specified PORT on HOST (defaults to 8181)

-map --map <MAP_NAME>

load the specified map(s) from HOST (separate map names with ":")

-f --file <FILE_NAME>

open the specified shortcut file

-d --debug <DEBUG_CONFIG_FILE>

use the specified configuration file to configure debugging output

-dmax --dmax <MAX_CHARS>

set the maximum number of characters in the debug window

-D<name>=<value>

set a system property

-user --user <USER>

log in as USER

-pass --pass <PASSWORD>

log in as USER with PASSWORD

-version --version

print product version

-env --env

print out system properties

-h -? --help

print this help message

 -import --import <FILE_NAME>

import the specified file (use - for stdin)

-export --export <EXPORT-SPEC>

export the specified data to stdout.

Note: Data for all maps is exported.

-ignore-cert-check

accept all server SSL certificates without prompting

-importmap --importmap <FILE_NAME>

import the specified map.

-exportmap --exportmap <MAP_ID>

export the specified map

Note: The easiest way to get the map ID is to look in the Maps folder in the InterMapper Settings folder. Each map name has a prefix that begins with "g". The text between the "g" and the hyphen ("-") is the Map ID.

Examples for Import commands

To import to a specified server, IM Remote is invoked as follows: 

java  -jar <jar-file> --host <intermapper-server> [--user <username> --pass <password>] --import <import-file> 

The example below reads imported data from newdata.tab.

java  -jar intermapper_remoteaccess.jar --host big.dartware.com --user admin --pass adminpw --import newdata.tab

The example below reads imported data from stdin.

java  -jar intermapper_remoteaccess.jar --host big.dartware.com --user admin --pass adminpw --import -

The stdin form of the --import option allows Unix users to create self-contained executable files that import stuff: 

#!/usr/bin/java 
 -jar intermapper_remoteaccess.jar --host big.dartware.com --import -
#import blah blah blah
blah blah blah
blah blah blah

One use for this would be to automate testing of InterMapper Server.

Examples for Export commands

To export from a specified server, IM Remote is invoked as follows:

java  -jar <jar-file> --host <intermapper-server> [--user <username> --pass <password>] \
  --export "format=<output-type> table=<table-name> fields=<field-list>

The example below writes exported data to stdout.

java -jar intermapper_remoteaccess.jar --host big.dartware.com --user admin --pass adminpw --export  "format=tab table=devices fields=*"