On 14/03/14 15:34, John Bond wrote:
I would like to request an additional API call which just returns the latest results for a specific measurement. For use cases I would point you to the "RIPE Atlas - Map Visualisations²[1]. I have also seen places in the dnsmon beta where you only show the latest results. this would also be very useful for trouble shooting, if I see an issue its inconvenient to download xMB of json data just to see the whats going on now.
I wrote this call yesterday actually, though it'll still be a few weeks before it sees the light of day. We recently updated our datastore table structure to allow simpler querying of the latest results, so this call is now relatively low-cost to our infrastructure. I'm currently in the process of porting it to work against all of our measurement maps, including the new measurement pages, so they will probably be released at the same time.
An additional feature would be to ask for a result for X seconds in the past, the call would return a result closest to that time. This is for investigating historic events, if I have an issue that lasts one hour I would normally only need one result to perform the initial investigation. This would also be useful to have a history/timeline function to the maps[1].
Unfortunately, because of how we store the data, we can't simply grab a perfect set of results nearest time X. At best, I can give you that which you've already accomplished with your snippet of code here: Take all results within a designated window, loop over them, throwing out duplicates by probe id, returning the remainder. It would require the server to do much of the work you've managed to do client-side, in only a few lines, so there isn't a lot of motivation on our side to do it... yet. We do have intentions to make the maps you mentioned historically relevant, at which point such a call may make more sense. I can't make any promises here though. Keep an eye on the list and we'll announce when the new latest call is ready :-)