Hello @intertex,
I’m afraid there is no good textual documentation of the routes at this moment, but since the WP Rest API is discoverable you can just go to your website’s REST endpoint and work from there:
For example: https://www.kokoanalytics.com/wp-json/koko-analytics/v1 (if you visit in Firefox then you get pretty-printed JSON output).
This shows an overview of the available endpoints and their arguments. In short:
- GET /wp-json/koko-analytics/v1/stats: total number of visitors and pageviews between two dates, grouped by date (day)
- GET /wp-json/koko-analytics/v1/totals: total number of visitors and pageviews between two dates
- GET /wp-json/koko-analytics/v1/posts: total number of visitors and pageviews between two dates, grouped by post
- GET /wp-json/koko-analytics/v1/posts: number of visitors and pageviews between two dates, grouped by referrer
start_date
and end_date
arguments are optional, always in YYYY-MM-DD
format, and default to the 1st of the current month up to the current day.
You can also find the most up-to-date documentation possible directly from the code here: https://github.com/ibericode/koko-analytics/blob/master/src/class-rest.php
Hope that helps, good luck!