Exercise Tracker - URL Parameters

I don’t understand the format for the URL that should be used to retrieve the filter parameters from the user. The multiple ways I have attempted to filter the example projects’ exercise logs have all done nothing.

The example project is here: https://exercise-tracker.freecodecamp.rocks/

The way I expected it to work was that the url below would show me 20 entries for the specified user (idGoesHere) between the start of 2015 to the start of 2021. However it doesn’t filter anything, nor does any other way I try to do it so can anybody tell me the exact format it needs to perform its function.

https://exercise-tracker.freecodecamp.rocks/api/users/idGoesHere/logs?[2015-01-01][&2021-01-01][&20]

Hi @aidansabin

The [ and ] are used to denote an optional field in documentation, but you don’t include those in the actual URL format, also, a query string takes a list of key-value pairs (separated by the & symbol), so the URL should like this:

https://exercise-tracker.freecodecamp.rocks/api/users/idGoesHere/logs?from=2015-01-01&to=2021-01-01&limit=20

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.