Delete Files and Directories
Deletes files or directories from ftpGrid storage.
Multiple delete operations may be performed in a single request.
If a target does not exist, the operation still succeeds and returns OK.
The final state after a successful request is that the specified objects no longer exist.
Required Scope
file.delete
Endpoint
POST /api/delete
Example Request (HTTPie)
http POST https://webN.ftpgrid.com/api/delete \
Authorization:"Bearer YOUR_TOKEN" \
Filelist[]="/documents/report-final.pdf" \
Filelist[]="/archive/2025"
Raw JSON Body
{
"Filelist": ["/documents/report-final.pdf", "/archive/2025"]
}
Request Parameters
| Parameter | Type | Description |
|---|---|---|
Filelist[] | array | Array of full file or directory paths to delete |
Example Response
{
"rslt": "OK"
}
Notes
- Multiple delete operations may be executed in a single request
- Files and directories may both be deleted
- Directories are deleted recursively
- Existing objects are permanently removed
- Non-existing objects do not generate errors
- The endpoint returns
OKif the final desired state is achieved - Errors are only returned if an existing object cannot be deleted
- Paths are UNIX-style paths
- Paths may contain spaces and UTF-8 characters
- Paths are automatically sanitized and normalized
- Invalid or unsafe paths are rejected
- Metadata cleanup may be eventually consistent immediately after deletion