Thumbnail games api no longer returns result in order

I started noticing this issue today because some of my websites rely on the order/indexes of the response data instead of using the targetId. I’m not sure if this change is intentional or not.

Example GET request
https://thumbnails.roblox.com/v1/games/icons?universeIds=994732206,5203828273,1686885941&returnPolicy=PlaceHolder&size=256x256&format=Png&isCircular=false

Expected behavior: Data should be in order of the IDs that were sent in the request

1 Like

Hey @bg9,

dev here that changed this recently :wave: . While it was not intentional, the ordering of the result was never guaranteed in the first place and as you already figured out the targetId lookup is the correct solution :+1:

Sorry about the troubles this may have caused you. We’re discussing internally if we want to give a bit of a grace period with retroactive sorting according to the query parameters.

Reason for this was some internal pipelining where you’re now enjoying less than half the latency on this endpoint (especially for large payloads) :horse_racing: :partying_face:

Note: Similar optimizations are coming to more thumbnails api endpoints in the near future.

Thanks!

5 Likes

We just merged a change to update the swagger docs. With the next deploy it will be more explicit w.r.t. this behavior. For now we’ll keep the new behavior as is, because even before the Ids that do not correspond to a valid universe will be filtered out. part implied a non-stable mapping from universeIds to results array.

I’ll post here if anything around the decision changes.

Again, sorry for the inconvenience :pray:

6 Likes

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