Delete a File
DELETE/api/files/{source}/{id}
Soft-deletes the metadata row through the core model, so the RISE activity log still fires, and then removes the stored bytes exactly as the RISE interface does. The location is rebuilt from the stored row, resolved with realpath() and skipped unless it is inside the configured files directory. That check runs for every row, including rows held by an external storage service, because the core file deletion falls back to a local unlink whenever the plugin behind a service_type is not installed.
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| source | String | Which file table the id belongs to: project or general |
| id | Number | File unique ID inside that table |
curl -X DELETE "https://yoursite.com/api/files/source/123" \
-H "authtoken: YOUR_API_TOKEN" Success-Response:
HTTP/1.1 200 OK
{
"status": 200,
"messages": {"success": "The record has been deleted."}
} Error-Response:
HTTP/1.1 400 Bad Request
{ "status": false, "messages": { "error": "The record is in use, you can't delete the record!" } }