From 857fe5a3ec18cf2799b26bdd60dec4b5070c909d Mon Sep 17 00:00:00 2001
From: safarte <bchichereau@gmail.com>
Date: Mon, 7 Oct 2019 18:19:06 +0200
Subject: [PATCH] readme

---
 README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/README.md b/README.md
index d5c2032..64c9843 100644
--- a/README.md
+++ b/README.md
@@ -17,3 +17,49 @@ yarn install
 ## Usage
 
 To run this website locally execute `yarn start` in the working directory.
+
+## API
+
+`GET /users => [Object]` -> Lists all users
+
+`GET /users/id => Object` -> Get the info about the user with asked id
+
+`GET /boards => [Object]` -> Lists all boards
+
+`GET /boards/id => Object` -> Get the info about the board with asked id
+
+`GET /messages?board=id => [Object]` -> Get the messages from the board with asked id
+
+To post a message from specified user on specified board:
+
+```json
+POST /messages
+body:
+{
+  content: "blabla",
+  userId: 42,
+  boardId: 1
+}
+```
+
+To register a new user (returns the user):
+
+```json
+POST /users => Object
+body:
+{
+  username: "blabla",
+  paswword: "verysecure"
+}
+```
+
+To login an user (returns a list containing the matching users):
+
+```json
+POST /login => [Object]
+body:
+{
+  username: "blabla",
+  paswword: "verysecure"
+}
+```
-- 
GitLab