Delete a file
Deletes a file from the SFS storage space associated with a particular CDN zone.
Endpoint
http://[STORAGE_SERVER_HOSTNAME]/api/v3/delete
The hostname of the storage server is the same as the FTP server listed in your dashboard.
Methods
POST
Parameters - delete a file
Field | Type | Description |
zone_id | integer | CDN zone serving the content |
url | string | Full URL to the file that shall be deleted, starting with http:// or https://. No trailing slash! |
Parameters - delete a directory
Field | Type | Description |
zone_id | integer | CDN zone serving the content |
url | string | Full URL to the directory that shall be deleted, starting with http:// or https://. Include trailing slash! |
Headers
Field | Type | Description |
APIKEY | string | Your account API key |
Examples
Deleting the file "image.jpg" :
curl -d "zone_id=000" \
-d "url=https://c000z000.r-cdn.com/images/image.jpg" \
-H "Accept: application/json" \
-H "APIKEY: 2d49e8f645d90818783c4e6c46f32ca0677ac401" \
-X POST "http://s02.pushrcdn.com/api/v3/delete"
Deleting the directory "images" and all it's contents:
curl -d "zone_id=000" \
-d "url=https://c000z000.r-cdn.com/images/" \
-H "Accept: application/json" \
-H "APIKEY: 2d49e8f645d90818783c4e6c46f32ca0677ac401" \
-X POST "http://s02.pushrcdn.com/api/v3/delete"
Response
HTTP | JSON | Description |
200 | {"status":"success"} | The file has been deleted |
401 | {"status":"error","description":"msg"} | Wrong API key or zone ID |
520 | {"status":"error","description":"msg"} | Please contact support |
The file is permanently deleted from your storage but may still reside in our edge network's cache. Issue a purge request to clear the cache.