Output:
<files.archive>
<file.archive id="{int}" href="{uri}">
<filename>{text}</filename>
<description>{text}</description>
<contents type="{mimetype}" size="{int}" width="{int}" height="{int}" href="{uri}" />
<contents.preview rel="thumb" type="{mimetype}" maxwidth="{int}" maxheight="{int}" href="{uri}" />
<contents.preview rel="webview" type="{mimetype}" maxwidth="{int}" maxheight="{int}" href="{uri}" />
<date.created>{date}</date.created>
<user.createdby id="{int}" href="{uri}">
<nick>{text}</nick>
<username>{text}</username>
<email>{text}</email>
</user.createdby>
<user.deletedby id="{int}" href="{uri}">
<nick>{text}</nick>
<username>{text}</username>
<email>{text}</email>
</user.deletedby>
<date.deleted>{date}</date.deleted>
<page.parent id="{int}" href="{uri}">
<title>{text}</title>
<path>{text}</path>
</page.parent>
</file.archive>
...
</files.archive>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.
The following code example retrieves a list of files in the archive:
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("archive", "files").Get(); Sample response indicating that there is one deleted file in the archive:
<files.archive>
<file.archive id="456" href="http://deki-hayes/@api/deki/archive/files/456/info">
<filename>myfile.jpg</filename>
<description />
<contents type="image/pjpeg" size="53112" width="476" height="480" href="http://deki-hayes/@api/deki/archive/files/456" />
<contents.preview rel="thumb" type="image/pjpeg" maxwidth="160" maxheight="160" href="http://deki-hayes/@api/deki/archive/files/456?size=thumb" />
<contents.preview rel="webview" type="image/pjpeg" maxwidth="550" maxheight="550" href="http://deki-hayes/@api/deki/archive/files/456?size=webview" />
<date.created>2007-08-24T20:44:02Z</date.created>
<user.createdby id="1" href="http://deki-hayes/@api/deki/users/1">
<nick>Admin</nick>
<username>Admin</username>
<email>admin@mindtouch.com</email>
</user.createdby>
<user.deletedby id="1" href="http://deki-hayes/@api/deki/users/1">
<nick>Admin</nick>
<username>Admin</username>
<email>admin@mindtouch.com</email>
</user.deletedby>
<date.deleted>2007-08-24T20:44:08Z</date.deleted>
<page.parent id="29" href="http://deki-hayes/@api/deki/pages/29">
<title>DekiWiki (Hayes)</title>
<path />
</page.parent>
</file.archive>
</files.archive>