Skip to content
Start here

List DEX test analytics

GET/accounts/{account_id}/dex/tests/overview

List DEX tests with overview metrics

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: optional string
maxLength32
Query ParametersExpand Collapse
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.

kind: optional "http" or "traceroute"

Filter by test type

One of the following:
"http"
"traceroute"
page: optional number

Page number of paginated results

minimum1
per_page: optional number

Number of items per page

maximum50
minimum1
registration_id: optional string

Optionally filter results to a specific device registration. Must be used in combination with a single deviceId.

testName: optional string

Optionally filter results by test name

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 Tests { overviewMetrics, tests }
overviewMetrics: object { testsTotal, avgHttpAvailabilityPct, avgTracerouteAvailabilityPct }
testsTotal: number

number of tests.

avgHttpAvailabilityPct: optional number

percentage availability for all HTTP test results in response

formatfloat
avgTracerouteAvailabilityPct: optional number

percentage availability for all traceroutes results in response

formatfloat
tests: array of object { id, created, description, 13 more }

array of test results objects.

id: string

API Resource UUID tag.

maxLength36
created: string

date the test was created.

description: string

the test description defined during configuration

enabled: boolean

if true, then the test will run on targeted devices. Else, the test will not run.

host: string
interval: string

The interval at which the synthetic application test is set to run.

kind: "http" or "traceroute"

test type, http or traceroute

One of the following:
"http"
"traceroute"
name: string

name given to this test

updated: string
httpResults: optional object { resourceFetchTime }
resourceFetchTime: object { history, avgMs, overTime }
history: array of object { timePeriod, avgMs, deltaPct }
timePeriod: AggregateTimePeriod { units, value }
units: "hours" or "days" or "testRuns"
One of the following:
"hours"
"days"
"testRuns"
value: number
avgMs: optional number
deltaPct: optional number
formatfloat
avgMs: optional number
overTime: optional object { timePeriod, values }
timePeriod: AggregateTimePeriod { units, value }
units: "hours" or "days" or "testRuns"
One of the following:
"hours"
"days"
"testRuns"
value: number
values: array of object { avgMs, timestamp }
avgMs: number
timestamp: string
httpResultsByColo: optional array of object { colo, resourceFetchTime }
colo: string

Cloudflare colo

resourceFetchTime: object { history, avgMs, overTime }
history: array of object { timePeriod, avgMs, deltaPct }
timePeriod: AggregateTimePeriod { units, value }
units: "hours" or "days" or "testRuns"
One of the following:
"hours"
"days"
"testRuns"
value: number
avgMs: optional number
deltaPct: optional number
formatfloat
avgMs: optional number
overTime: optional object { timePeriod, values }
timePeriod: AggregateTimePeriod { units, value }
units: "hours" or "days" or "testRuns"
One of the following:
"hours"
"days"
"testRuns"
value: number
values: array of object { avgMs, timestamp }
avgMs: number
timestamp: string
method: optional string

for HTTP, the method to use when running the test

target_policies: optional array of DigitalExperienceMonitor { id, default, name }
id: string

API Resource UUID tag.

maxLength36
default: boolean

Whether the policy is the default for the account

name: string
targeted: optional boolean
tracerouteResults: optional object { roundTripTime }
roundTripTime: object { history, avgMs, overTime }
history: array of object { timePeriod, avgMs, deltaPct }
timePeriod: AggregateTimePeriod { units, value }
units: "hours" or "days" or "testRuns"
One of the following:
"hours"
"days"
"testRuns"
value: number
avgMs: optional number
deltaPct: optional number
formatfloat
avgMs: optional number
overTime: optional object { timePeriod, values }
timePeriod: AggregateTimePeriod { units, value }
units: "hours" or "days" or "testRuns"
One of the following:
"hours"
"days"
"testRuns"
value: number
values: array of object { avgMs, timestamp }
avgMs: number
timestamp: string
tracerouteResultsByColo: optional array of object { colo, roundTripTime }
colo: string

Cloudflare colo

roundTripTime: object { history, avgMs, overTime }
history: array of object { timePeriod, avgMs, deltaPct }
timePeriod: AggregateTimePeriod { units, value }
units: "hours" or "days" or "testRuns"
One of the following:
"hours"
"days"
"testRuns"
value: number
avgMs: optional number
deltaPct: optional number
formatfloat
avgMs: optional number
overTime: optional object { timePeriod, values }
timePeriod: AggregateTimePeriod { units, value }
units: "hours" or "days" or "testRuns"
One of the following:
"hours"
"days"
"testRuns"
value: number
values: array of object { avgMs, timestamp }
avgMs: number
timestamp: string

