CRM API - list records based on presence/absence of activities

CRM API - list records based on presence/absence of activities

I've been struggling to get the following data from Zoho CRM API for quite some time now:
  1. list of records that do not have any activities (tasks) at all
  2. list of records that do not have any activities (tasks) in the future
  3. list of records that have activities (tasks), but they are overdue
I can see that the following filter in the UI, but I cannot find it's corresponding filter in the API.



My plan was to use this filter to create a custom-view and then list all records in this custom-view via the API, but strangely, this filter is not available when defining a custom-view. It is available only as an ad-hoc filter.

Getting to this data is critical for me to figure out which records are not being actioned appropriately and slipping through the cracks.