Open cdupont opened 6 years ago
Solution could be to retrieve more sensors from Orion, and apply the limit after filtering.
With request /sensors?limit=100?offset=100
:
-> retrieve all sensors from Orion (with several requests if more than 1000)
-> filter them with KC permissions
-> eliminate offset
number of sensors
-> return limit
number of sensors
This technique might be slow because we retrieve a lot of sensors and ask permissions for all.
When retrieving a number of sensors, less might be returned. For example, retrieving 20 sensors might yield 16. It's because we retrieve 20 sensors from Orion database, and then remove the one you don't have access to. So the remainder is 16.