TimeTrex API and Custom Punch Fields

Discussion for TimeTrex open source community developers.
Post Reply
phineas629
Posts: 16
Joined: Tue Jan 13, 2015 12:48 am

TimeTrex API and Custom Punch Fields

Post by phineas629 »

Hi,

I see the api manual and the example online.
I want to add punches to TimeTrex but I have created additional custom fields for Punches through TimeTrex's GUI.
Couldn't figure out how to get that data pushed along with punches to my TimeTrex instance.
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: TimeTrex API and Custom Punch Fields

Post by mikeb »

You can pass custom field data in using the array keys of: 'other_id1', 'other_id2', 'other_id3', 'other_id4', 'other_id5'

The numbers 1 thru 5 correspond to the custom fields created in the GUI of course.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
phineas629
Posts: 16
Joined: Tue Jan 13, 2015 12:48 am

Re: TimeTrex API and Custom Punch Fields

Post by phineas629 »

Thanks Mike!

I'm trying to get a better understanding of the API.
But it's hard for me to manipulate the class inheritance diagram to see the different relationships.
Any advice of how I can understand the API and all the database fields I can manipulate through the api?
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: TimeTrex API and Custom Punch Fields

Post by mikeb »

Keep in mind the web interface uses the API, so one of the easiest ways is to turn on debug logging then do whatever operations you want to do through the API through the web interface, and the exact API calls will be appear in the log file.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
phineas629
Posts: 16
Joined: Tue Jan 13, 2015 12:48 am

Re: TimeTrex API and Custom Punch Fields

Post by phineas629 »

Thanks mike!

I'll take a look at the api through debugging.
Post Reply