Purge File(s)

This action is available only for accelerated virtual servers.

To purge one or several files, the system will compare the checksum of the cached file and the new one. The cached file will only be purged if the checksums vary, that is, the files are different. If the checksum of the two files are the same, the cached file will not be purged.

To purge one or several cached files, use the following request:

POST /virtual_machines/:virtual_machine_id/purge.xml
POST /virtual_machines/:virtual_machine_id/purge.json

XML Request Example

curl -i -X POST -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' --url 'http://onapp.test/virtual_machines/12/purge.xml' -d '<purge_paths type="array"><purge_path>http://ww-real-stat3.com/path2</purge_path><purge_path>http://ww-real-stat4.com/path3</purge_path></purge_paths>'

JSON Request Example

curl -i -X POST -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'--url 'http://onapp.test/virtual_machines/12/purge.json' -d '{"purge_paths":["http://ww-real-stat3.com/path2", "http://ww-real-stat4.com/path3"]}'


purge_path - the path to the file you want to purge

If you need to purge all content, refer to Purge All Content.