You are here: Home > Analyse > Internet Measurements > RIPE Atlas > Documentation > Latest Measurement Results API

Latest Measurement Results API

Location

The long-awaited latest measurement results API is finally available and can be found here:

https://atlas.ripe.net/api/v1/measurement-latest/<measurement-id>/

Much like the other similar API URLs, this one works by inserting a single measurement id to return JSON data.

Output Format

The output format is only slightly different from what you'd expect from the standard measurement result API call. Rather than simply dumping every result as a list, we return a series of key/value pairs in the format

{
  probe_id: [<result>],
  probe_id: [<result>],
  ...
}

This allows you to easily fetch the latest result from probe 123 by using:

my_data["123"][0]

Versioning

In case you're wondering why the format is probe_id: [<result>] and not simply probe_id: <result>, this is due to the fact that you can request up to 10 previous result values for every probe by specifying versions=n where n is a number between 1-10 inclusive:

https://atlas.ripe.net/api/v1/measurement-latest/<measurement-id>/?versions=1
{
  probe_id: [<result>],
  probe_id: [<result>],
  ...
}

https://atlas.ripe.net/api/v1/measurement-latest/<measurement-id>/?versions=2
{
  probe_id: [<result>, <result>],
  probe_id: [<result>, <result>],
  ...
}

The versions will always be returned in reverse chronological order, so requesting my_data["123"][0] will always be the most recent result, and my_data["123"][1], the second most recent.

Filtration

You can also do basic filtration by probe id simply by passing probes=probe_id,probe_id in the URL:

https://atlas.ripe.net/api/v1/measurement-latest/<measurement-id>/?probes=123,456
{
  123: [<result>],
  456: [<result>]
}

Note however that if you specify a probe id that is not part of the measurement, you'll simply get back an empty set.

Caching

Presently, we're caching this API at 5 minutes.

Future

We're working on making this process even more queryable, allowing you to request portions of a result rather than mandating the downloading of the entire thing, but this is not yet ready for production.