From 12acd435007165243b12ce8b8b1951fb711cf18d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 9 Aug 2023 16:35:05 +0200 Subject: [PATCH] Introduce the DELETE endpoint --- proposals/3814-dehydrated-devices-with-ssss.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/proposals/3814-dehydrated-devices-with-ssss.md b/proposals/3814-dehydrated-devices-with-ssss.md index 32913ca484..53222a1486 100644 --- a/proposals/3814-dehydrated-devices-with-ssss.md +++ b/proposals/3814-dehydrated-devices-with-ssss.md @@ -162,6 +162,24 @@ it can delete the dehydrated device and create a new one. If the given `device_id` is not the dehydrated device ID, the server responds with an error code of `M_FORBIDDEN`, HTTP code 403. +### Deleting a dehydrated device + +A dehydrated device will get replaced whenever a new device gets uploaded using +the `PUT /dehydrated_device`, this makes a `DELETE /dehydrated_device` +unnecessary, though for completeness sake and to give client authors to get back +to a state where no dehydrated device exists for a given user we will introduce +one. + +`DELETE /dehydrated_device` + +Response: + +```json +{ + "device_id": "dehydrated device's ID" +} +``` + ### Device Dehydration Format TODO: define a format. Unlike MSC2679, we don't need to worry about the