DevCamper API

Backend API for the DevCamper applicaion to manage bootcamps, courses, reviews, users and authentication

Authentication 8

Description

Add user to database with encrypted password

Headers
KeyValueDescription
application/json
Body
{ "name": "佐藤 高子", "email": "takako@gmail.com", "password": "123456", "role": "publisher" }
Description

Login User

Headers
KeyValueDescription
application/json
Body
{ "email": "kazuko@gmail.com", "password": "123456" }
Description

Get Logged in User via Token

Headers
KeyValueDescription
Content-Typeapplication/json
Description

Generate password token and send email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Body
{ "email": "kazuko@gmail.com" }
Description

Reset user password using token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Body
{ "password": "1234567" }
Description

Update logged in user name and email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Body
{ "name": "大和田 和子", "email": "kazuko1@gmail.com" }
Description

Update logged in user password, send in the body currentPassword and newPassword

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Body
{ "currentPassword": "1234567", "newPassword": "123456" }
Description

Logout User and clear token cookie

Headers
KeyValueDescription
Content-Typeapplication/json

Courses 7

Description

Get all courses in database

Description

Create a course for a specific patient

Body
{ "severity": "中等症", "auditAt": "2020-02-24", "testedAt": "2020-02-22", "currentFluHistory": "一人暮らし.デイサービスには通っていた.", "hospitalization": false, "outcome": "生存" }
Description

Update Patient single Course

Body
{ "currentFluHistory": "ハンバーガーショップでの感染が考えられる." }
Description

Route to upload a patient photo

Body
{ "birthday": "19000101" }

Patients 10

Patients CRUD functionality

Description

Fetch all patietns from database. Includes pagination, filtering, etc.

Description

Add new patient to database. Must be authenticated and must be publisher or admin.

Body
{ "karteNo": "2", "ptLastName": "秋元", "ptFirstName": "但", "birthday": "19540330", "telephone": "08013221222", "address": "東京都練馬区石神井町1−2−3", "disease": "脳梗塞 アルツハイマー型認知症 高血圧", "diseaseHistory": "2010年発症の脳梗塞.独居.内服治療中.", "primaryDr": "酒井修", "primaryCM": "居宅介護石神井", "primaryNs": "訪問看護ステーション石神井", "primaryPh": "駅前薬局" }
Description

Update single patient in database

Body
{ "birthday": "19000101" }
Description

Delete patient from database

Description

Get patients by karteNo using lte

Query
KeyValueDescription
karteNo[lte]100
Description

Get Patients’ record of karteNo, lastName, FirstName, and birthday sorted by birthday by primaryPh

Query
KeyValueDescription
selectkarteNo,ptLastName,ptFirstName,birthday
sortbirthday
Description

Get Patients with limit and subsets

Query
KeyValueDescription
limit2
selectkarteNo,ptLastName
Description

Route to upload patient photo

Body
KeyValueDescription

Reviews 6

Manage course reviews.

Description

Get all reviews from database and populate with patient karteNo and name.

Description

Fetch a review from database by id and populate patient karteNo and name.

Description

Insert review for a specific patient

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Body
{ "title": " nice patient", "text": "I learned a lot", "rating": 8 }
Description

Update review in database for patient

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Body
{ "title": " ultra great patient" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Users 5

CRUD functionality for users only available to admins

Description

Get all users (admin)

Description

Add user to database(admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Body
{ "name": "石神井 吉次郎", "email": "kichijirou@gmail.com", "password": "123456" }
Description

Update user in database(admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE

Body
{ "name": "石井 吉次郎" }
Description

Delete user from database(admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON TYPE