Cache API Reference

CDN Routes #

POST
https://api.cynderhost.com/high-performance/cache/cdn/purge/
Purge CDN Cache (Everything)
Purges all CDN cached files for the domain of the API key provided.
Request Fields
Headers
Content-Type:
application/x-www-form-urlencoded
All body values should be passed as key-value, url-encoded data.
Body
API
(string)
Ex: pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=
API key for applicable site
Response Fields
Headers
Content-Type:
application/json
Returned data is in JSON format
X-Req-Token:
Ex: 9292939391
A random number generated for validation purposes
X-Req-Epoch:
Ex: 1602725456
Time in Unix timestamp format that the request was received
Body
status
(string)
Ex: Success. Cache has been successfully purged.
Purge status. Can be success or error.
Note: HTTP Response Code will be 200 with both successful and unsuccessful purges.
action
(string)
cdn_purge_all
Action requested
Example
Request
curl –-url https://api.cynderhost.com/high-performance/cache/cdn/purge/ \
–-request POST \
–-data-urlencode “API=pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=”
Response
{
“status”:”Success. Cache has been successfully purged.”,
“action”:”cdn_purge_all”
}

OR

{
“status”:”Error. Invalid API key.”,
“action”:”cdn_purge_all”
}

POST
Deprecated https://api.cynderhost.com/high-performance/cache/cdn/purge-some/
Purge CDN Cache (Single URL)
Purges all CDN cached versions of a single URL.

Deprecated This endpoint is deprecated and will stop functioning on April 1st, 2021. /purge-multiple should be used instead.
Request Fields
Headers
Content-Type:
application/x-www-form-urlencoded
All body values should be passed as key-value, url-encoded data.
Body
API
(string)
Ex: pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=
API key for applicable site
URL
(string)
Ex: know.cynderhost.com/blog/
Full URL to be purged, without the protocol
Response Fields
Headers
Content-Type:
application/json
Returned data is in JSON format
X-Req-Token:
Ex: 61634623456
A random number generated for validation purposes
X-Req-Epoch:
Ex: 1602725456
Time in Unix timestamp format that the request was received
Body
status
(string)
Ex: Success. Cache has been successfully purged.
Purge status. Can be success or error.
Note: HTTP Response Code will be 200 with both successful and unsuccessful purges.
action
(string)
cdn_purge_single
Action requested
Example
Request
curl –-url https://api.cynderhost.com/high-performance/cache/cdn/purge-some/ \
-–request POST \
–-data-urlencode “API=pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=” \
–-data-urlencode “URL=know.cynderhost.com/blog/”
Response
{
“status”:”Success. Cache has been successfully purged.”,
“action”:”cdn_purge_single”
}

OR

{
“status”:”Error. Invalid API key.”,
“action”:”cdn_purge_single”
}

POST
https://api.cynderhost.com/high-performance/cache/cdn/purge-multiple/
Purge CDN Cache (Multiple URLs)
Purges all CDN cached versions of a list of URLs
Request Fields
Headers
Content-Type:
application/x-www-form-urlencoded
All body values should be passed as key-value, url-encoded data.
Body
API
(string)
Ex: pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=
API key for applicable site
URLS
(JSON List)
Ex: [“know.cynderhost.com/blog/”,”know.cynderhost.com/”]
List of full URLs to be purged, without the protocol in JSON format
Response Fields
Headers
Content-Type:
application/json
Returned data is in JSON format
X-Req-Token:
Ex: 2818283833
A random number generated for validation purposes
X-Req-Epoch:
Ex: 1602725456
Time in Unix timestamp format that the request was received
Body
status
(string)
Ex: Success. Cache has been successfully purged.
Purge status. Can be success or error.
Note: HTTP Response Code will be 200 with both successful and unsuccessful purges.
action
(string)
cdn_purge_multiple
Action requested
Example
Request
curl –-url https://api.cynderhost.com/high-performance/cache/cdn/purge-multiple/ \
-–request POST \
-–data-urlencode “API=pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=” \
–-data-urlencode “URLs=[\”know.cynderhost.com/blog/\”,\”know.cynderhost.com/\”]”
Response
{
“status”:”Success. Cache has been successfully purged.”,
“action”:”cdn_purge_multiple”
}

OR

{
“status”:”Error. Invalid API key.”,
“action”:”cdn_purge_multiple”
}

Server Routes #

POST
https://api.cynderhost.com/high-performance/cache/local/purge/
Purge Server Cache (Everything)
Purges all server cached files for the domain of the API key provided.
Request Fields
Headers
Content-Type:
application/x-www-form-urlencoded
All body values should be passed as key-value, url-encoded data.
Body
API
(string)
Ex: pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=
API key for applicable site
HOST
(string)
Ex: proton
Nickname of server where site is hosted, derived from the hostname
Response Fields
Headers
Content-Type:
application/json
Returned data is in JSON format
X-Req-Token:
Ex: 1828237373
A random number generated for validation purposes
X-Req-Epoch:
Ex: 1602725456
Time in Unix timestamp format that the request was received
Body
status
(string)
Ex: Success. Local server cache has been successfully purged
Purge status. Can be success or error.
Note: HTTP Response Code will be 200 with both successful and unsuccessful purges.
action
(string)
server_purge_all
Action requested
Example
Request
curl –-url https://api.cynderhost.com/high-performance/cache/local/purge/ \
–-request POST \
–-data-urlencode “API=pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=” \
–-data-urlencode “HOST=proton”
Response
{
“status”:”Success. Local server cache has been successfully purged.”,
“action”:”server_purge_all”
}

OR

{
“status”:”Error. Invalid API key.”,
“action”:”server_purge_all”
}

POST
Deprecated https://api.cynderhost.com/high-performance/cache/local/purge-some/
Purge Server Cache (Single URL)
Purges all server cached versions of a single URL.

