API > Cache Invalidation API Endpoint

Overview

The WAF caches static files (images, PDFs, CSS, and JS) by default as well as other file requests as specified by the cache headers returned in responses from your application.

Ideally, all assets would be given unique URLs or fingerprinted when modified. As this is not always practical, this endpoint can be used to manually clear either individual files or the entire cache for your WAF.

POST /api/cache/invalidate

Requests that a single file is removed (invalidated) from the cache. 

Required Parameters

  • api_key - your API Key
  • file_path - path to your file. You should not include the full domain or a beginning slash.

Request Format

POST /api/cache/invalidate

Parameters

api_key=<your-api-key>

file_path=directory/filename.txt

Successful Response - HTTP 200 - application/json
{ 
	"domain": "example.com",
	"success": true,
	"message": "Cache Cleared Request Initiated"
}
Failed Response - HTTP 403 - application/json
{ 
	"success": false,
	"message": "<Error Message>"
}

API Help

We're happy to help you build whatever functionality you need with the API.

Please don't hesitate to :

  • Contact us at support@expditedsecurity.com
  • Book a Call at https://app.harmonizely.com/expedited/30-min

We are a team of developers and sysadmins who are can help troubleshoot and debug whatever API interactions you need to create.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.