MAPRAPI (MAPS Report API)

MAPRAPI allows you to access an API-enabled report by using an Evisions-developed executable called MAPRAPI (MAPS Report API). This program is distributed as C source code and is intended to be compiled on a UNIX server. 3rd-party applications can use MAPRAPI to call an Argos report and save the results to a specified location. It may be used in conjunction with shell scripts for maximum flexibility.

You can download the MAPRAPI source code and instructions from the Evisions Support site.

Compiling MAPRAPI

Place the .c file on the UNIX server in the location where you want to make the API call from. Rename it to maprapimain.c.

Navigate to the directory where maprapimain.c is located and compile it using the following command:

cc -DOPSYS_UNIX -omaprapi maprapimain.c

Note: Update the command as necessary if you use a compiler other than cc.

Some flavors of UNIX may require one or more of the following flags:

-lsocket

-lnsl

To enable debugging, compile with the following flag:

-DDEBUG

If compilation was successful, you will see an executable called maprapi in the directory. Run the program with no parameters or switches in order to verify it compiled correctly and to display the usage instructions.

Executing MAPRAPI

A call to MAPRAPI takes the following form:

maprapi host port url output_file_name [optional]

where maprapi is the name of the executable, and each entry after it is a parameter.

Required Parameters

Optional Parameters

URL Parameters

URL parameters are appended to the end of the url component of the MAPRAPI call. Each URL parameter must have an ampersand (&) before the name of the parameter.

Sample MAPRAPI Call

Depending on your configuration, a call to MAPRAPI will look similar to:

maprapi maps.school.edu 27467 'http://maps.school.edu:8080/mrr?report=DOJM5WFD6ALRNAFMTQTHYOCF2K6KVWHTZSVL6LWQYXKFJIOAWEFJIF&PARAMETER1=AAA&PARAMETER2=BBB&REPORTFORMAT=PDF' ReportOutput.pdf timeout=60