Public API endpoint (not advertised) based on the new API Request /api/kpi_activities/? query possible parameters: - Country - Initiative - Category (functional area) - Week span (start week, end week) Response (json) - Total to date - Total this week (and percentage change with previous) - Total this quarter so far (and percentage change since start of quarter) - Graph weeks numbers (for each week in the time span: -- Week # Total
Version: next → unspecified
Merged here: https://github.com/mozilla/remo/pull/981
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/remo https://github.com/mozilla/remo/commit/4b41a147d6f56cf26cfe35518048a2631630647f [Fix bug 1144188] Expose API endpoint for activities KPI. * Add APIView with the stats required for the activities KPI * Enable filtering on `country`, `functional_areas__name`, `campaign__name` * Use a generic KPI serializer since output is similar to all endpoints * Use consistent query params in all API endpoints * Use `query_params` instead of soon to be deprecated `QUERY_PARAMS` * Add helper method to calculate quarter dates /w tests * Add comments to make calculations more readable
Verified on stage: * The end-point is present, exporting the numbers specified in the description. * Verified that the numbers are correct by querying the database for the weeks displayed in the kpi diagram.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.