Documentation

This documentation and answers will help you get started and master the way you use PageCDN for better content delivery.

Configure a repo

POSThttps://pagecdn.com/api/v2/private/repo/configureCopy

Configure a repo. You have to specify which repo to configure, and then optionally specify values of different fields. Empty fields retain previous values.

Query String Parameters

apikeystringrequiredThe api key to identify originator of the request.
repostringrequiredThe repo you want to configure, as site/wxyz.
repo_namestringoptionalHuman readable repo name.
http_cache_ttlintoptionalBrowser cache expiration time in seconds. -1 means cache forever. 0 means follow origin's cache control headers.
edge_cache_ttlintoptionalDuration, in seconds, for which to maintain a copy of the file on CDN without asking the origin for fresh copy. -1 means cache forever.
compression_levelstringoptionalPre-compression level can be moderate, high or extreme. Extreme compression level is slow for the first request of new files or after a file changes. Recommended compression level for development phase is moderate to get instant file changes.
update_css_pathsbooleanoptionalServing files through PageCDN requires change in URLs of resources. If this breaks paths of resources linked from inside CSS files, turn path correction feature on by specifying 1.
descriptionstringoptionalOptional human readable description of the repo.
server_push_triggerstringoptionalRelative path of the file that pushes additional files through HTTP/2 Server Push.
push_filesstringoptionalList of relative paths of files to be pushed, separated by new line character \n.
main_filesstringoptionalRelative paths of main or important files, separated by new line character \n. These files are shown higher in files list on CDN. This is usually used for shared repos.
force_downloadsbooleanoptionalWhether to force download the files. 1 means to force the browser to download files of this repo. 0 will disable this feature.

Successful Response

 {
    "status": "200",
    "message": "Ok",
    "details": "Success",
    "response": []
}