## List Page Rules `client.PageRules.List(ctx, params) (*[]PageRule, error)` **get** `/zones/{zone_id}/pagerules` Fetches Page Rules in a zone. ### Parameters - `params PageRuleListParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Direction param.Field[PageRuleListParamsDirection]` Query param: The direction used to sort returned Page Rules. - `const PageRuleListParamsDirectionAsc PageRuleListParamsDirection = "asc"` - `const PageRuleListParamsDirectionDesc PageRuleListParamsDirection = "desc"` - `Match param.Field[PageRuleListParamsMatch]` Query param: When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. - `const PageRuleListParamsMatchAny PageRuleListParamsMatch = "any"` - `const PageRuleListParamsMatchAll PageRuleListParamsMatch = "all"` - `Order param.Field[PageRuleListParamsOrder]` Query param: The field used to sort returned Page Rules. - `const PageRuleListParamsOrderStatus PageRuleListParamsOrder = "status"` - `const PageRuleListParamsOrderPriority PageRuleListParamsOrder = "priority"` - `Status param.Field[PageRuleListParamsStatus]` Query param: The status of the Page Rule. - `const PageRuleListParamsStatusActive PageRuleListParamsStatus = "active"` - `const PageRuleListParamsStatusDisabled PageRuleListParamsStatus = "disabled"` ### Returns - `type PageRuleListResponseEnvelopeResult []PageRule` - `ID string` Identifier. - `Actions []PageRuleAction` The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. - `type AlwaysUseHTTPS struct{…}` - `ID AlwaysUseHTTPSID` If enabled, any `http://`` URL is converted to`https://` through a 301 redirect. - `const AlwaysUseHTTPSIDAlwaysUseHTTPS AlwaysUseHTTPSID = "always_use_https"` - `type AutomaticHTTPSRewrites struct{…}` - `ID AutomaticHTTPSRewritesID` Turn on or off Automatic HTTPS Rewrites. - `const AutomaticHTTPSRewritesIDAutomaticHTTPSRewrites AutomaticHTTPSRewritesID = "automatic_https_rewrites"` - `Value AutomaticHTTPSRewritesValue` The status of Automatic HTTPS Rewrites. - `const AutomaticHTTPSRewritesValueOn AutomaticHTTPSRewritesValue = "on"` - `const AutomaticHTTPSRewritesValueOff AutomaticHTTPSRewritesValue = "off"` - `type BrowserCacheTTL struct{…}` - `ID BrowserCacheTTLID` Control how long resources cached by client browsers remain valid. - `const BrowserCacheTTLIDBrowserCacheTTL BrowserCacheTTLID = "browser_cache_ttl"` - `Value int64` The number of seconds to cache resources for. Setting this to 0 enables "Respect Existing Headers". - `type BrowserCheck struct{…}` - `ID BrowserCheckID` Inspect the visitor's browser for headers commonly associated with spammers and certain bots. - `const BrowserCheckIDBrowserCheck BrowserCheckID = "browser_check"` - `Value BrowserCheckValue` The status of Browser Integrity Check. - `const BrowserCheckValueOn BrowserCheckValue = "on"` - `const BrowserCheckValueOff BrowserCheckValue = "off"` - `type PageRuleActionsBypassCacheOnCookie struct{…}` - `ID PageRuleActionsBypassCacheOnCookieID` Bypass cache and fetch resources from the origin server if a regular expression matches against a cookie name present in the request. - `const PageRuleActionsBypassCacheOnCookieIDBypassCacheOnCookie PageRuleActionsBypassCacheOnCookieID = "bypass_cache_on_cookie"` - `Value string` The regular expression to use for matching cookie names in the request. Refer to [Bypass Cache on Cookie setting](https://developers.cloudflare.com/rules/page-rules/reference/additional-reference/#bypass-cache-on-cookie-setting) to learn about limited regular expression support. - `type PageRuleActionsCacheByDeviceType struct{…}` - `ID PageRuleActionsCacheByDeviceTypeID` Separate cached content based on the visitor's device type. - `const PageRuleActionsCacheByDeviceTypeIDCacheByDeviceType PageRuleActionsCacheByDeviceTypeID = "cache_by_device_type"` - `Value PageRuleActionsCacheByDeviceTypeValue` The status of Cache By Device Type. - `const PageRuleActionsCacheByDeviceTypeValueOn PageRuleActionsCacheByDeviceTypeValue = "on"` - `const PageRuleActionsCacheByDeviceTypeValueOff PageRuleActionsCacheByDeviceTypeValue = "off"` - `type PageRuleActionsCacheDeceptionArmor struct{…}` - `ID PageRuleActionsCacheDeceptionArmorID` Protect from web cache deception attacks while still allowing static assets to be cached. This setting verifies that the URL's extension matches the returned `Content-Type`. - `const PageRuleActionsCacheDeceptionArmorIDCacheDeceptionArmor PageRuleActionsCacheDeceptionArmorID = "cache_deception_armor"` - `Value PageRuleActionsCacheDeceptionArmorValue` The status of Cache Deception Armor. - `const PageRuleActionsCacheDeceptionArmorValueOn PageRuleActionsCacheDeceptionArmorValue = "on"` - `const PageRuleActionsCacheDeceptionArmorValueOff PageRuleActionsCacheDeceptionArmorValue = "off"` - `type PageRuleActionsCacheKeyFields struct{…}` - `ID PageRuleActionsCacheKeyFieldsID` Control specifically what variables to include when deciding which resources to cache. This allows customers to determine what to cache based on something other than just the URL. - `const PageRuleActionsCacheKeyFieldsIDCacheKeyFields PageRuleActionsCacheKeyFieldsID = "cache_key_fields"` - `Value PageRuleActionsCacheKeyFieldsValue` - `Cookie PageRuleActionsCacheKeyFieldsValueCookie` Controls which cookies appear in the Cache Key. - `CheckPresence []string` A list of cookies to check for the presence of, without including their actual values. - `Include []string` A list of cookies to include. - `Header PageRuleActionsCacheKeyFieldsValueHeader` Controls which headers go into the Cache Key. Exactly one of `include` or `exclude` is expected. - `CheckPresence []string` A list of headers to check for the presence of, without including their actual values. - `Exclude []string` A list of headers to ignore. - `Include []string` A list of headers to include. - `Host PageRuleActionsCacheKeyFieldsValueHost` Determines which host header to include in the Cache Key. - `Resolved bool` Whether to include the Host header in the HTTP request sent to the origin. - `QueryString PageRuleActionsCacheKeyFieldsValueQueryString` Controls which URL query string parameters go into the Cache Key. Exactly one of `include` or `exclude` is expected. - `Exclude PageRuleActionsCacheKeyFieldsValueQueryStringExcludeUnion` Ignore all query string parameters. - `type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString string` Ignore all query string parameters. - `const PageRuleActionsCacheKeyFieldsValueQueryStringExcludeStringStar PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString = "*"` - `type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeArray []string` A list of query string parameters to ignore. - `Include PageRuleActionsCacheKeyFieldsValueQueryStringIncludeUnion` Include all query string parameters. - `type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString string` Include all query string parameters. - `const PageRuleActionsCacheKeyFieldsValueQueryStringIncludeStringStar PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString = "*"` - `type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeArray []string` A list of query string parameters to include. - `User PageRuleActionsCacheKeyFieldsValueUser` Feature fields to add features about the end-user (client) into the Cache Key. - `DeviceType bool` Classifies a request as `mobile`, `desktop`, or `tablet` based on the User Agent. - `Geo bool` Includes the client's country, derived from the IP address. - `Lang bool` Includes the first language code contained in the `Accept-Language` header sent by the client. - `type CacheLevel struct{…}` - `ID CacheLevelID` Apply custom caching based on the option selected. - `const CacheLevelIDCacheLevel CacheLevelID = "cache_level"` - `Value CacheLevelValue` * `bypass`: Cloudflare does not cache. * `basic`: Delivers resources from cache when there is no query string. * `simplified`: Delivers the same resource to everyone independent of the query string. * `aggressive`: Caches all static content that has a query string. * `cache_everything`: Treats all content as static and caches all file types beyond the [Cloudflare default cached content](https://developers.cloudflare.com/cache/concepts/default-cache-behavior/#default-cached-file-extensions). - `const CacheLevelValueBypass CacheLevelValue = "bypass"` - `const CacheLevelValueBasic CacheLevelValue = "basic"` - `const CacheLevelValueSimplified CacheLevelValue = "simplified"` - `const CacheLevelValueAggressive CacheLevelValue = "aggressive"` - `const CacheLevelValueCacheEverything CacheLevelValue = "cache_everything"` - `type PageRuleActionsCacheOnCookie struct{…}` - `ID PageRuleActionsCacheOnCookieID` Apply the Cache Everything option (Cache Level setting) based on a regular expression match against a cookie name. - `const PageRuleActionsCacheOnCookieIDCacheOnCookie PageRuleActionsCacheOnCookieID = "cache_on_cookie"` - `Value string` The regular expression to use for matching cookie names in the request. - `type PageRuleActionsCacheTTLByStatus struct{…}` - `ID PageRuleActionsCacheTTLByStatusID` Enterprise customers can set cache time-to-live (TTL) based on the response status from the origin web server. Cache TTL refers to the duration of a resource in the Cloudflare network before being marked as stale or discarded from cache. Status codes are returned by a resource's origin. Setting cache TTL based on response status overrides the default cache behavior (standard caching) for static files and overrides cache instructions sent by the origin web server. To cache non-static assets, set a Cache Level of Cache Everything using a Page Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`) increases requests to origin web servers and decreases performance. - `const PageRuleActionsCacheTTLByStatusIDCacheTTLByStatus PageRuleActionsCacheTTLByStatusID = "cache_ttl_by_status"` - `Value map[string, PageRuleActionsCacheTTLByStatusValueUnion]` A JSON object containing status codes and their corresponding TTLs. Each key-value pair in the cache TTL by status cache rule has the following syntax - `status_code`: An integer value such as 200 or 500. status_code matches the exact status code from the origin web server. Valid status codes are between 100-999. - `status_code_range`: Integer values for from and to. status_code_range matches any status code from the origin web server within the specified range. - `value`: An integer value that defines the duration an asset is valid in seconds or one of the following strings: no-store (equivalent to -1), no-cache (equivalent to 0). - `type PageRuleActionsCacheTTLByStatusValueString string` `no-store` (equivalent to -1), `no-cache` (equivalent to 0) - `const PageRuleActionsCacheTTLByStatusValueStringNoCache PageRuleActionsCacheTTLByStatusValueString = "no-cache"` - `const PageRuleActionsCacheTTLByStatusValueStringNoStore PageRuleActionsCacheTTLByStatusValueString = "no-store"` - `UnionInt` - `type PageRuleActionsDisableApps struct{…}` - `ID PageRuleActionsDisableAppsID` Turn off all active [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/) (deprecated). - `const PageRuleActionsDisableAppsIDDisableApps PageRuleActionsDisableAppsID = "disable_apps"` - `type PageRuleActionsDisablePerformance struct{…}` - `ID PageRuleActionsDisablePerformanceID` Turn off [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/), and [Polish](https://developers.cloudflare.com/images/polish/). - `const PageRuleActionsDisablePerformanceIDDisablePerformance PageRuleActionsDisablePerformanceID = "disable_performance"` - `type PageRuleActionsDisableSecurity struct{…}` - `ID PageRuleActionsDisableSecurityID` Turn off [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/), [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/), [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/), [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/), and [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/). - `const PageRuleActionsDisableSecurityIDDisableSecurity PageRuleActionsDisableSecurityID = "disable_security"` - `type PageRuleActionsDisableZaraz struct{…}` - `ID PageRuleActionsDisableZarazID` Turn off [Zaraz](https://developers.cloudflare.com/zaraz/). - `const PageRuleActionsDisableZarazIDDisableZaraz PageRuleActionsDisableZarazID = "disable_zaraz"` - `type PageRuleActionsEdgeCacheTTL struct{…}` - `ID PageRuleActionsEdgeCacheTTLID` Specify how long to cache a resource in the Cloudflare global network. *Edge Cache TTL* is not visible in response headers. - `const PageRuleActionsEdgeCacheTTLIDEdgeCacheTTL PageRuleActionsEdgeCacheTTLID = "edge_cache_ttl"` - `Value int64` - `type EmailObfuscation struct{…}` - `ID EmailObfuscationID` Turn on or off **Email Obfuscation**. - `const EmailObfuscationIDEmailObfuscation EmailObfuscationID = "email_obfuscation"` - `Value EmailObfuscationValue` The status of Email Obfuscation. - `const EmailObfuscationValueOn EmailObfuscationValue = "on"` - `const EmailObfuscationValueOff EmailObfuscationValue = "off"` - `type PageRuleActionsExplicitCacheControl struct{…}` - `ID PageRuleActionsExplicitCacheControlID` Origin Cache Control is enabled by default for Free, Pro, and Business domains and disabled by default for Enterprise domains. - `const PageRuleActionsExplicitCacheControlIDExplicitCacheControl PageRuleActionsExplicitCacheControlID = "explicit_cache_control"` - `Value PageRuleActionsExplicitCacheControlValue` The status of Origin Cache Control. - `const PageRuleActionsExplicitCacheControlValueOn PageRuleActionsExplicitCacheControlValue = "on"` - `const PageRuleActionsExplicitCacheControlValueOff PageRuleActionsExplicitCacheControlValue = "off"` - `type PageRuleActionsForwardingURL struct{…}` - `ID PageRuleActionsForwardingURLID` Redirects one URL to another using an `HTTP 301/302` redirect. Refer to [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/). - `const PageRuleActionsForwardingURLIDForwardingURL PageRuleActionsForwardingURLID = "forwarding_url"` - `Value PageRuleActionsForwardingURLValue` - `StatusCode PageRuleActionsForwardingURLValueStatusCode` The status code to use for the URL redirect. 301 is a permanent redirect. 302 is a temporary redirect. - `const PageRuleActionsForwardingURLValueStatusCode301 PageRuleActionsForwardingURLValueStatusCode = 301` - `const PageRuleActionsForwardingURLValueStatusCode302 PageRuleActionsForwardingURLValueStatusCode = 302` - `URL string` The URL to redirect the request to. Notes: ${num} refers to the position of '*' in the constraint value. - `type PageRuleActionsHostHeaderOverride struct{…}` - `ID PageRuleActionsHostHeaderOverrideID` Apply a specific host header. - `const PageRuleActionsHostHeaderOverrideIDHostHeaderOverride PageRuleActionsHostHeaderOverrideID = "host_header_override"` - `Value string` The hostname to use in the `Host` header - `type IPGeolocation struct{…}` - `ID IPGeolocationID` Cloudflare adds a CF-IPCountry HTTP header containing the country code that corresponds to the visitor. - `const IPGeolocationIDIPGeolocation IPGeolocationID = "ip_geolocation"` - `Value IPGeolocationValue` The status of adding the IP Geolocation Header. - `const IPGeolocationValueOn IPGeolocationValue = "on"` - `const IPGeolocationValueOff IPGeolocationValue = "off"` - `type Mirage struct{…}` - `ID MirageID` Cloudflare Mirage reduces bandwidth used by images in mobile browsers. It can accelerate loading of image-heavy websites on very slow mobile connections and HTTP/1. - `const MirageIDMirage MirageID = "mirage"` - `Value MirageValue` The status of Mirage. - `const MirageValueOn MirageValue = "on"` - `const MirageValueOff MirageValue = "off"` - `type OpportunisticEncryption struct{…}` - `ID OpportunisticEncryptionID` Opportunistic Encryption allows browsers to access HTTP URIs over an encrypted TLS channel. It's not a substitute for HTTPS, but provides additional security for otherwise vulnerable requests. - `const OpportunisticEncryptionIDOpportunisticEncryption OpportunisticEncryptionID = "opportunistic_encryption"` - `Value OpportunisticEncryptionValue` The status of Opportunistic Encryption. - `const OpportunisticEncryptionValueOn OpportunisticEncryptionValue = "on"` - `const OpportunisticEncryptionValueOff OpportunisticEncryptionValue = "off"` - `type OriginErrorPagePassThru struct{…}` - `ID OriginErrorPagePassThruID` Turn on or off Cloudflare error pages generated from issues sent from the origin server. If enabled, this setting triggers error pages issued by the origin. - `const OriginErrorPagePassThruIDOriginErrorPagePassThru OriginErrorPagePassThruID = "origin_error_page_pass_thru"` - `Value OriginErrorPagePassThruValue` The status of Origin Error Page Passthru. - `const OriginErrorPagePassThruValueOn OriginErrorPagePassThruValue = "on"` - `const OriginErrorPagePassThruValueOff OriginErrorPagePassThruValue = "off"` - `type Polish struct{…}` - `ID PolishID` Apply options from the Polish feature of the Cloudflare Speed app. - `const PolishIDPolish PolishID = "polish"` - `Value PolishValue` The level of Polish you want applied to your origin. - `const PolishValueOff PolishValue = "off"` - `const PolishValueLossless PolishValue = "lossless"` - `const PolishValueLossy PolishValue = "lossy"` - `type PageRuleActionsResolveOverride struct{…}` - `ID PageRuleActionsResolveOverrideID` Change the origin address to the value specified in this setting. - `const PageRuleActionsResolveOverrideIDResolveOverride PageRuleActionsResolveOverrideID = "resolve_override"` - `Value string` The origin address you want to override with. - `type PageRuleActionsRespectStrongEtag struct{…}` - `ID PageRuleActionsRespectStrongEtagID` Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and the origin server. - `const PageRuleActionsRespectStrongEtagIDRespectStrongEtag PageRuleActionsRespectStrongEtagID = "respect_strong_etag"` - `Value PageRuleActionsRespectStrongEtagValue` The status of Respect Strong ETags - `const PageRuleActionsRespectStrongEtagValueOn PageRuleActionsRespectStrongEtagValue = "on"` - `const PageRuleActionsRespectStrongEtagValueOff PageRuleActionsRespectStrongEtagValue = "off"` - `type ResponseBuffering struct{…}` - `ID ResponseBufferingID` Turn on or off whether Cloudflare should wait for an entire file from the origin server before forwarding it to the site visitor. By default, Cloudflare sends packets to the client as they arrive from the origin server. - `const ResponseBufferingIDResponseBuffering ResponseBufferingID = "response_buffering"` - `Value ResponseBufferingValue` The status of Response Buffering - `const ResponseBufferingValueOn ResponseBufferingValue = "on"` - `const ResponseBufferingValueOff ResponseBufferingValue = "off"` - `type RocketLoader struct{…}` - `ID RocketLoaderID` Turn on or off Rocket Loader in the Cloudflare Speed app. - `const RocketLoaderIDRocketLoader RocketLoaderID = "rocket_loader"` - `Value RocketLoaderValue` The status of Rocket Loader - `const RocketLoaderValueOn RocketLoaderValue = "on"` - `const RocketLoaderValueOff RocketLoaderValue = "off"` - `type SecurityLevel struct{…}` - `ID SecurityLevelID` Control options for the **Security Level** feature from the **Security** app. - `const SecurityLevelIDSecurityLevel SecurityLevelID = "security_level"` - `Value SecurityLevelValue` - `const SecurityLevelValueOff SecurityLevelValue = "off"` - `const SecurityLevelValueEssentiallyOff SecurityLevelValue = "essentially_off"` - `const SecurityLevelValueLow SecurityLevelValue = "low"` - `const SecurityLevelValueMedium SecurityLevelValue = "medium"` - `const SecurityLevelValueHigh SecurityLevelValue = "high"` - `const SecurityLevelValueUnderAttack SecurityLevelValue = "under_attack"` - `type SortQueryStringForCache struct{…}` - `ID SortQueryStringForCacheID` Turn on or off the reordering of query strings. When query strings have the same structure, caching improves. - `const SortQueryStringForCacheIDSortQueryStringForCache SortQueryStringForCacheID = "sort_query_string_for_cache"` - `Value SortQueryStringForCacheValue` The status of Query String Sort - `const SortQueryStringForCacheValueOn SortQueryStringForCacheValue = "on"` - `const SortQueryStringForCacheValueOff SortQueryStringForCacheValue = "off"` - `type SSL struct{…}` - `ID SSLID` Control options for the SSL feature of the Edge Certificates tab in the Cloudflare SSL/TLS app. - `const SSLIDSSL SSLID = "ssl"` - `Value SSLValue` The encryption mode that Cloudflare uses to connect to your origin server. - `const SSLValueOff SSLValue = "off"` - `const SSLValueFlexible SSLValue = "flexible"` - `const SSLValueFull SSLValue = "full"` - `const SSLValueStrict SSLValue = "strict"` - `const SSLValueOriginPull SSLValue = "origin_pull"` - `type TrueClientIPHeader struct{…}` - `ID TrueClientIPHeaderID` Turn on or off the True-Client-IP Header feature of the Cloudflare Network app. - `const TrueClientIPHeaderIDTrueClientIPHeader TrueClientIPHeaderID = "true_client_ip_header"` - `Value TrueClientIPHeaderValue` The status of True Client IP Header. - `const TrueClientIPHeaderValueOn TrueClientIPHeaderValue = "on"` - `const TrueClientIPHeaderValueOff TrueClientIPHeaderValue = "off"` - `type WAF struct{…}` - `ID WAFID` Turn on or off [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/). You cannot enable or disable individual WAF managed rules via Page Rules. - `const WAFIDWAF WAFID = "waf"` - `Value WAFValue` The status of WAF managed rules (previous version). - `const WAFValueOn WAFValue = "on"` - `const WAFValueOff WAFValue = "off"` - `CreatedOn Time` The timestamp of when the Page Rule was created. - `ModifiedOn Time` The timestamp of when the Page Rule was last modified. - `Priority int64` The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to take precedence (rule B: `/images/special/*`), specify a higher priority for rule B so it overrides rule A. - `Status PageRuleStatus` The status of the Page Rule. - `const PageRuleStatusActive PageRuleStatus = "active"` - `const PageRuleStatusDisabled PageRuleStatus = "disabled"` - `Targets []Target` The rule targets to evaluate on each request. - `Constraint TargetConstraint` String constraint. - `Operator TargetConstraintOperator` The matches operator can use asterisks and pipes as wildcard and 'or' operators. - `const TargetConstraintOperatorMatches TargetConstraintOperator = "matches"` - `const TargetConstraintOperatorContains TargetConstraintOperator = "contains"` - `const TargetConstraintOperatorEquals TargetConstraintOperator = "equals"` - `const TargetConstraintOperatorNotEqual TargetConstraintOperator = "not_equal"` - `const TargetConstraintOperatorNotContain TargetConstraintOperator = "not_contain"` - `Value string` The URL pattern to match against the current request. The pattern may contain up to four asterisks ('*') as placeholders. - `Target TargetTarget` A target based on the URL of the request. - `const TargetTargetURL TargetTarget = "url"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/page_rules" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) pageRules, err := client.PageRules.List(context.TODO(), page_rules.PageRuleListParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", pageRules) } ``` #### 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": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "actions": [ { "id": "browser_check", "value": "on" } ], "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "priority": 0, "status": "active", "targets": [ { "constraint": { "operator": "matches", "value": "*example.com/images/*" }, "target": "url" } ] } ] } ```