---
title: "A page control for an application"
method: GET
path: "/applications/{app_id}/pagecontrols/{id}"
tags: ["applications"]
---

# A page control for an application

`GET /applications/{app_id}/pagecontrols/{id}`

Returns the requested page control

## Path parameters

- `app_id` string, required
- `id` string, required

## Query parameters

- `attributes` string

## Response `200`

Success

- PageControl — Identifier for a page control
  - `name` string, required — Short name describing the page control.
  - `description` string — Optional additional description of the page control.
  - `mode` 'maintenance' | 'request' | 'response' — Set as 'maintenance' for maintenance mode page control.
  - `enabled` boolean — Enables or disables the page control.
  - `conditions` PageControlConditions — The conditions that cause a page control to trigger
    - `address_is_whitelisted` object — The actions will be applied to whitelist addresses
    - `address_is_not_whitelisted` object — The actions will be applied to all the incoming IP addresses except whitelist addresses. By default, actions are applied to whitelist addresses
    - `auth_cookie_is_not_set` PageControlConditionAuthCookieIsNotSet — Test to see if a named authorization cookie is not set or is expired.
      - `name` string, required — Name of the cookie to test
    - `auth_cookie_is_set` PageControlConditionAuthCookieIsSet — Test to see if a named authorization cookie is set and not expiredd.
      - `name` string, required — Name of the cookie to test
    - `cookie_is_not_set` PageControlConditionCookieIsNotSet — Test to see if a named cookie is not set.
      - `name` string, required — Name of the cookie to test
    - `cookie_is_set` PageControlConditionCookieIsSet — Test to see if a named cookie is set.
      - `name` string, required — Name of the cookie to test
    - `cookie_value_does_not_match` PageControlConditionCookieValueDoesNotMatch — Test to check if the named cookie value does not match the specified pattern. If the specified cookie does not exist, this condition will evaluate to true. Cookie value pattern must be a regular expression.
      - `name` string, required — Name of the cookie to test
      - `pattern` string, regex, required — A regular expression to match with cookie value
    - `cookie_value_matches` PageControlConditionCookieValueMatches — Test to check if the named cookie value matches the specified pattern. Cookie value pattern must be a regular expression.
      - `name` string, required — Name of the cookie to test
      - `pattern` string, regex, required — A regular expression to match with cookie value
    - `country_is_not` PageControlConditionCountryIsNotIncluded — Tests if the country of origin of a request is excluded from the specified list.
      - `list` CountryCode[], required — A list of country codes
    - `country_is` PageControlConditionCountryIsIncluded — Tests if the country of origin of a request is included in the specified list.
      - `list` CountryCode[], required — A list of country codes
    - `header_value_matches` PageControlConditionHeaderValueMatches — Test to check if the header value matches the specified pattern. Header value pattern must be a regular expression
      - `name` string, required — Name of the header to test
      - `pattern` string, regex, required — A regular expression to match with header
    - `header_value_does_not_match` PageControlConditionHeaderValueMatches — Test to check if the header value matches the specified pattern. Header value pattern must be a regular expression
      - `name` string, required — Name of the header to test
      - `pattern` string, regex, required — A regular expression to match with header
    - `headers_match` ConditionHeader[] — Array of headers conditions
      - `name` string, required — Name of the header to test
      - `pattern` string, regex, required — A regular expression to match with header value
    - `headers_not_match` ConditionHeader[] — Array of headers conditions
      - `name` string, required — Name of the header to test
      - `pattern` string, regex, required — A regular expression to match with header value
    - `method_is` PageControlMethodIsIncluded — Tests if the method name of a request is included in the specified list.
      - `values` MethodName[], required — A list of method names.
    - `method_is_not` PageControlMethodIsNotIncluded — Tests if the method name of a request is excluded from the specified list.
      - `values` MethodName[], required — A list of method names.
    - `address_is_threat` object — Tests if the requester's IP address is a known malicious source.
    - `address_is_not_threat` object — Tests if the requester's IP address is not a known mailicious source.
    - `is_crawler` object — The actions will be applied to requests from known web crawlers.
    - `address_in_set` PageControlConditionAddressInSet — Tests if requester's IP address is in the specified address set
      - `address_set` string, required — The endpoint for an address set resource
    - `address_not_in_set` PageControlConditionAddressNotInSet — Tests if requester's IP address is not in the specified address set
      - `address_set` string, required — The endpoint for an address set resource
    - `random` PageControlConditionRandom — A test based on generating a random variable and triggering on a specified probability
      - `probability` number, required — Probability for which condition is true
    - `rate_limit` PageControlConditionRateLimit — True when the number of request during a duration is greater than a specified threshold.
      - `duration` integer, required — The amount of time, in number of seconds, over which to accumulate the request count
      - `display_unit` 'seconds' | 'minutes' | 'hours', required — Unit to use for displaying the time duration specified.
      - `threshold` integer, required — Maximum number of requests in the given duration before the condition is triggered
    - `referrer_is` string[] — The actions will be applied to requests for which request referrer matches with the given referrer
    - `referrer_is_not` string[] — The actions will be applied to requests for which request referrer does not match with the given referrer
    - `referrer_is_defined` object — The actions will be applied to requests for which request referrer matches with one of the application aliases
    - `referrer_is_not_defined` object — The actions will be applied to requests for which request referrer does not match with one of the application aliases
    - `status_code_matches` PageControlConditionStatusCodeMatches — Test to see if the response status code matches the pattern.
      - `pattern` string, regex, required — A regular expression to match against the response status code.
    - `urls` ConditionUrl[] — Array of url objects
      - `scheme` string — Http scheme used for matching against requests. If this field is not specified then both http and https will match.
      - `domain` string — Wildcard domain used for matching against requests. If this field is not specified then all configured application domains will match.
      - `path` string — Wildcard path used for matching against requests. If this field is not specified then all paths will match.
      - `query` string — Wildcard query used for matching against requests. If this field is not specified then all query values will match.
    - `url_is_not` ConditionUrl[] — Array of url objects
      - `scheme` string — Http scheme used for matching against requests. If this field is not specified then both http and https will match.
      - `domain` string — Wildcard domain used for matching against requests. If this field is not specified then all configured application domains will match.
      - `path` string — Wildcard path used for matching against requests. If this field is not specified then all paths will match.
      - `query` string — Wildcard query used for matching against requests. If this field is not specified then all query values will match.
    - `user_agent_matches` PageControlConditionUserAgentMatches — Test if user-agent of a request matches the given regular expression
      - `pattern` string, required — A regular expression to match with user-agent
    - `user_agent_does_not_match` PageControlConditionUserAgentDoesNotMatch — Test if user-agent of a request does not match the given regular expression
      - `pattern` string, required — A regular expression to match with user-agent
  - `actions` PageControlAction[], required — Actions that are applied when the page control is triggered.
    - union — An array of actions to enact on the triggering of a page control.
      - PageControlActionAddIPToList — Add IP address of the request to address set
        - `type` 'add-address-to-set', required
        - `address_set` string, required — The endpoint for an address set resource
        - `ttl` number — The amount of time in seconds that an IP address will live in a set
      - PageControlActionAddLabels — Add custom labels to processed traffic. This is a non-final action.
        - `type` 'add-labels', required
        - `labels` Label[], required — Array of labels that will be attached to matching traffic
      - PageControlActionCacheOverrides — Update the cache-related headers of responses from backend servers.
        - `type` 'cache-overrides', required
        - `setting` string, required — Always-cache erases cache control headers and sets the cache control header to 'public' along with removing Pragma and Expires headers, allowing Webscale and browsers to cache affected responses for a default amount of time. Bypass-cache sets the cache control to disallow caching and the header is set to 'no-transform, no-cache, no-store, must-revalidate, max-age=0', ensuring that all responses are uniquely generated. Contents of the cache control header value (which will be used as is, if valid) to be used in place of the one returned from the application server when retrieving a resource
      - PageControlActionContinue — Continue execution of traffic controls. Non final action
        - `type` 'continue', required
      - PageControlActionDeny — Deny the request with the given status code. Final action
        - `type` 'deny', required
        - `status_code` string, required — Response status code that will be returned as a result of deny action
        - `body` string, required — The response body to send when a request is denied
      - PageControlActionDisableRum — Disable real user monitoring when RUM is enabled for the application. No beacon script for collecting RUM metrics will be injected into html responses.
        - `type` 'disable-rum', required
      - PageControlActionDisableSessionTracking — Disable Webscale session tracking. No session-tracking cookies will be added to responses.
        - `type` 'disable-session-tracking', required
      - PageControlActionDiscontinue — Discontinue execution of traffic controls. Final action that can be used to finalize a set of non-final actions
        - `type` 'discontinue', required
      - PageControlActionDrop — Drop the request. Final action
        - `type` 'drop', required
      - PageControlActionRedirect — Redirect the request. Final action
        - `type` 'redirect', required
        - `status_code` string, required — Response status code that will be returned as a result of redirection
        - `location` string, required — A valid URL with http or https scheme, a hostname, and a path
      - PageControlActionRedirectUsingMap — Redirect the request using a url map. If the request URL is found in the url map and a redirect occurs, then this is a final action
        - `type` 'redirect-using-map', required
        - `preserve_query` boolean, required — When true, query parameters from the request are preserved in the redirect location, unless the location in the url map specifies a query separator (question mark)
        - `status_code` string, required — Response status code that will be returned in a redirect response
        - `url_map` string, required — A reference to a url map
      - PageControlActionRewriteUrl — Rewrite the incoming request URL prior to serving it. The rewrite is designed to rewrite the URL path and the query parameters. If the URL scheme or the hostname is attempted to be modified the resulting behavior is unspecified.
        - `type` 'rewrite-url', required
        - `url` string, required — A valid URL with http or https scheme, a hostname, and a path
      - PageControlActionSetRequestTimeout — Set timeout for a request
        - `type` 'set-request-timeout', required
        - `timeout` integer, required — An integer of value 1 or more.
      - PageControlActionScriptAddAsync — Update matching script elements to add the async attribute.
        - `type` 'script-add-async', required
        - `scripts` Script[], required — Array of urls that has to be made async
      - PageControlActionScriptAddDefer — Update matching script elements to add the defer attribute.
        - `type` 'script-add-defer', required
        - `scripts` Script[], required — Array of urls that has to be deferred
      - PageControlActionSetContentSecurityPolicy — Set a content security policy.
        - `type` 'set-content-security-policy', required
        - `value` object, required — CSP action value is a hash where the key is the directive name and the value is the directive value. The directive value is usually an array of strings, but for a couple directives it is a boolean.
      - PageControlActionSetAuthCookie — Set or extend an authorization cookie. The cookie is valid for a specified duration and a domain and path if specified
        - `type` 'set-auth-cookie', required
        - `name` string, required — The name of the cookie to be set
        - `domain` string — Optional domain to be sent with cookie
        - `duration` integer, required — The lifespan of the cookie when issued, in seconds. After the cookie is initially sent, it will be refreshed if the expiry is less than 1/2 the duration from the current time
        - `path` string — Optional path to be sent with the cookie
      - PageControlActionSetCookie — Set a response cookie.
        - `type` 'set-cookie', required
        - `name` string, required — The name of the cookie to be set
        - `value` string, required — The value to set for the cookie
        - `max_age` integer — An integer of value 0 or more.
        - `path` string — The path to which the cookie applies
      - PageControlActionSetPagespeedOptions — Provides options for the pagespeed integration
        - `type` 'set-pagespeed-options', required
        - `disable_filters` PagespeedFilterName[] — Array of filter names to disable. See the enable_filters attribute for the filters enabled by default
        - `enable` boolean — Set to false to disable pagespeed processing
        - `enable_filters` PagespeedFilterName[] — Array of filter names to enable. The filters enabled by default are: add_head, canonicalize_javascript_libraries, combine_css, convert_meta_tags, extend_cache, fallback_rewrite_css_urls, flatten_css_imports, inline_css, inline_import_to_link, inline_javascript, insert_dns_prefetch, rewrite_css, rewrite_images, rewrite_javascript, and rewrite_style_attributes_with_url
      - PageControlActionSetRequestHeader — Set a request header before a request is sent to a backend server.
        - `type` 'set-request-header', required
        - `name` string, required — The name of the header to be set
        - `value` string, required — The value for the specified header
      - PageControlActionSetResponseHeader — Set a response header before a response is returned to a web browser.
        - `type` 'set-response-header', required
        - `name` string, required — The name of the header to be set
        - `value` string, required — The value for the specified header
      - PageControlActionServe — Serve the microsite resource specified by a relative path with a specified status code. If the resource does not exist in the application's microsite, then the file index.html is used instead, which is guaranteed to exist.
        - `type` 'serve', required
        - `code` string, required — The HTTP status code to return
        - `file` string — Endpoint resource reference to a file.
        - `path` string, required — The file path for the page to serve
      - PageControlActionServeCaptchaChallenge — Issue a reCaptcha challenge to the user for all incoming requests unless the user has successfully completed a validation before.
        - `type` 'serve-captcha-challenge', required
      - PageControlActionTerminateHttps — Use HTTP to communicate with backend servers regardless of the request protocol. Final action
        - `type` 'terminate-https', required
      - PageControlActionUseAlternateBackends — Use different servers than the default for matching requests. Final action
        - `type` 'use-alternate-backends', required
        - `cluster` string, nullable — The endpoint for the cluster resource.
        - `servers` ApplicationServer[] — A list of IP addresses to which traffic is sent. One of cluster or servers is required
          - `public_address` string, required — IP address
          - `description` string — Description of the server.
        - `servers_hostname` string — A fully qualified domain name (FQD) whose addresses are used to set the backend servers to which traffic should be sent
        - `remote_url` union
          - unknown
          - string — A URL used to access backend servers. This URL may omit the scheme. If the scheme is set, then that scheme will be used to access the backend server regardless of the request scheme. When a hostname is provided in the URL, then it will be used instead of the request hostname. If a path is provided, the pathname requested from the backend server will be the path formed by joining the URL path and the request path. <h3>Examples</h3><table><thead><tr><th>Request URL</th><th>Remote URL</th><th>Effective URL</th></tr></thead><tbody><tr><td>https://example.com/page</td><td>—</td><td>https://example.com/page</td></tr><tr><td>https://example.com/page</td><td>/prefix</td><td>https://example.com/prefix/page</td></tr><tr><td>https://example.com/page</td><td>//althost.com/</td><td>https://althost.com/page</td></tr><tr><td>https://example.com/page</td><td>//althost.com/prefix</td><td>https://althost.com/prefix/page</td></tr><tr><td>https://example.com/page</td><td>http://althost.com/prefix</td><td>http://althost.com/prefix/page</td></tr></tbody></table>
        - `relative_to` union
          - unknown
          - string — A path in the URL space of the application at which the resources obtained from the backend server are mapped. If not used with a condition that only matches URL paths that begin with this value, then the result may be unpredictable. The path mapping logically happens before any mapping performed by the remote_url attribute. <h3>Examples</h3><table><thead><tr><th>Request URL</th><th>Relative to</th><th>Effective path</th></tr></thead><tbody><tr><td>/</td><td>—</td><td>/</td></tr><tr><td>/base</td><td>—</td><td>/base</td></tr><tr><td>/base</td><td>/base</td><td>/</td></tr><tr><td>/base/page</td><td>/base</td><td>/page</td></tr></tbody></table>
      - PageControlActionUserHasRole — Limit access to accounts and applications to users belonging to the given role.
        - `type` 'user-has-role', required
        - `roles` string[], required — Users must belong to at least one of these roles
      - PageControlActionSubstitute — Substitute a string with an alternate string.
        - `type` 'substitute', required
        - `substitutes` Substitute[], required — Array of substitutes
          - `contains` string, required — Case sensitive text in URL or query.
          - `replace` string, required — Text that will replace the case sensitive input provided by user.
      - PageControlActionUseServerlessFunction — Allows the user to invoke serverless function
        - `type` 'use-serverless-function'
        - `function` string, required — A reference to the handler.
  - `href` string — A reference to this page control
  - `version` integer — The version of the page control. Versions are numbered, beginning with 1 and increase every time the page control is changed
  - `created` string — An iso8601 formatted timestamp
  - `deleted` string — An iso8601 formatted timestamp
  - `history` PageControl[] — All previous versions of this page control

---

[API](https://skmtc.dev/webscale/apis/webscale-apis.md) · [All operations](https://skmtc.dev/webscale/apis/webscale-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/webscale/webscale-apis/revisions/c98d872b50cb/schema)
