List all Employees JSON API

Discussion for TimeTrex open source community developers.
Post Reply
tadd
Posts: 16
Joined: Wed Mar 21, 2018 7:24 am

List all Employees JSON API

Post by tadd »

I would like to get a list of employees using API. I am able to get basic information as in JSON API example. I am interested in capturing Employees First name, last name, phone number and status. just like in the employees tab on Desktop version of Timetrex.

shaunw
Posts: 7670
Joined: Tue Sep 19, 2006 2:22 pm

Re: List all Employees JSON API

Post by shaunw »

Please see more information about our API and even a specific example on obtaining employee (user) records from TimeTrex here:
https://www.timetrex.com/workforce-management-api

tadd
Posts: 16
Joined: Wed Mar 21, 2018 7:24 am

Re: List all Employees JSON API

Post by tadd »

the API only mentions how to get user data when you know something about the user like userid. to get all users you will need to append null.
$user_data = postToURL( buildURL( 'APIUser', 'getUser' ), null);

shaunw
Posts: 7670
Joined: Tue Sep 19, 2006 2:22 pm

Re: List all Employees JSON API

Post by shaunw »

By default get*() API calls return all data if you don't pass in any arguments. Arguments are only needed if you want to filter the results to reduce what is returned.

Post Reply