Delete Device DEX test
client.ZeroTrust.Devices.DEXTests.Delete(ctx, dexTestID, body) (*DeviceDEXTestDeleteResponse, error)
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:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Delete Device DEX test
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.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
option.WithAPIEmail("user@example.com"),
)
dexTest, err := client.ZeroTrust.Devices.DEXTests.Delete(
context.TODO(),
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
zero_trust.DeviceDEXTestDeleteParams{
AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dexTest.DEXTests)
}
{
"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"
}
]
}
}