How does one specify the number of data you would like to see when doing a get request

Hi, I am new to postman I need some help defining a search results.

I have a test endpoint for 10 users I want to be able to only view 5 of those users.

What I have tried using setting the limit variable to 5, the size variable to 5 but I am still getting 10 users back in my body results.

I have search on other topics but most results is telling me to use limit variable and size but this does not seem to work.
Please help.
Thank you

Hey @Shamras

Welcome to the community! :trophy:

Features like filtering or searching don’t automatically come with every endpoint, if the API hasn’t been implemented that way then it would never work.

As that’s a public test example endpoint, the functionality for it is quite limited. You can find the basic docs here:

If you want to just practice against a public API which has some filtering options available, you could try this one:

I see thank you for this, so there isn’t another way of doing it can you not specify something in the body with a java script very curious about that. Asking this what happens if a client gives you an api like the test one I used was wondering how would I handle that if that is one of my tests.

Thanks for the other api appreciate it.

Each APIs implementation is different - There could be filtering using the URL Params or possibly as part of the Request Body. The person/team who created it will know what it should and shouldn’t do.

Just taking those 2 example APIs, they are quite simple in terms of complexity but both have been implemented differently and the functionality for each one is not the same.

Ideally, you would have documentation for the whole API that would specify the behaviour of each endpoint. Without that, it’s just guesswork. :smiley:

1 Like