Skip to content
Start here

Get details for a specific traceroute test run

client.ZeroTrust.DEX.TracerouteTestResults.NetworkPath.Get(ctx, testResultID, query) (*DEXTracerouteTestResultNetworkPathGetResponse, error)
GET/accounts/{account_id}/dex/traceroute-test-results/{test_result_id}/network-path

Get a breakdown of hops and performance metrics for a specific traceroute test run

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
ParametersExpand Collapse
testResultID string

API Resource UUID tag.

maxLength36
query DEXTracerouteTestResultNetworkPathGetParams
AccountID param.Field[string]

unique identifier linked to an account

maxLength32
ReturnsExpand Collapse
type DEXTracerouteTestResultNetworkPathGetResponse struct{…}
Hops []DEXTracerouteTestResultNetworkPathGetResponseHop

an array of the hops taken by the device to reach the end destination

TTL int64
ASN int64optional
Aso stringoptional
IPAddress stringoptional
Location DEXTracerouteTestResultNetworkPathGetResponseHopsLocationoptional
City stringoptional
State stringoptional
Zip stringoptional
Mile DEXTracerouteTestResultNetworkPathGetResponseHopsMileoptional
One of the following:
const DEXTracerouteTestResultNetworkPathGetResponseHopsMileClientToApp DEXTracerouteTestResultNetworkPathGetResponseHopsMile = "client-to-app"
const DEXTracerouteTestResultNetworkPathGetResponseHopsMileClientToCfEgress DEXTracerouteTestResultNetworkPathGetResponseHopsMile = "client-to-cf-egress"
const DEXTracerouteTestResultNetworkPathGetResponseHopsMileClientToCfIngress DEXTracerouteTestResultNetworkPathGetResponseHopsMile = "client-to-cf-ingress"
const DEXTracerouteTestResultNetworkPathGetResponseHopsMileClientToISP DEXTracerouteTestResultNetworkPathGetResponseHopsMile = "client-to-isp"
Name stringoptional
PacketLossPct float64optional
formatfloat
RTTMs int64optional
ResultID string

API Resource UUID tag.

maxLength36
DeviceName stringoptional

name of the device associated with this network path response

TestID stringoptional

API Resource UUID tag.

maxLength36
TestName stringoptional

name of the tracroute test

Get details for a specific traceroute test run

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  networkPath, err := client.ZeroTrust.DEX.TracerouteTestResults.NetworkPath.Get(
    context.TODO(),
    "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    zero_trust.DEXTracerouteTestResultNetworkPathGetParams{
      AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", networkPath.Hops)
}
{
  "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": {
    "hops": [
      {
        "ttl": 0,
        "asn": 0,
        "aso": "aso",
        "ipAddress": "ipAddress",
        "location": {
          "city": "city",
          "state": "state",
          "zip": "zip"
        },
        "mile": "client-to-app",
        "name": "name",
        "packetLossPct": 0,
        "rttMs": 0
      }
    ],
    "resultId": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "deviceName": "deviceName",
    "testId": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "testName": "testName"
  }
}
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": {
    "hops": [
      {
        "ttl": 0,
        "asn": 0,
        "aso": "aso",
        "ipAddress": "ipAddress",
        "location": {
          "city": "city",
          "state": "state",
          "zip": "zip"
        },
        "mile": "client-to-app",
        "name": "name",
        "packetLossPct": 0,
        "rttMs": 0
      }
    ],
    "resultId": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "deviceName": "deviceName",
    "testId": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "testName": "testName"
  }
}