DELETE:files/{fileid}

Overview

public. Delete file attachment

Uri Parameters
NameTypeDescription
fileidintidentifies a file by ID
Query Parameters
NameTypeDescription
redirectsint?If zero, do not follow page redirects (only applies when {pageid} is present).
Return Codes
NameValueDescription
BadRequest400Invalid input parameter or request body
Forbidden403Update access to the page is required
NotFound404The requested file could not be found
Ok200The request completed successfully

Message Format

None

Implementation Notes

When a file is deleted, it is moved into the archive. It will remain in the archive until it is either permanently deleted (DELETE:archive/files/{fileid}) or restored (POST:archive/files/restore/{fileid}).  While a file is in the archive, it cannot be modified.

Use GET:files to retrieve a list of files across the site or GET:pages/{pageid}/files to retrieve the files on a specified page.

Code Samples

The following code example deletes file with ID 456:

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("files", "456").Delete();
Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08