Page 1 of 1

Using TimeTrex API tools

Posted: Mon Apr 18, 2022 2:26 pm
by stephenmoore33
Hello,

I am trying to import/update employees with TimeTrex API tools.

How do I create a map file exactly?

Re: Using TimeTrex API tools

Posted: Mon Apr 18, 2022 3:14 pm
by shaunw
Easiest way is to go through the web interface Import Wizard and create the mapping there, save it as a specific name (preferably without spaces or special characters), then you can use the "import.php" file's "-export_map <name>" parameter to export the saved mapping to a file, which you can then use to import from the command line.

Re: Using TimeTrex API tools

Posted: Mon May 09, 2022 5:22 pm
by stephenmoore33
Can you please give me an example of a statement with the -export_name API_MAP for an employee import?

Thank you

Re: Using TimeTrex API tools

Posted: Tue May 10, 2022 8:05 am
by shaunw
It would be something similar to this:

Code: Select all

php import.php -server "https://mycompany.com/timetrex/api/json/api.php" -username admin -password securepass -object User -export_map 
MySavedMap