From 49fe181203b0ba2f79f22bf219c22107e1f9ae88 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Wed, 5 Sep 2018 22:16:19 +0300 Subject: [PATCH] Created REST API Boards (markdown) --- REST-API-Boards.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 REST-API-Boards.md diff --git a/REST-API-Boards.md b/REST-API-Boards.md new file mode 100644 index 0000000..4a93b7a --- /dev/null +++ b/REST-API-Boards.md @@ -0,0 +1,19 @@ +## Information about boards of user +``` +curl -H "Authorization: Bearer a6DM_gOPRwBdynfXaGBaiiEwTiAuigR_Fj_81QmNpnf" \ + http://localhost:3000/api/users/XQMZgynx9M79qTtQc/boards +``` + +# The admin takes the ownership of ALL boards of the user (archived and not archived) where the user is admin on. + +| URL | Requires Admin Auth | HTTP Method | +| :--- | :--- | :--- | +| `/api/users/:id` | `yes` | `PUT` | + +```shell +curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \ + -H "Content-type:application/json" \ + -X PUT \ + http://localhost:3000/api/users/ztKvBTzCqmyJ77on8 \ + -d '{ "action": "takeOwnership" }' +``` \ No newline at end of file