List DEX test analytics
client.ZeroTrust.DEX.Tests.List(ctx, params) (*V4PagePagination[Tests], error)
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:
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)
List DEX test analytics
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"),
)
page, err := client.ZeroTrust.DEX.Tests.List(context.TODO(), zero_trust.DEXTestListParams{
AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"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"
}
]
}
}
}
]
}
]
}
}