List Cache Controls

This API is used to list url cache controls policy for website accleration domain or filedownload service.

1. Request Definition

  • API URL
https://cdn-api.swiftfederation.com/v1.1/services/{serviceId}/cache_controls
  • Request Method
GET
  • Request Header

Refer to HTTP Request Headers

  • Request Body

No request body for this API.


2. Response Definition

  • Response Header

Refer to HTTP Response Headers

  • Response Body
Field Type Description
id int Policy ID number for access control.
name string Policy name for access control.
matchType string Policy match type, could be "regex" or "prefix".
url string Prefix or regex of url pattern.
hostHeader string 'Host' header to be sent to the origin (only valid on WSA properties)
ttl long The cache TTL for contents to be cached on edge server in seconds.
allowedReferrers string Comma-separated list of domain suffixes. If the Referer header of a client request does not match any of the suffixes in the list then the request is blocked with an HTTP 403 Permission Denied response. Suffixes match any domain name with the same ending, for example "example.com" will match both "www.example.com" and "subdomain.example.com".
ignoreClientNoCache boolean True or false to ignore no-cache header(s) sent by the client.
ignoreOriginNoCache boolean True or false to ignore no-cache header(s) sent by the origin server.
ignoreQueryString boolean True or false to ignore any URL query string when caching contents.
originSniOverride boolean Enable to use host header of client request (or host header override setting in this policy, if any) as SNI during SSL handshake with Origin server instead of Origin Domain Name (default) of WSA property.
enableXCache boolean When enabled all responses from the edge have X-Cache header with values like "HIT from da01.xy01.swiftserve.com", showing whether the response was served from the cache (at least partially) or not.
neverCache Optional boolean When enabled disables caching of the upstream content even if the origin advertises it.
  • Response Body Example
[
    {
        "id": 2001,
        "name": "cc1001",
        "matchType": "regex",
        "url": "/*.js",
        "hostHeader": "cdn.example1.com",
        "ttl": 86400,
        "allowedReferrers":"example1.com",
        "ignoreClientNoCache": true,
        "ignoreOriginNoCache": true,
        "ignoreQueryString": false,
        "originSniOverride":true,
        "enableXCache":true,
        "neverCache":true
    },
    {
        "id": 2002,
        "name": "cc2002",
        "matchType": "regex",
        "url": "/*.js",
        "hostHeader": "cdn.example1.com",
        "ttl": 86400,
        "allowedReferrers":"example1.com",
        "ignoreClientNoCache": true,
        "ignoreOriginNoCache": true,
        "ignoreQueryString": false,
        "enableXCache":true,
         "neverCache":true
    },
    {
        "id": 2003,
        "name": "cc2003",
        "matchType": "regex",
        "url": "/*.js",
        "hostHeader": "cdn.example1.com",
        "ttl": 86400,
        "allowedReferrers":"example1.com",
        "ignoreClientNoCache": true,
        "ignoreOriginNoCache": true,
        "ignoreQueryString": false,
        "enableXCache":true,
        "neverCache":true
    }
]
           Updated 2020-09-24 02:53:18

results matching ""

    No results matching ""