Command-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 ":")

 -import --import <FILE_NAME>

import the specified file (use - for stdin)

-importmap --importmap <FILE_NAME>

import the specified map.

-export --export <EXPORT-SPEC>

export the specified data to stdout.

Note: Data for all maps is exported.

-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.

-f --file <FILE_NAME>

open the specified shortcut file

-d --debug <DEBUG_CONFIG_FILE>

use the specified configuration file to configure debugging output

-D<name>=<value>

set a system property

-user --user <USER>

log in as USER

-pass --pass <PASSWORD>

log in as USER with PASSWORD

-ignore-cert-check

accept all server SSL certificates without prompting

-agree-to-license

accept the End User License Agreement

-version --version

print product version

-env --env

print out system properties

-test --test [TIMEOUT]

test the connection - automatically quit after TIMEOUT seconds

-h -? --help

print this help message

Windows Users

The syntax for Windows users is essentially the same as the Linux/Unix examples below, except that the command line requires the full Windows path to InterMapper's Java installation (rather than any other installations of Java that might exist on the machine.) The following example sets the working directory to the .jar file, then invokes java with the .jar file:

cd "[jar file location]"
"C:\Program Files\InterMapper\java\bin\java" -jar \[jar file name].jar 

Remember to use this approach for all of the examples below, replacing java with the full path to the InterMapper Java installation.

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=*"