Customer-statistics method to retreive for a date range


#1

Hi

I would like to call your api for customer-statistics to retrieve the stats. I can make the call successfully but how can I call it for a date range and is this the correct api call to get all stats as per the statistics on the customer view(i.e. the sessions; usage per day; FUP stats).

Thanks


#2

Hi Ryan, there are filters that you can use in API calls. For example you den define the period for statistics.
The description is here - https://splynx.docs.apiary.io/#introduction/search,-order,-limit,-and-offset


#3

Thanks for the response. I am unable to retrieve the stats for an hourly range however or even daily as per your admin tool?


#4

Hi, the stats that are available are sessions statistics.
How often your sessions are closed ? Is it pppoe sessions or it’s Mikrotik API accounting sessions ?
Filter settings allow you to display sessions via API for the period XX.XX.XXXX from to XX.XX.XXXX


#5

I would like to access the statistics hourly, daily, weekly as per your admin console which shows the graphs on the right of the customer statistics.


#6

Graph is shown for statistics per Day if I’m correct.
Daily/hourly and weekly - this is the small FUP counter table. I’m not sure how to get it from api. @ex do you have any idea ?


#7

Hi guys Still no feedback?


#8

For graphs you can use direct RRD file:
/var/www/splynx/system/rrd/db/services / .rrd

https://splynx.docs.apiary.io/#reference/customers/custom-services/customers-statistics
this you can use for per session user statistics.

https://splynx.docs.apiary.io/#reference/fup/fup-counter-collection/list-all-fup-counters
this you can use for FUP statistics.

Usage per day - not available yet for API (already in dev plan and will be available in next updates)