Deprecated This endpoint is deprecated and will stop functioning on April 1st, 2021. /purge-multiple should be used instead.
Request Fields
Headers
Content-Type:
application/x-www-form-urlencoded
All body values should be passed as key-value, url-encoded data.
Body
API
(string)
Ex: pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=
API key for applicable site
URL
(string)
Ex: know.cynderhost.com/blog/
Full URL to be purged, without the protocol
HOST
(string)
Ex: proton
Nickname of server where site is hosted, derived from the hostname
Response Fields
Headers
Content-Type:
application/json
Returned data is in JSON format
X-Req-Token:
Ex: 61634623456
A random number generated for validation purposes
X-Req-Epoch:
Ex: 1602725456
Time in Unix timestamp format that the request was received
Body
status
(string)
Ex: Success. Local server cache has been successfully purged.
Purge status. Can be success or error.
Note: HTTP Response Code will be 200 with both successful and unsuccessful purges.
action
(string)
server_purge_single
Action requested
Example
Request
curl –-url https://api.cynderhost.com/high-performance/cache/local/purge-some/ \
-–request POST \
–-data-urlencode “API=pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=” \
–-data-urlencode “URL=know.cynderhost.com/blog/” \
–-data-urlencode “HOST=proton”
Response
{
“status”:”Success. Local server cache has been successfully purged.”,
“action”:”server_purge_single”
}

OR

{
“status”:”Error. Invalid API key.”,
“action”:”server_purge_single”
}

POST
https://api.cynderhost.com/high-performance/cache/local/purge-multiple/
Purge Server Cache (Multiple URLs)
Purges all server cached versions of a list of URLs
Request Fields
Headers
Content-Type:
application/x-www-form-urlencoded
All body values should be passed as key-value, url-encoded data.
Body
API
(string)
Ex: pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=
API key for applicable site
URLS
(JSON List)
Ex: [“know.cynderhost.com/blog/”,”know.cynderhost.com/”]
List of full URLs to be purged, without the protocol in JSON format
HOST
(string)
Ex: proton
Nickname of server where site is hosted, derived from the hostname
Response Fields
Headers
Content-Type:
application/json
Returned data is in JSON format
X-Req-Token:
Ex: 2818283833
A random number generated for validation purposes
X-Req-Epoch:
Ex: 1602725456
Time in Unix timestamp format that the request was received
Body
status
(string)
Ex: Success. Local server cache has been successfully purged.
Purge status. Can be success or error.
Note: HTTP Response Code will be 200 with both successful and unsuccessful purges.
action
(string)
server_purge_multiple
Action requested
Example
Request
curl –-url https://api.cynderhost.com/high-performance/cache/local/purge-multiple/ \
-–request POST \
-–data-urlencode “API=pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=” \
–-data-urlencode “URLs=[\”know.cynderhost.com/blog/\”,\”know.cynderhost.com/\”]” \
–-data-urlencode “HOST=proton”
Response
{
“status”:”Success. Local server cache has been successfully purged.”,
“action”:”server_purge_multiple”
}

OR

{
“status”:”Error. Invalid API key.”,
“action”:”server_purge_multiple”
}

POST
https://api.cynderhost.com/high-performance/cache/local/status/
Set Server Cache Status
Turns the local server cache on or off
Request Fields
Headers
Content-Type:
application/x-www-form-urlencoded
All body values should be passed as key-value, url-encoded data.
Body
API
(string)
Ex: pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=
API key for applicable site
STATUS
(string)
Ex: active
Either “active” or “inactive” to turn cache on or off
HOST
(string)
Ex: proton
Nickname of server where site is hosted, derived from the hostname
Response Fields
Headers
Content-Type:
application/json
Returned data is in JSON format
X-Req-Token:
Ex: 2818283833
A random number generated for validation purposes
X-Req-Epoch:
Ex: 1602725456
Time in Unix timestamp format that the request was received
Body
status
(string)
Ex: Local cache setting updated.
Purge status. Can be success or error.
Note: HTTP Response Code will be 200 with both successful and unsuccessful purges.
new_status
(string)
Ex: active
New server cache status
action
(string)
server_set_cache_status
Action requested
Example
Request
curl –-url https://api.cynderhost.com/high-performance/cache/local/status/ \
-–request POST \
-–data-urlencode “API=pAcc7C32CMFy1b2N1Ad7C6l+c7cujAQlT0=” \
–-data-urlencode “STATUS=active” \
–-data-urlencode “HOST=proton”
Response
{
“status”:”Local cache setting updated.”,
“action”:”server_set_cache_status”
}

OR

{
“status”:”Error. Invalid API key.”,
“action”:”server_set_cache_status”
}

Responses #

“status”:”Success. Cache has been successfully purged.”

The CDN cache was successfully purged.

“status”:”Success. Local server cache has been successfully purged.”

The server cache was successfully purged.

“status”:”Local cache setting updated.”

The server cache status was sucessfully updated.

“status”:”Invalid Hostname.”

An invalid hostname was provided. Make sure the .cynderhost.com is not included. (proton.cynderhost.com => proton)

“status”:”Error. Purge API failed. Please contact your host.”

OR

“status”:”Internal API Error. Please contact CynderHost.”

An internal error occurred. Try again at a later time or contact us.

“status”:”Error. API Key Missing. Please enter one in the settings.”

An API key was not receive with the request. Check the request method and field spelling

“status”:”Error. Invalid API key.”

An API key was provided but was invalid. Check for any extra spaces or characters.

“status”:”Error. Invalid API key provided for domain to purge for (Don’t include http or https).”

An valid API key was provided, but the URL(s) provided were not under the scope for the API. Make sure the correct key is being used and the URL(s) are passed properly.