Skip to content
Start here

Delete Device DEX test

client.zeroTrust.devices.dexTests.delete(stringdexTestId, DEXTestDeleteParams { account_id } params, RequestOptionsoptions?): DEXTestDeleteResponse { dex_tests }
DELETE/accounts/{account_id}/dex/devices/dex_tests/{dex_test_id}

Delete a Device DEX test. Returns the remaining device dex tests for the account.

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 Write
ParametersExpand Collapse
dexTestId: string

API Resource UUID tag.

maxLength36
params: DEXTestDeleteParams { account_id }
account_id: string
maxLength32
ReturnsExpand Collapse
DEXTestDeleteResponse { dex_tests }
dex_tests?: Array<DEXTest>
data: Data { host, kind, method }

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

host: string

The desired endpoint to test.

kind: "http" | "traceroute"

The type of test.

One of the following:
"http"
"traceroute"
method?: "GET"

The HTTP request method type.

enabled: boolean

Determines whether or not the test is active.

interval: string

How often the test will run.

name: string

The name of the DEX test. Must be unique.

description?: string

Additional details about the test.

target_policies?: Array<TargetPolicy>

DEX rules targeted by this test

id: string

API Resource UUID tag.

maxLength36
default?: boolean

Whether the DEX rule is the account default

name?: string

The name of the DEX rule

targeted?: boolean
test_id?: string

The unique identifier for the test.

maxLength32

Delete Device DEX test

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
  apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});

const dexTest = await client.zeroTrust.devices.dexTests.delete(
  'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
  { account_id: '01a7362d577a6c3019a474fd6f485823' },
);

console.log(dexTest.dex_tests);
{
  "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": {
    "dex_tests": [
      {
        "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": {
    "dex_tests": [
      {
        "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"
      }
    ]
  }
}