From 6eec09257051f733445ee14c1518a4c4aea8a19b Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Fri, 20 Dec 2024 02:31:34 +0000 Subject: [PATCH] added how to delete --- User-and-Role.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/User-and-Role.md b/User-and-Role.md index 2d1b496..266b0f6 100644 --- a/User-and-Role.md +++ b/User-and-Role.md @@ -22,4 +22,25 @@ curl "http://localhost:8000/api/v2/account/users" \ -H 'content-type: application/json' \ -H "X-API-Key: xmB6rIuSSL9MpZqY678pF" \ --data-raw '{"type":0,"roleId":"admin_id","name":"test12231","password":"tesT1233-123","privilege":{"all":false,"sites":["66dcddb804aa0d2978cf145f"]},"alert":false}' +``` + + +## Deleting a user +Request type DELETE +You will need userid for this request +In this example the userid is `6764d103fb5a2a7a6b67c753` +```bash +curl "http://localhost:8000/api/v2/users/6764d103fb5a2a7a6b67c753" \ + -X 'DELETE' \ + -H 'content-type: application/json' \ + --data-raw '{"forceDelete":true}' \ + -H "X-API-Key: xmB6rIuSSL9MpZqY678pF" +``` +Expected success repose is +```json +{ + "errorCode": 0, + "msg": "Success." +} + ``` \ No newline at end of file