API сервис для веб-приложения SabfesApp, который создан по подобию Trello. Делал совместно с другом.
API сервис расположен по следющему URL: https://sabfesapp.herokuapp.com/
Front: https://github.com/Sabfes/Trello
-
URL:
/api/auth/signupMethod:
PostBody:
{"username", "password", "email", "role"}Validation:
Password size min = 6, max = 40; Username size max = 20; Email must be like real email.
Роли могут быть следующими: "user", "admin", "mod". Пример:
{"username":"add", "password":"addddd", "email":"add@mail.ru","role":["user"]}.Success response:
code: 200, content: "message": "User registered successfully!". -
URL:
/api/auth/signinMethod:
PostBody:
{"username", "password"}Пример:
{"username":"add", "password":"addddd".Success response:
code: 200, content: {"token", "type", "id", "username", "email", "roles"}. -
URL:
/api/authMethod:
GetConfig:
Must be authorized with
Bearer token.Success response:
code: 200, content: "id".
-
URL:
/api/board/:userIdMethod:
GetConfig:
Must be authorized with
Bearer token.Success response:
code: 200, content: "boards":[]. -
URL:
/api/board/getone/:boardIdMethod:
GetConfig:
Must be authorized with
Bearer token.Success response:
code: 200, content: "board":[]. -
URL:
/api/board/:userIdMethod:
PostBody:
{"boardName", "columns"}Пример:
{"boardName":"newBoard", "columns":[]}.Config:
Must be authorized with
Bearer token.Success response:
code: 200, content: "userId". -
URL:
/api/board/:boardIdMethod:
PutBody:
{"boardName", "columns"}Пример:
{"boardName":"newName"}.Config:
Must be authorized with
Bearer token.Success response:
code: 200, content: "boardId". -
URL:
/api/board/:boardIdMethod:
DeleteConfig:
Must be authorized with
Bearer token.Success response:
code: 200, content: "boardId".
-
URL:
/api/board/col/:columnIdMethod:
GetConfig:
Must be authorized with
Bearer token.Success response:
code: 200, content: "columns":[]. -
URL:
/api/board/col/:boardIdMethod:
PostBody:
{"columnName", "tasks"}Пример:
{"columnName":"newColumn", "tasks":[]}.Config:
Must be authorized with
Bearer token.Success response:
code: 200, content: "boardId". -
URL:
/api/board/col/:columnIdMethod:
PutBody:
{"columnName", "tasks"}Пример:
{"columnName":"newName"}.Config:
Must be authorized with
Bearer token.Success response:
code: 200, content: "columnId". -
URL:
/api/board/col/:columnIdMethod:
DeleteConfig:
Must be authorized with
Bearer token.Success response:
code: 200, content: "columnId".
-
URL:
/api/board/task/:taskIdMethod:
GetConfig:
Must be authorized with
Bearer token.Success response:
code: 200, content: "task". -
URL:
/api/board/task/:columnIdMethod:
PostBody:
{"task"}Пример:
{"task":"do something"}.Config:
Must be authorized with
Bearer token.Success response:
code: 200, content: "columnId". -
URL:
/api/board/task/:taskIdMethod:
PutBody:
{"task"}Пример:
{"task":"new hard task"}.Config:
Must be authorized with
Bearer token.Success response:
code: 200, content: "taskId". -
URL:
/api/board/task/:taskIdMethod:
DeleteConfig:
Must be authorized with
Bearer token.Success response:
code: 200, content: "taskId".