Login Deutsch

Developers welcome! The mite.api is looking forward to your precious hacking. Have a look at the detailed documentation to kick-start your coding.

Group time entries

GET /time_entries.xml?group_by=#{groups}

When accessing /time_entries, the returned results can be grouped using the parameter group_by. This parameter can contain the following values:

customer
Customer
project
Project
service
Service
user
User
day
Day
week
Week
month
Month
year
Year

Several parameters can be combined. Separate several parameters by comma (e.g.: »project,user«). The order of the parameters decides on how the results will be sorted.

GET /time_entries.xml?group_by=user
Response : 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<time-entry-groups type="array">
   <time-entry-group>
      <minutes type="integer">6</minutes>
      <revenue nil="true"></revenue>
      <user-id type="integer">1</user-id>
      <user-name>Freddy Freelancer</user-name>
      <time-entries-params>
         <user-id>1</user-id>
      </time-entries-params>
   </time-entry-group>
</time-entry-groups>

Besides the accumulated minutes and revenue, the output contains the values shared by the whole group. When grouped by user, the output will contain the user-id and the user-name, for example. Furthermore, all parameters that can be used to list individual time entries will be listed under time-entries-params.

It is possible to filter the returned list with the same parameters we introduced under time entries.