Page MenuHomePhabricator

Recommendation API does not respect the count query parameter
Closed, ResolvedPublicBUG REPORT

Description

As per documentation fo recommendation API https://en.wikipedia.org/api/rest_v1/#/Recommendation/get_data_recommendation_article_creation_translation__from_lang___seed_article_
If count is passed, then that many results are returned. But it looks like count param is ignored.

For example

https://en.wikipedia.org/api/rest_v1/data/recommendation/article/creation/translation/es/Luna?count=3

expects only 3 results, but 24 results are given.

Related Objects

Event Timeline

Change 707203 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/restbase@master] Recommendation API: Pass the count query parameter

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

Language team has found a workaround for this issue in our Section Translation tool, but fixing this in the source would be better.

Change 707203 abandoned by Santhosh:

[mediawiki/services/restbase@master] Recommendation API: Pass the count query parameter

Reason:

this is not the repository!

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

Apparently, this project is maintained at github. So submitted a pull request there https://github.com/wikimedia/restbase/pull/1293

Mentioned in SAL (#wikimedia-operations) [2021-08-10T12:17:24Z] <ppchelko@deploy1002> Started deploy [restbase/deploy@5791a7a]: Add count parameter to recommendations API T287227

Mentioned in SAL (#wikimedia-operations) [2021-08-10T12:54:43Z] <ppchelko@deploy1002> Finished deploy [restbase/deploy@5791a7a]: Add count parameter to recommendations API T287227 (duration: 37m 18s)

Pchelolo claimed this task.