Measurements

Get a measurement by ID

Returns the status and results of an existing measurement. Measurements are typically available for up to six months after creation.

Tip: A link to this endpoint is returned in the Location response header when creating the measurement.

Client guidelines

As it can take a few seconds for a measurement to complete, you should use the following process for retrieving the results:

  1. Request the measurement to retrieve its status.
  2. If the status is in-progress, wait 500 milliseconds and start again at step 1. Note that it's important to wait 500 ms after receiving the response rather than using an "every 500ms" interval as for large measurements, the request itself may take a few hundred milliseconds to complete.
  3. If the status is anything other than in-progress, stop. The measurement is no longer running, and its results are final.

Important: Do not query the results of a single measurement more often than every 500 milliseconds. Sending more than two requests per second may trigger a rate limit and prevent you from accessing the results for a few seconds.

get/v1/measurements/{id}

Request

  • Base URL: https://api.globalping.io
  • URL: https://api.globalping.io/v1/measurements/{id}
  • Auth: none required

Response

A successful request returns status 200 OK and a body containing the requested measurement results.

idstring required

The measurement ID.

type'ping' | 'traceroute' | 'dns' | 'mtr' | 'http' required

The measurement type.

targetstring required

A publicly reachable measurement target. Typically a hostname, an IPv4 address, or IPv6 address, depending on the measurement type. Support for IPv6 targets is currently considered experimental.

status'in-progress' | 'finished' required

The current measurement status. Any value other than in-progress is final.

createdAtstring date-time required

The date and time when the measurement was created.

updatedAtstring date-time required

The date and time when the measurement was last updated.

probesCountinteger required

The actual number of probes that performed the measurement tests. Smaller or equal to limit, depending on probe availability.

limitinteger

The limit you specified when creating the measurement if different from the default value.

timeoutinteger

The probe-side wall-clock timeout for each test, in seconds, if different from the calculated value.

Changes

No recorded changes to this operation across all 1 revision of this API.