Remote wipe client api docs

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma
2019-05-16 09:46:52 +02:00
parent ffd15411d0
commit 6c4c9f7273
2 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
.. _remotewipeindex:
===========
Remote wipe
===========
This document provides a quick overview of the remote wipe API that should be used by clients to implement the remote wipe functionality.
This will allow users to wipe a lost device for example.
Note that wiping only works when clients use the login flow so that a dedicated token is set for this client.
Obtaining wipe status
---------------------
Once a client recieves a 401 or 403 status response it will do a fetch to :code:`<server>/index.php/core/wipe/check` and set the
token parameter to the apptoken.
.. code-block:: bash
curl https://cloud.example.com/index.php/core/wipe/check -X POST -d 'token=<TOKEN>'
In case the client gets back a 200 status code and a JSON array with wipe set to true like:
.. code-block:: json
{
"wipe":true
}
then the client should proceed to wipe the device.
Wiping the actual device
------------------------
The client must remove all user data linked to the account. This includes:
* caches
* offline files
* the actual account itself
Signalling completion
----------------------
Once the client has wiped all the required data a POST to :code:`<server>/index.php/core/wipe/success` has to be made with the token.
This signals the server the wipe is completed and triggers the final cleanup on the server side.
.. code-block:: bash
curl https://cloud.example.com/index.php/core/wipe/success -X POST -d 'token=<TOKEN>'

View File

@@ -10,3 +10,4 @@ Client APIs
WebDAV/index
OCS/index
LoginFlow/index
RemoteWipe/index