How to Install TimeTrex Remote API Tools

Home / Installation Help
TimeTrex On-Site server software includes all the necessary API tools to utilize the API, however in cases where you want to access the TimeTrex API from a remote computer, or access the API of a TimeTrex Cloud Hosted account, please follow these instructions.

Installing TimeTrex Remote API Tools:

  1. Download the TimeTrex Remote API Tools.
  2. Keep in mind that you will need to have PHP installed on whichever computer you wish to run these tools from.

    Installing PHP on Windows:
    1. Download PHP for windows here:
    2. Once downloaded you will need to extract the PHP files to a directory, such as C:\php\
    3. Rename the file "C:\php\php.ini-production" to "C:\php\php.ini".
    4. Edit the newly renamed php.ini file and uncomment the lines by removing the semicolon from the beginning of the line:
  3. Extract the to C:\timetrex_remote_tools
  4. Once you have PHP installed and the TimeTrex tools extracted you can see a list of arguments for each tool by running the tool with the help flag, here is an example:
    C:\php\php C:\timetrex_remote_tools\tools\import\import.php --help

Example Usages:

Importing Employees:

Before using the import tool we highly recommend going through an import within the TimeTrex application at least once to make it easier to map your import file columns.

To do this first login to the TimeTrex application then click Company -> Import in the menu along the top of the screen, this will bring up the import wizard which will step you through the import process, be sure to save the map settings on the column mapping step.
  *Warning: If you do go through the entire import wizard on your live installation this will import data into your TimeTrex application.

Once you have saved the column mapping with the import wizard you will be able to export it to be used with the command line.

Here is an example of exporting a saved mapping named "Default" with the import type "User":
C:\php\php C:\timetrex_remote_tools\tools\import\import.php -server -username admin -password abc123 -object User -export_map Default C:\Temp\

You should now be able import employees using newly exported mapping file using a command similar to this:
C:\php\php C:\timetrex_remote_tools\tools\import\import.php -server -username admin -password abc123 -object User C:\Temp\ C:\temp\data_to_import.csv

If you want to update existing employees and import new employees in a single operation, use a command similar to this that specifies the "-f update" argument:
C:\php\php C:\timetrex_remote_tools\tools\import\import.php -server -username admin -password abc123 -object User -f update C:\Temp\ C:\temp\data_to_import.csv

Importing Punches:

Importing punches can be accomplished in a similar way as importing employee records described above. Follow those instructions for exporting a mapping file, then you can import punches with a command similar to this:
C:\php\php C:\timetrex_remote_tools\tools\import\import.php -server -username admin -password abc123 -object Punch C:\Temp\ C:\temp\data_to_import.csv

If you wish to utilize the API directly to programmatically perform actions within TimeTrex that are not available from the existing tools, please see our API usage examples.