Hi, I would like to find measurements matching some specific conditions, so I tried to use the measurement API documented here: https://atlas.ripe.net/docs/rest/ However, filters don't seem to have the intended effect. For instance, I tried to restrict to a specific range of starting time: https://atlas.ripe.net/api/v1/measurement/?start_time__gte=1443654000&start_time_lte=1446336000 but looking at the first result (measurement ID 1411440), its start time is 1564618500, which is way outside of the requested range. Similarly when filtering by type: https://atlas.ripe.net/api/v1/measurement/?type=2 type=2 is supposed to be IPv4 traceroute, but the first result is measurement ID 1001, which is an IPv4 ping. Am I using the API incorrectly, or is there a bug somewhere? Thanks, Baptiste
Baptiste,
On 15 Apr 2016, at 18:11, Baptiste Jonglez <bjonglez@illyse.org> wrote:
Hi,
I would like to find measurements matching some specific conditions, so I tried to use the measurement API documented here:
https://atlas.ripe.net/docs/rest/
However, filters don't seem to have the intended effect. For instance, I tried to restrict to a specific range of starting time:
https://atlas.ripe.net/api/v1/measurement/?start_time__gte=1443654000&start_time_lte=1446336000 There is small type in your start_time__lte query-parameter. It should have double underscores between `start_time` and `lte`. It will work then
but looking at the first result (measurement ID 1411440), its start time is 1564618500, which is way outside of the requested range.
Similarly when filtering by type:
https://atlas.ripe.net/api/v1/measurement/?type=2 type should be the name of the type as a string `?type=tracertoue`
Also, I would like to advise you to use the v2 API from now on, we’re going to deprecate v1. There is a manual for V2 at https://atlas.ripe.net/docs/api/v2/tutorial/ <https://atlas.ripe.net/docs/api/v2/tutorial/> and there is reference documentation at https://atlas.ripe.net/docs/api/v2/reference/ <https://atlas.ripe.net/docs/api/v2/reference/>. This is till in beta, url’s for the documentation will change but it will be available then be linked from https://atlas.ripe.net/docs/ <https://atlas.ripe.net/docs/> greetings, Jasper den Hertog
Hi Jasper, On Mon, Apr 18, 2016 at 09:18:49AM +0200, Jasper den Hertog wrote:
On 15 Apr 2016, at 18:11, Baptiste Jonglez <bjonglez@illyse.org> wrote:
I would like to find measurements matching some specific conditions, so I tried to use the measurement API documented here:
https://atlas.ripe.net/docs/rest/
However, filters don't seem to have the intended effect. For instance, I tried to restrict to a specific range of starting time:
https://atlas.ripe.net/api/v1/measurement/?start_time__gte=1443654000&start_time_lte=1446336000 There is small type in your start_time__lte query-parameter. It should have double underscores between `start_time` and `lte`. It will work then
but looking at the first result (measurement ID 1411440), its start time is 1564618500, which is way outside of the requested range.
Similarly when filtering by type:
https://atlas.ripe.net/api/v1/measurement/?type=2 type should be the name of the type as a string `?type=tracertoue`
You're right, with the corrected parameters, it works fine... I guess it's bad luck that I made a mistake in each of my two attempts.
Also, I would like to advise you to use the v2 API from now on, we’re going to deprecate v1.
There is a manual for V2 at https://atlas.ripe.net/docs/api/v2/tutorial/ <https://atlas.ripe.net/docs/api/v2/tutorial/> and there is reference documentation at https://atlas.ripe.net/docs/api/v2/reference/ <https://atlas.ripe.net/docs/api/v2/reference/>. This is till in beta, url’s for the documentation will change but it will be available then be linked from https://atlas.ripe.net/docs/ <https://atlas.ripe.net/docs/>
Ok, thank you for the links. By the way, even the new API does not complain when passing invalid parameters (for instance "type=2" above). Shouldn't it return an error when a parameter is incorrect? Thanks, Baptiste
participants (2)
-
Baptiste Jonglez
-
Jasper den Hertog