From e7c2c6fd03ab38118b1bd91e1357a1ecd2709ac2 Mon Sep 17 00:00:00 2001 From: Patryk Dolata Date: Thu, 17 Dec 2020 17:08:06 +0100 Subject: [PATCH] --- REST-API.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/REST-API.md b/REST-API.md index a055610..1ad2705 100644 --- a/REST-API.md +++ b/REST-API.md @@ -114,6 +114,12 @@ Endpoint using to retrieve logged user profile * **uri**: `/api/profile` + +* **request body**: + + { + "name": "project_1" + } * **success response example**: @@ -148,3 +154,37 @@ Endpoint using to retrieve logged user profile "message": "User profile does not exist", "error": "UserProfile matching query does not exist." } + +## POST /api/projects +Endpoint using to create new user's project + +* **requires authentication**: + + `True` +* **uri**: + + `/api/projects` + +* **request body**: + + { + "name": "project_1" + } + +* **success response example**: + + `status_code: 200` + + { + "id": "82325af3-86d2-4b1c-852d-98d6e276e450", + "name": "project_1", + "created_at": "2020-12-17T16:07:42.050666Z", + "updated_at": "2020-12-17T16:07:42.050707Z" + } +* **error response examples**: + + `status_code: 401` + + { + "detail": "Authentication credentials were not provided." + }