2

How I can get one random item from endpoint using EVE REST API? Is it possible? I tried ?sort=rand but without success and I have no idea how to use $sample variable in EVE's REST query.

Llex
  • 1,770
  • 1
  • 12
  • 27
  • 1
    You could do this by creating a custom endpoint and then registering as a blueprint in the application. Inside the custom endpoint you can do whatever you want using pymongo directly for the query. This example is not about it exactly, but shows how to use a blueprint https://docs.python-eve.org/en/stable/snippets/hooks_blueprints.html. – gcw Dec 19 '19 at 11:30

0 Answers0