Api random return always the same order

When I set a GET API call with the sort_field set to _random_sorting, the returned list of users is always the same, in the same order.

Just tried this out using another API and the results were returned (seemingly) randomly. Will try and think of what the source problem may be.

When using _random_sorting i get a different list of user, but if i repeat the call i expect to get a different list of users every time, this is not happening, same list.

Which API are you using? May be a bit easier to debug if you post screenshots or a link to the issue in a public app.

I simply did this GET API call,

You can see the user _id of the first result,
I then check that there are more users that fits the search

Then I repeat the API CALL and hope for different results

No luck, the same.

@dan1 Can you confirm that you get different results every time? This has been done in stoplight.io but I am creating my app in dropdource, and i am getting the same result. Thanks for the help. I don’t know what i am missing.

Got it, thanks for letting me know this was in stoplight.io. Had assumed you were using an external API within a Bubble app, not the other way around. (That’s why it was working).

Though I’m also seeing the same as you in stoplight. No randomness to the sort order (as far as I can tell).

Well, that’s the thing with computer generated “random” numbers. Sounds like the RNG is using the same seed over and over. That’s a thing. Submit a bug report/RFE (asking for a SEED parameter) I suppose.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.