Purging cache via Jenkins bash to Cloudflare API

Is there any documentation someone can point me to that would provide some detail on how to access CF API to manually purge cache on a url path while running deployment via Jenkins?

With my prior service, I had a script that cloned my git repo, getting a list of js/css/xml files that changed recently - then I looped through those to pass them into API calls to purge the cache.

This is helpful on assets that may have otherwise a very long TTL cache default.

I saw a reddit that referenced the potential but was lean on the details, so I’m looking for suggestions on how to do it, or even just links to online documentation that I may have missed in my search.

Hi, here is a link to Cloudflare’s API Doc on purging files by url: https://api.cloudflare.com/#zone-purge-files-by-url

1 Like

Ta. That helps heaps.