ec2u / data

EC2U Knowledge Hub
https://data.ec2u.eu
Apache License 2.0
2 stars 0 forks source link

API request with query parameters returns under 100 results per page #23

Closed hmaskat17 closed 2 years ago

hmaskat17 commented 2 years ago

Steps to reproduce

  1. Make a request to https://data.ec2u.eu/events/*?.offset=0&.limit=100

What did you expect to happen?

API returns an array with 100 results

What did actually happen?

API returns only a few results (< 100).

Did you find any workaround for the bug?

No

Would you share any observation or additional context about the bug?

Poitiers and Salamanca were recently updated with new events. We noticed these latest events have not been integrated into the MMT system yet and are missing from the App. We are trying to find a reason why they were not imported to the MMT database. It seems our import script that fetches from the Knowledge Hub API (https://data.ec2u.eu/events/*?.offset=0&.limit=100) is not working correctly when using the offset and limit query parameters. It is returning fewer results than normal. Currently, when fetching all event data it returns only 254 events.

Fetching with the updated parameter set to 10th of May https://data.ec2u.eu/events/*?.offset=0&.limit=100&>updated=2022-05-10T00:04:13.048Z returns only 8 results.

Fetching with the updated parameter set to 10th of May without the offset and limit parameters https://data.ec2u.eu/events/*?>updated=2022-05-10T00:04:13.048Z returns 157 results.

@ec2u/mmt

knoan commented 2 years ago

Unable to reproduce after the latest upgrades. Review pagination code and results seem consistent:

@hmaskat17 will close unless you are able to reproduce with current data.

hmaskat17 commented 2 years ago

I tested some requests and it seems to be working normally now, thanks! @knoan