Closed Bug 1144188 Opened 9 years ago Closed 9 years ago

API endpoint for KPI dashboard - Activities

Categories

(Mozilla Reps Graveyard :: reps.mozilla.org, task)

task
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: pierros, Assigned: nemo-yiannis)

References

Details

(Whiteboard: [kb=1699039] )

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
Blocks: 1140372
Whiteboard: [kb=1699039]
Group: mozilla-reps-admins
Version: next → unspecified
Assignee: nobody → jgiannelos
Merged here: https://github.com/mozilla/remo/pull/981
Status: NEW → RESOLVED
Closed: 9 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
Version: unspecified → next
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
Version: next → 463
Product: Mozilla Reps → Mozilla Reps Graveyard
You need to log in before you can comment on or make changes to this bug.