Fix the pageview API "top" spec and 404 reporting {slug}
Open, LowPublic

Description

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)

Ironholds updated the task description. (Show Details)
Ironholds raised the priority of this task from to Needs Triage.
Ironholds added a project: Analytics-Backlog.
Ironholds added a subscriber: Ironholds.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 29 2015, 3:51 AM

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

Milimetric renamed this task from Are the per-article or top-100 lists meant to be working in the pageviews API yet? to Fix the pageview API "top" spec and 404 reporting {slug}.Oct 30 2015, 3:54 PM
Milimetric updated the task description. (Show Details)
Milimetric claimed this task.
Milimetric set Security to None.

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:

https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/all-agents/Breakfast/daily/2015100100/2015101000

But do not use this:

https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/all-agents/Breakfast/daily/2015100100/2015101000/

Cool!

On the actual bug, https://github.com/wikimedia/restbase/pull/391 hopefully fixes the all-years element.

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptJan 12 2016, 7:44 PM
Milimetric triaged this task as Normal priority.Feb 18 2016, 6:28 PM
Milimetric moved this task from Incoming to Modern Event Platform on the Analytics board.
Nuria added a subscriber: Nuria.Oct 31 2016, 3:45 PM

We can remove trailing backslashes on aqs, I think the 404 issues are taken care of.

Nuria lowered the priority of this task from Normal to Low.