Source APIs

post
Purge Cache

https://www.gumlet.com/api/purge/:subdomain
You can purge cache for any image by using our cache purge API.
Request
Response
Request
Path Parameters
subdomain
required
string
Subdomain is same subdomain you created while creating source. If you serve image from example.gumlet.com, please enter only 'example' for this parameter.
Body Parameters
access_token
required
string
Your API Key
path
required
string
Path of image to purge. It should be provided without any query parameters. For example, /public/images/profile.jpg
Response
200: OK
{success: true}

Example cURL request is given below.

curl -X POST -H "Content-Type: application/json" -d '{"access_token": "<your_api_key>", "path": "/public/images/profile.jpg"}' https://www.gumlet.com/api/purge/myimg

Any other response means the cache purge was unsuccessful and the server will return error message along with reason for the same.

Please note, the cache purge can be done for single image only. When you purge for an image, all the derivatives of that image are also purged from cache. We don't provide any API for clearing cache in bulk. If you need any support for such API, please contact us.