## List DEX test analytics `zero_trust.dex.tests.list(TestListParams**kwargs) -> SyncV4PagePagination[Optional[Tests]]` **get** `/accounts/{account_id}/dex/tests/overview` List DEX tests with overview metrics ### Parameters - `account_id: str` - `colo: Optional[str]` Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. - `device_id: Optional[SequenceNotStr[str]]` Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param. - `kind: Optional[Literal["http", "traceroute"]]` Filter by test type - `"http"` - `"traceroute"` - `page: Optional[float]` Page number of paginated results - `per_page: Optional[float]` Number of items per page - `test_name: Optional[str]` Optionally filter results by test name ### Returns - `class Tests: …` - `overview_metrics: OverviewMetrics` - `tests_total: int` number of tests. - `avg_http_availability_pct: Optional[float]` percentage availability for all HTTP test results in response - `avg_traceroute_availability_pct: Optional[float]` percentage availability for all traceroutes results in response - `tests: List[Test]` array of test results objects. - `id: str` API Resource UUID tag. - `created: str` date the test was created. - `description: str` the test description defined during configuration - `enabled: bool` if true, then the test will run on targeted devices. Else, the test will not run. - `host: str` - `interval: str` The interval at which the synthetic application test is set to run. - `kind: Literal["http", "traceroute"]` test type, http or traceroute - `"http"` - `"traceroute"` - `name: str` name given to this test - `updated: str` - `http_results: Optional[TestHTTPResults]` - `resource_fetch_time: TestHTTPResultsResourceFetchTime` - `history: List[TestHTTPResultsResourceFetchTimeHistory]` - `time_period: AggregateTimePeriod` - `units: Literal["hours", "days", "testRuns"]` - `"hours"` - `"days"` - `"testRuns"` - `value: int` - `avg_ms: Optional[int]` - `delta_pct: Optional[float]` - `avg_ms: Optional[int]` - `over_time: Optional[TestHTTPResultsResourceFetchTimeOverTime]` - `time_period: AggregateTimePeriod` - `values: List[TestHTTPResultsResourceFetchTimeOverTimeValue]` - `avg_ms: int` - `timestamp: str` - `http_results_by_colo: Optional[List[TestHTTPResultsByColo]]` - `colo: str` Cloudflare colo - `resource_fetch_time: TestHTTPResultsByColoResourceFetchTime` - `history: List[TestHTTPResultsByColoResourceFetchTimeHistory]` - `time_period: AggregateTimePeriod` - `avg_ms: Optional[int]` - `delta_pct: Optional[float]` - `avg_ms: Optional[int]` - `over_time: Optional[TestHTTPResultsByColoResourceFetchTimeOverTime]` - `time_period: AggregateTimePeriod` - `values: List[TestHTTPResultsByColoResourceFetchTimeOverTimeValue]` - `avg_ms: int` - `timestamp: str` - `method: Optional[str]` for HTTP, the method to use when running the test - `target_policies: Optional[List[DigitalExperienceMonitor]]` - `id: str` API Resource UUID tag. - `default: bool` Whether the policy is the default for the account - `name: str` - `targeted: Optional[bool]` - `traceroute_results: Optional[TestTracerouteResults]` - `round_trip_time: TestTracerouteResultsRoundTripTime` - `history: List[TestTracerouteResultsRoundTripTimeHistory]` - `time_period: AggregateTimePeriod` - `avg_ms: Optional[int]` - `delta_pct: Optional[float]` - `avg_ms: Optional[int]` - `over_time: Optional[TestTracerouteResultsRoundTripTimeOverTime]` - `time_period: AggregateTimePeriod` - `values: List[TestTracerouteResultsRoundTripTimeOverTimeValue]` - `avg_ms: int` - `timestamp: str` - `traceroute_results_by_colo: Optional[List[TestTracerouteResultsByColo]]` - `colo: str` Cloudflare colo - `round_trip_time: TestTracerouteResultsByColoRoundTripTime` - `history: List[TestTracerouteResultsByColoRoundTripTimeHistory]` - `time_period: AggregateTimePeriod` - `avg_ms: Optional[int]` - `delta_pct: Optional[float]` - `avg_ms: Optional[int]` - `over_time: Optional[TestTracerouteResultsByColoRoundTripTimeOverTime]` - `time_period: AggregateTimePeriod` - `values: List[TestTracerouteResultsByColoRoundTripTimeOverTimeValue]` - `avg_ms: int` - `timestamp: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dex.tests.list( account_id="01a7362d577a6c3019a474fd6f485823", ) page = page.result.items[0] print(page.overview_metrics) ``` #### Response ```json { "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" } ] } } } ] } ] } } ```