The Top endpoint works, but could use friendlier 404s and needs to have the "all-years" option removed as we can't tractably compute that (too much data)
Description
Related Objects
Event Timeline
We'll try to make the 404s easier to understand, but this is just because there's sparse data in this top endpoint. It basically needs to wait for a month or year to be fully done in order to return something other than a 404. So for a specific day it works, for the days we have (September -> October right now):
https://wikimedia.org/api/rest_v1/metrics/pageviews/top/en.wikipedia/all-access/2015/10/01
Gotcha!
(Could you give a workable per-article example too? Missing data is fine but I wanna have this API client working for launch ;))
The per article one should be much easier to guess, except RESTBase is very finnicky about trailing slashes, that's usually what's happening if you see {items:[]}
So do use this:
But do not use this:
Cool!
On the actual bug, https://github.com/wikimedia/restbase/pull/391 hopefully fixes the all-years element.
This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!
For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)