You are here: Chapter 11: FootPrints API > FootPrints Database API > FootPrints Database API Overview

FootPrints Database API Overview

NOTE

Use of these commands is not recommended as they are no longer officially supported and may not work as intended.

The FootPrints Database API is a set of commands for accessing the database directly.  Create and update Issues, perform queries, import data, and perform other tasks from a batch job, Visual Basic script or other application.  This API is uniform for all versions of FootPrints.

Setting up the Environment

In order to run any of the commands, two environment variables, CMI and CMMASTER, must be set and the FootPrints command directory must be added to your path.  Before running any Address Book commands, the ABMASTER environment variable must also be set.

Note

<footprints_root> refers to the root directory of your FootPrints system. For example, if FootPrints were installed to c:\FootprintsServiceCoreService, the <footprints_root> would be c:\FootprintsServiceCore .

If you have many Workspaces, there are many sub-directories in your database directory. You must find which directory is associated with the database you wish to access from the command line. This is done by looking at the file <FootPrints_root>/etc/MRprojects

Each line in this file corresponds to one workspace.  Find the line that has the name of the Workspace you want.  Each line in MRprojects has a path in the second field that looks like <footprints_root>/db/MASTERx, where the x is the Workspace number.  This is the path that goes into the CMMASTER variable.  (The etc/Ablist.txt file defines which Address book is used.)

For Windows Users

  1. <footprints_root>\bin must be added to your path first. This is by selecting Start | Settings | Control Panel | System.  Select the Advanced tab and then click the Environment Variables... button.  The Environment Variables pop-up is displayed.
  2. Under System Variables, click on the Path variable and then select the Edit... button.
  3. Add <footprints_root>\bin to the path by adding this string to the end of the existing string in the Variable Value field.  Remember that environment variable entries must be separated by a semi-colon.  Also remember to substitute the real location (e.g., c:\FootprintsServiceCore) for <footprints_root>.  An example of this entry might be:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\MSSQL7\BINN;c:\FootprintsServiceCore\bin

  1. Type the following from a DOS prompt:

C:\> set CMI=<footprints_root>

C:\> set CMMASTER=<footprints_root>\db\MASTERx

C:\> set ABMASTER=<footprints_root>\db\ABMASTERx

You can now run FootPrints database commands from this DOS prompt. 

Note

Spacing is important.  Make sure that there are no spaces on either side of the “=”.

For UNIX Users

From a C shell (csh) prompt, type the following:

% setenv CMI <footprints_root>

% setenv CMMASTER <footprints_root>/db/MASTERx

% setenv ABMASTER <footprints_root>/db/ABMASTERx

% set path=($CMI/bin $path)

 

See also:

Database Commands