Retrieve a total or count of result from API


(Pete Johnson) #1

In my application, I am using DataTables to paginate through Matomo Scheduled Reports. I am retrieving the Schedule Reports via API using ScheduledReports.getReports endpoint. The problem I am having is that there doesn’t seem to be a way to retrieve the total count of Scheduled Reports. For example, if I want to paginate through Scheduled Reports 10 at a time, DataTables needs the total amount to correctly do so and display pagination correctly.

I believe this is a problem for other endpoints as well, I would think there would be a way to get this total especially since Matomo gives you filter_limit and filter_offset options.