Skip to main content Skip to navigation

Marking a page as deleted

To mark a page as deleted (or, conversely, to restore a deleted page) we set the <sitebuilder:deleted> element. This allows us to perform Sitebuilder two-stage deletes, where a page can be deleted but not purged (the Atom Publishing Protocol DELETE method actually purges the page, see Purging a page).

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="" xmlns:sitebuilder="">

With this saved as deletepage.atom:

mat@augustus:~$ curl -i -X PUT --data-binary @deletepage.atom -H 'Content-Type: application/atom+xml' -u cuscav
Enter host password for user 'cuscav':

HTTP/1.1 200 OK
Date: Tue, 22 Mar 2011 11:04:02 GMT
Server: Penny
Content-Type: application/atom+xml;charset=ISO-8859-1
Content-Length: 1341
Vary: User-Agent

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="" xmlns:sitebuilder="">
  <title>Here is my edited page</title>
  <link rel="collection" 
    href="" />
  <link rel="edit" 
    href="" />
  <link rel="alternate" 
    href="" />
  <content type="html">
    &lt;h2&gt;Hello World!&lt;/h2&gt;
    &lt;p&gt;Here is my newly created page&lt;/p&gt;
    &lt;p&gt;This is an extra line in the modified content of the page.&lt;/p&gt;
    <name>Mathew Mannion</name>
  <sitebuilder:description>A test of the ATOM representation of a page</sitebuilder:description>
  <sitebuilder:keywords>api tests, atom, changed</sitebuilder:keywords>

This is identical to the response for editing the content of a page. If we set <sitebuilder:deleted> to true, we can restore a deleted page.