Page MenuHomePhabricator

End date not included
Closed, ResolvedPublic1 Estimated Story Points

Description

Per https://wikimedia.org/api/rest_v1/?doc#!/Pageviews_data/get_metrics_pageviews_per_article_project_access_agent_article_granularity_start_end the documentation states that the end date is "The date of the last day to include, in YYYYMMDD format". I read this to mean that if I for example set the end date to "20160331", the response will include the number of views for that date. However, if I send the following request to the API, data for March 31 is not included:
https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/all-agents/Barack%20Obama/daily/20160318/20160331

The API has the data, because the following request will include it:
https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/all-agents/Barack%20Obama/daily/20160319/20160401

I suspect that at this point, the API's behaviour isn't changing, so perhaps the documentation needs to be changed?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Milimetric edited projects, added Analytics-Kanban; removed Pageviews-API, Analytics.

Change 281982 had a related patch set uploaded (by Milimetric):
Fix date range for per-article

https://gerrit.wikimedia.org/r/281982

Thanks for the bug report, @Nettrom. The patch I'm submitting should fix this, the documentation is the intended behavior. We will merge and deploy this hopefully this week.

The bug is more clearly seen with this URL, which includes 2016-03-31:

https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/all-agents/Barack%20Obama/daily/20160330/2016033100

Change 281982 merged by Milimetric:
Fix date range for per-article

https://gerrit.wikimedia.org/r/281982

Milimetric set the point value for this task to 1.Apr 12 2016, 4:14 PM