Skip to content
Start here

List Device DEX tests

zero_trust.devices.dex_tests.list(DEXTestListParams**kwargs) -> SyncV4PagePaginationArray[DEXTestListResponse]
GET/accounts/{account_id}/dex/devices/dex_tests

Fetch all DEX tests

Security

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
account_id: str
maxLength32
kind: Optional[Literal["http", "traceroute"]]

Filter by test type

One of the following:
"http"
"traceroute"
page: Optional[float]

Page number of paginated results

minimum1
per_page: Optional[float]

Number of items per page

maximum50
minimum1
test_name: Optional[str]

Filter by test name

ReturnsExpand Collapse
class DEXTestListResponse:
data: Data

The configuration object which contains the details for the WARP client to conduct the test.

host: str

The desired endpoint to test.

kind: Literal["http", "traceroute"]

The type of test.

One of the following:
"http"
"traceroute"
method: Optional[Literal["GET"]]

The HTTP request method type.

enabled: bool

Determines whether or not the test is active.

interval: str

How often the test will run.

name: str

The name of the DEX test. Must be unique.

description: Optional[str]

Additional details about the test.

target_policies: Optional[List[TargetPolicy]]

DEX rules targeted by this test

id: str

API Resource UUID tag.

maxLength36
default: Optional[bool]

Whether the DEX rule is the account default

name: Optional[str]

The name of the DEX rule

targeted: Optional[bool]
test_id: Optional[str]

The unique identifier for the test.

maxLength32

List Device DEX tests

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_email=os.environ.get("CLOUDFLARE_EMAIL"),  # This is the default and can be omitted
    api_key=os.environ.get("CLOUDFLARE_API_KEY"),  # This is the default and can be omitted
)
page = client.zero_trust.devices.dex_tests.list(
    account_id="01a7362d577a6c3019a474fd6f485823",
)
page = page.result[0]
print(page.test_id)
{
  "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": [
    {
      "data": {
        "host": "https://dash.cloudflare.com",
        "kind": "http",
        "method": "GET"
      },
      "enabled": true,
      "interval": "30m",
      "name": "HTTP dash health check",
      "description": "Checks the dash endpoint every 30 minutes",
      "target_policies": [
        {
          "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
          "default": true,
          "name": "name"
        }
      ],
      "targeted": true,
      "test_id": "372e67954025e0ba6aaa6d586b9e0b59"
    }
  ]
}
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": [
    {
      "data": {
        "host": "https://dash.cloudflare.com",
        "kind": "http",
        "method": "GET"
      },
      "enabled": true,
      "interval": "30m",
      "name": "HTTP dash health check",
      "description": "Checks the dash endpoint every 30 minutes",
      "target_policies": [
        {
          "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
          "default": true,
          "name": "name"
        }
      ],
      "targeted": true,
      "test_id": "372e67954025e0ba6aaa6d586b9e0b59"
    }
  ]
}