## List tested webpages `client.Speed.Pages.List(ctx, query) (*SinglePage[PageListResponse], error)` **get** `/zones/{zone_id}/speed_api/pages` Lists all webpages which have been tested. ### Parameters - `query PageListParams` - `ZoneID param.Field[string]` Identifier. ### Returns - `type PageListResponse struct{…}` - `Region LabeledRegion` A test region with a label. - `Label string` - `Value LabeledRegionValue` A test region. - `const LabeledRegionValueAsiaEast1 LabeledRegionValue = "asia-east1"` - `const LabeledRegionValueAsiaNortheast1 LabeledRegionValue = "asia-northeast1"` - `const LabeledRegionValueAsiaNortheast2 LabeledRegionValue = "asia-northeast2"` - `const LabeledRegionValueAsiaSouth1 LabeledRegionValue = "asia-south1"` - `const LabeledRegionValueAsiaSoutheast1 LabeledRegionValue = "asia-southeast1"` - `const LabeledRegionValueAustraliaSoutheast1 LabeledRegionValue = "australia-southeast1"` - `const LabeledRegionValueEuropeNorth1 LabeledRegionValue = "europe-north1"` - `const LabeledRegionValueEuropeSouthwest1 LabeledRegionValue = "europe-southwest1"` - `const LabeledRegionValueEuropeWest1 LabeledRegionValue = "europe-west1"` - `const LabeledRegionValueEuropeWest2 LabeledRegionValue = "europe-west2"` - `const LabeledRegionValueEuropeWest3 LabeledRegionValue = "europe-west3"` - `const LabeledRegionValueEuropeWest4 LabeledRegionValue = "europe-west4"` - `const LabeledRegionValueEuropeWest8 LabeledRegionValue = "europe-west8"` - `const LabeledRegionValueEuropeWest9 LabeledRegionValue = "europe-west9"` - `const LabeledRegionValueMeWest1 LabeledRegionValue = "me-west1"` - `const LabeledRegionValueSouthamericaEast1 LabeledRegionValue = "southamerica-east1"` - `const LabeledRegionValueUsCentral1 LabeledRegionValue = "us-central1"` - `const LabeledRegionValueUsEast1 LabeledRegionValue = "us-east1"` - `const LabeledRegionValueUsEast4 LabeledRegionValue = "us-east4"` - `const LabeledRegionValueUsSouth1 LabeledRegionValue = "us-south1"` - `const LabeledRegionValueUsWest1 LabeledRegionValue = "us-west1"` - `ScheduleFrequency PageListResponseScheduleFrequency` The frequency of the test. - `const PageListResponseScheduleFrequencyDaily PageListResponseScheduleFrequency = "DAILY"` - `const PageListResponseScheduleFrequencyWeekly PageListResponseScheduleFrequency = "WEEKLY"` - `Tests []Test` - `ID string` UUID. - `Date Time` - `DesktopReport LighthouseReport` The Lighthouse report. - `CLS float64` Cumulative Layout Shift. - `DeviceType LighthouseReportDeviceType` The type of device. - `const LighthouseReportDeviceTypeDesktop LighthouseReportDeviceType = "DESKTOP"` - `const LighthouseReportDeviceTypeMobile LighthouseReportDeviceType = "MOBILE"` - `Error LighthouseReportError` - `Code LighthouseReportErrorCode` The error code of the Lighthouse result. - `const LighthouseReportErrorCodeNotReachable LighthouseReportErrorCode = "NOT_REACHABLE"` - `const LighthouseReportErrorCodeDNSFailure LighthouseReportErrorCode = "DNS_FAILURE"` - `const LighthouseReportErrorCodeNotHTML LighthouseReportErrorCode = "NOT_HTML"` - `const LighthouseReportErrorCodeLighthouseTimeout LighthouseReportErrorCode = "LIGHTHOUSE_TIMEOUT"` - `const LighthouseReportErrorCodeUnknown LighthouseReportErrorCode = "UNKNOWN"` - `Detail string` Detailed error message. - `FinalDisplayedURL string` The final URL displayed to the user. - `FCP float64` First Contentful Paint. - `JsonReportURL string` The URL to the full Lighthouse JSON report. - `LCP float64` Largest Contentful Paint. - `PerformanceScore float64` The Lighthouse performance score. - `Si float64` Speed Index. - `State LighthouseReportState` The state of the Lighthouse report. - `const LighthouseReportStateRunning LighthouseReportState = "RUNNING"` - `const LighthouseReportStateComplete LighthouseReportState = "COMPLETE"` - `const LighthouseReportStateFailed LighthouseReportState = "FAILED"` - `TBT float64` Total Blocking Time. - `TTFB float64` Time To First Byte. - `TTI float64` Time To Interactive. - `MobileReport LighthouseReport` The Lighthouse report. - `Region LabeledRegion` A test region with a label. - `ScheduleFrequency TestScheduleFrequency` The frequency of the test. - `const TestScheduleFrequencyDaily TestScheduleFrequency = "DAILY"` - `const TestScheduleFrequencyWeekly TestScheduleFrequency = "WEEKLY"` - `URL string` A URL. - `URL string` A URL. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/speed" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.Speed.Pages.List(context.TODO(), speed.PageListParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### 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": [ { "region": { "label": "Iowa, USA", "value": "us-central1" }, "scheduleFrequency": "DAILY", "tests": [ { "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", "date": "2014-01-01T05:20:00.12345Z", "desktopReport": { "cls": 100, "deviceType": "DESKTOP", "error": { "code": "NOT_REACHABLE", "detail": "Details: net::ERR_CONNECTION_CLOSED", "finalDisplayedUrl": "example.com" }, "fcp": 100, "jsonReportUrl": "jsonReportUrl", "lcp": 100, "performanceScore": 90, "si": 100, "state": "COMPLETE", "tbt": 100, "ttfb": 100, "tti": 100 }, "mobileReport": { "cls": 100, "deviceType": "DESKTOP", "error": { "code": "NOT_REACHABLE", "detail": "Details: net::ERR_CONNECTION_CLOSED", "finalDisplayedUrl": "example.com" }, "fcp": 100, "jsonReportUrl": "jsonReportUrl", "lcp": 100, "performanceScore": 90, "si": 100, "state": "COMPLETE", "tbt": 100, "ttfb": 100, "tti": 100 }, "region": { "label": "Iowa, USA", "value": "us-central1" }, "scheduleFrequency": "DAILY", "url": "example.com" } ], "url": "example.com" } ] } ```