Project

General

Profile

REST API - filtering time entries

Added by Fayez Naccache over 12 years ago

Hello,

Using the REST API, is there a way to filter time entries by any field?

It is not viable to request the totality of the time entries, and process them one by one to filter by a simple user_id or project.
What about if I want to filter time entries by month?

Is there any solution?

Thanks for any feedback!


Replies (11)

RE: REST API - filtering time entries - Added by Knut Meyer over 12 years ago

Hi Fayez,

do you found an solution for this?

I'm also interested in filtering time entries in REST API.

Thanks,
Knut

RE: REST API - filtering time entries - Added by Fayez Naccache over 12 years ago

Hello,

I needed to make Read queries to generate reports with PHP.
So since it was just safe SELECT queries, I turned to connect directly to Redmine database.
Not worth invoking REST API.

RE: REST API - filtering time entries - Added by Knut Meyer over 12 years ago

Hi,

thanks for your prompt reply.

Knut

RE: REST API - filtering time entries - Added by Chad B over 11 years ago

I created a ticket for this today. #13275 - "Add query parameters/filter for listing time entries via REST API"

RE: REST API - filtering time entries - Added by Juozapis Juozapauskiksi about 11 years ago

I need this also.
How redmine team chooses issues to execute? :)

RE: REST API - filtering time entries - Added by Juozapis Juozapauskiksi about 11 years ago

Maybe somebody have a tip what has to be changed to accomplish this task?

RE: REST API - filtering time entries - Added by V Lindell about 9 years ago

It is already possible to filter the time entries by adding a GET parameters, the documentation of the API is lacking behind and should be updated according to this information.

For example it is possible to filter on the spent on value "/time_entries.xml?spent_on=><2015-06-01|2015-06-30". Have not investigate all the alternatives but asumption is that other filtering options works also.

RE: REST API - filtering time entries - Added by Tommaso Visconti about 9 years ago

It's also possible to filter by user id:

/time_entries.json?user_id=<ID>
/time_entries.json?user_id=me

This is totally undocumented!!!

RE: REST API - filtering time entries - Added by Eugene Terekhov almost 9 years ago

V Lindell wrote:

For example it is possible to filter on the spent on value "/time_entries.xml?spent_on=><2015-06-01|2015-06-30". Have not investigate all the alternatives but asumption is that other filtering options works also.

This syntax doesn't work for created_on and updated_on fields.

RE: REST API - filtering time entries - Added by Valentin Rudikov over 8 years ago

Hello! Also it would be good to support filtering by multiple users:
/time_entries.json?user_id=[123,456]
It will reduce requests count - no need to query server multiple times(for each user)
Posted to #13275

    (1-11/11)