LiquidPlanner Classic Forum

Ask a Question
Back to All

Filtering - specifically Time Filters

Posted on behalf of Tim Stewart. Original posting date 2016-09-13.

I am looking to pull all timesheets data and all timesheet entries for specific members

However I have data going back to 2012 on this workspace so I have been trying to limit this to Year to Date.

For Timesheet entries if I tested with Month To Date - setting the start but not specifying an end_date:

https://app.liquidplanner.com/api/workspaces/[my id]/timesheet_entries?start_date=2016-09-01T00:00:00Z

This works - restricting me to a much more reasonable 76 records

If I try to bring back timesheets to the same limitation

https://app.liquidplanner.com/api/workspaces/[my id]/timesheets?start_date=2016-09-01T00:00:00Z

I get an error

If I use starts= (as that is a field within timesheets) I get all results - the API is ignoring an incorrect filter and processing all records

So I try the normal date filter using the starts and ends fields

https://app.liquidplanner.com/api/workspaces/[my id]/timesheets?starts=2016-09-01&ends=2016-09-16

Doesn't work - all records returned

Similar story if I want to limit records for custom_field etc.

Do I need to use a different field reference or operator depending on the API type I am querying?

Do only some Types support the Start but No End format?

Do I need to use the filter[] format?
If so do I use the starts [date value] ends today?

Could you provide an example for the since or before, today operators in a date filter or some clearer explanation of which scenarios these can be used

If I drill in to expand the records I want theres a LOT of rows coming back but the documentation on filtering and these inconsistencies are driving me in circles. I've read all the forum posts, knowledgebase and API guide on this and the information is partial or confusing

Similarly the member filter I am trying to use is not working (returning all records)

Whilst this is much smaller I would like to limit the list to just two members on one report
https://app.liquidplanner.com/api/workspaces/62403/members?filter[]=user_name=:(user_name-1)&filter[]=user_name=:(user_name-2)