Skip to content
Start here

Get percentiles for a traceroute test

GET/accounts/{account_id}/dex/traceroute-tests/{test_id}/percentiles

Get percentiles for a traceroute test for a given time period between 1 hour and 7 days.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Cloudflare DEX WriteCloudflare DEX ReadZero Trust ReportZero Trust Read
Path ParametersExpand Collapse
account_id: string
maxLength32
test_id: string

API Resource UUID tag.

maxLength36
Query ParametersExpand Collapse
from: string

Start time for the query in ISO (RFC3339 - ISO 8601) format

to: string

End time for the query in ISO (RFC3339 - ISO 8601) format

colo: optional string

Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.

deviceId: optional array of string

Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.

ReturnsExpand Collapse
errors: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
success: true

Whether the API call was successful.

result: optional object { hopsCount, packetLossPct, roundTripTimeMs }
hopsCount: optional Percentiles { p50, p90, p95, p99 }
p50: optional number

p50 observed in the time period

p90: optional number

p90 observed in the time period

p95: optional number

p95 observed in the time period

p99: optional number

p99 observed in the time period

packetLossPct: optional Percentiles { p50, p90, p95, p99 }
p50: optional number

p50 observed in the time period

p90: optional number

p90 observed in the time period

p95: optional number

p95 observed in the time period

p99: optional number

p99 observed in the time period

roundTripTimeMs: optional Percentiles { p50, p90, p95, p99 }
p50: optional number

p50 observed in the time period

p90: optional number

p90 observed in the time period

p95: optional number

p95 observed in the time period

p99: optional number

p99 observed in the time period

Get percentiles for a traceroute test

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dex/traceroute-tests/$TEST_ID/percentiles \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "hopsCount": {
      "p50": 0,
      "p90": 0,
      "p95": 0,
      "p99": 0
    },
    "packetLossPct": {
      "p50": 0,
      "p90": 0,
      "p95": 0,
      "p99": 0
    },
    "roundTripTimeMs": {
      "p50": 0,
      "p90": 0,
      "p95": 0,
      "p99": 0
    }
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "hopsCount": {
      "p50": 0,
      "p90": 0,
      "p95": 0,
      "p99": 0
    },
    "packetLossPct": {
      "p50": 0,
      "p90": 0,
      "p95": 0,
      "p99": 0
    },
    "roundTripTimeMs": {
      "p50": 0,
      "p90": 0,
      "p95": 0,
      "p99": 0
    }
  }
}