Delete a file
Deletes a file from the SFS storage space associated with a particular CDN zone.
Note: SFS has been deprecated and replaced by Sonic - PUSHR's new S3-compatible object storage service. The following SFS API is being ported to Sonic for compatibility reasons, but may become unsupported in the future. We strongly recommend that you use the S3 API instead.
Endpoint
https://web.de01.sonic.r-cdn.com/api/v3/deleteMethods
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 "https://web.de01.sonic.r-cdn.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 "https://web.de01.sonic.r-cdn.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.