List DEX test analytics

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dex/tests/overview \
    -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": {
    "overviewMetrics": {
      "testsTotal": 0,
      "avgHttpAvailabilityPct": 0,
      "avgTracerouteAvailabilityPct": 0
    },
    "tests": [
      {
        "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
        "created": "created",
        "description": "description",
        "enabled": true,
        "host": "host",
        "interval": "interval",
        "kind": "http",
        "name": "name",
        "updated": "updated",
        "httpResults": {
          "resourceFetchTime": {
            "history": [
              {
                "timePeriod": {
                  "units": "hours",
                  "value": 0
                },
                "avgMs": 0,
                "deltaPct": 0
              }
            ],
            "avgMs": 0,
            "overTime": {
              "timePeriod": {
                "units": "hours",
                "value": 0
              },
              "values": [
                {
                  "avgMs": 0,
                  "timestamp": "timestamp"
                }
              ]
            }
          }
        },
        "httpResultsByColo": [
          {
            "colo": "SJC",
            "resourceFetchTime": {
              "history": [
                {
                  "timePeriod": {
                    "units": "hours",
                    "value": 0
                  },
                  "avgMs": 0,
                  "deltaPct": 0
                }
              ],
              "avgMs": 0,
              "overTime": {
                "timePeriod": {
                  "units": "hours",
                  "value": 0
                },
                "values": [
                  {
                    "avgMs": 0,
                    "timestamp": "timestamp"
                  }
                ]
              }
            }
          }
        ],
        "method": "method",
        "target_policies": [
          {
            "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
            "default": true,
            "name": "name"
          }
        ],
        "targeted": true,
        "tracerouteResults": {
          "roundTripTime": {
            "history": [
              {
                "timePeriod": {
                  "units": "hours",
                  "value": 0
                },
                "avgMs": 0,
                "deltaPct": 0
              }
            ],
            "avgMs": 0,
            "overTime": {
              "timePeriod": {
                "units": "hours",
                "value": 0
              },
              "values": [
                {
                  "avgMs": 0,
                  "timestamp": "timestamp"
                }
              ]
            }
          }
        },
        "tracerouteResultsByColo": [
          {
            "colo": "SJC",
            "roundTripTime": {
              "history": [
                {
                  "timePeriod": {
                    "units": "hours",
                    "value": 0
                  },
                  "avgMs": 0,
                  "deltaPct": 0
                }
              ],
              "avgMs": 0,
              "overTime": {
                "timePeriod": {
                  "units": "hours",
                  "value": 0
                },
                "values": [
                  {
                    "avgMs": 0,
                    "timestamp": "timestamp"
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  }
}
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": {
    "overviewMetrics": {
      "testsTotal": 0,
      "avgHttpAvailabilityPct": 0,
      "avgTracerouteAvailabilityPct": 0
    },
    "tests": [
      {
        "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
        "created": "created",
        "description": "description",
        "enabled": true,
        "host": "host",
        "interval": "interval",
        "kind": "http",
        "name": "name",
        "updated": "updated",
        "httpResults": {
          "resourceFetchTime": {
            "history": [
              {
                "timePeriod": {
                  "units": "hours",
                  "value": 0
                },
                "avgMs": 0,
                "deltaPct": 0
              }
            ],
            "avgMs": 0,
            "overTime": {
              "timePeriod": {
                "units": "hours",
                "value": 0
              },
              "values": [
                {
                  "avgMs": 0,
                  "timestamp": "timestamp"
                }
              ]
            }
          }
        },
        "httpResultsByColo": [
          {
            "colo": "SJC",
            "resourceFetchTime": {
              "history": [
                {
                  "timePeriod": {
                    "units": "hours",
                    "value": 0
                  },
                  "avgMs": 0,
                  "deltaPct": 0
                }
              ],
              "avgMs": 0,
              "overTime": {
                "timePeriod": {
                  "units": "hours",
                  "value": 0
                },
                "values": [
                  {
                    "avgMs": 0,
                    "timestamp": "timestamp"
                  }
                ]
              }
            }
          }
        ],
        "method": "method",
        "target_policies": [
          {
            "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
            "default": true,
            "name": "name"
          }
        ],
        "targeted": true,
        "tracerouteResults": {
          "roundTripTime": {
            "history": [
              {
                "timePeriod": {
                  "units": "hours",
                  "value": 0
                },
                "avgMs": 0,
                "deltaPct": 0
              }
            ],
            "avgMs": 0,
            "overTime": {
              "timePeriod": {
                "units": "hours",
                "value": 0
              },
              "values": [
                {
                  "avgMs": 0,
                  "timestamp": "timestamp"
                }
              ]
            }
          }
        },
        "tracerouteResultsByColo": [
          {
            "colo": "SJC",
            "roundTripTime": {
              "history": [
                {
                  "timePeriod": {
                    "units": "hours",
                    "value": 0
                  },
                  "avgMs": 0,
                  "deltaPct": 0
                }
              ],
              "avgMs": 0,
              "overTime": {
                "timePeriod": {
                  "units": "hours",
                  "value": 0
                },
                "values": [
                  {
                    "avgMs": 0,
                    "timestamp": "timestamp"
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  }
}