From e6ff49bf0dd3a265ae34027d6095fe0451f92a30 Mon Sep 17 00:00:00 2001
From: Jeremy Stanley <fungi@yuggoth.org>
Date: Thu, 12 Sep 2013 18:12:00 +0000
Subject: [PATCH] Document how to delete a pad from Etherpad Lite

Change-Id: I83103041725b7f357c3de4e9c1203d52fdbe5379
---
 doc/source/etherpad.rst | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/doc/source/etherpad.rst b/doc/source/etherpad.rst
index ccfdbb93fa..ebac953a5e 100644
--- a/doc/source/etherpad.rst
+++ b/doc/source/etherpad.rst
@@ -31,3 +31,33 @@ Overview
 
 Apache is configured as a reverse proxy and there is a MySQL database
 backend.
+
+Manual Administrative Tasks
+===========================
+
+The following sections describe tasks that individuals with root
+access may need to perform on rare occasions.
+
+Deleting a Pad
+--------------
+
+On occasion it may be necessary to delete a pad, so as to redact
+sensitive or illegal data posted to it (the revision history it keeps
+makes this harder than just clearing the current contents through a
+browser). This is fairly easily accomplished via the `HTTP API`_, but
+you need the key which is saved in a file on the server so it's easiest
+if done when SSH'd into it locally::
+
+  wget -qO- 'http://localhost:9001/api/1/deletePad?apikey='$(cat \
+  /opt/etherpad-lite/etherpad-lite/APIKEY.txt)'&padID=XXXXXXXXXX'
+
+...where XXXXXXXXXX is the pad's name as it appears at the end of its
+URL. If all goes well, you should receive a response like::
+
+  {"code":0,"message":"ok","data":null}
+
+Browse to the original pad's URL and you should now see the fresh
+welcome message boilerplate for a new pad. Check the pad's history and
+note that it has no authors and no prior revisions.
+
+.. _HTTP API: https://github.com/ether/etherpad-lite/wiki/HTTP-API