Skip to content

Creating Measurements

To create a measurement, you POST a JSON payload to https://atlas.ripe.net/api/v2/measurements/ with three things:

  1. At least one measurement definition - what you want to measure (type, target, address family)
  2. At least one probe selection - where you want to measure from (by area, country, ASN, etc.)
  3. Optional timing and global fields - when to start/stop, one-off vs. recurring, billing

You'll need an API key with measurement creation permissions (see Authentication).

For a conceptual overview including the web UI, see User-Defined Measurements.

Simple Example

A basic ping measurement from 5 probes worldwide:

shell
curl --location 'https://atlas.ripe.net/api/v2/measurements/' \
--header 'Authorization: Key YOUR-KEY' \
--data '{
  "definitions": [
    {
      "target": "ripe.net",
      "description": "My First Measurement",
      "type": "ping",
      "af": 4
    }
  ],
  "probes": [
    {
      "requested": 5,
      "type": "region",
      "value": "europe"
    }
  ]
}'

A More Complex Example

Multiple definitions, multiple probe sets, and global timing:

json
{
    "definitions": [
        {
            "target": "www.ripe.net",
            "description": "Traceroute v6",
            "type": "traceroute",
            "af": 6,
            "resolve_on_probe": true,
            "protocol": "ICMP",
            "interval": 1800,
            "tags": ["my-example-tag"]
        },
        {
            "target": "www.ripe.net",
            "description": "Ping v4",
            "type": "ping",
            "af": 4
        }
    ],
    "probes": [
        {"requested": 10, "type": "region", "value": "europe"},
        {"requested": 5, "type": "countries", "value": "NL"},
        {"requested": 3, "type": "probes", "value": "55,19,252"},
        {"requested": 1, "type": "msm", "value": 1000002}
    ],
    "start_time": 1461807395,
    "stop_time": "2018-01-01T12:00:00Z"
}

Probe sets are additive - the API combines all of them. Here, measurements will run on 10 worldwide probes + 5 from the Netherlands + 3 specific probes + probes reused from measurement 1000002.

Global fields like start_time and stop_time propagate to all definitions that don't set them explicitly.

The Response

A successful POST returns the IDs of the created measurements, matching the order of definitions:

json
{"measurements": [12345678, 12345679]}

Common errors:

  • 403 Forbidden - invalid or missing API key
  • 400 Bad Request - invalid payload (check the error details)

What's Next