Flush Single File Cache via API


#1

In the documentation it references two files when trying to flush a single file via the API. What is the significance of each file name? If I wanted to just flush a single file, what is the minimum payload to send the API to flush just that one file, globally and on all devices?

Ref.
{“files”:
[
https://aeroaccess.ebizcdn.com/media/illuminate-mission-banner.jpg”,
{
“url”: “https://aeroaccess.ebizcdn.com/media/illuminate-mission-banner.jpg”,
“headers”: {
“Origin”: “cloudflare.com”,
“CF-IPCountry”: “US”,
“CF-Device-Type”: “desktop”
}
}
]
}


#2

If you just want to purge URLs, put those in the array simply:

[
  "http://www.example.com/css/styles1.css",
  "http://www.example.com/css/styles2.css",
  "http://www.example.com/css/styles3.css"
]

For just one:

[
  "https://aeroaccess.ebizcdn.com/media/illuminate-mission-banner.jpg"
]

To purge files with custom cache keys, include the headers used to compute the cache key as in your example.

More at: https://api.cloudflare.com/#zone-purge-individual-files-by-url