An Express + Node.js API for School in the Cloud
TODO: Write background section
This project has an app.json
file, which allows us to offer "one-click deployment" to Heroku. This will allow you to get your own version of School in the cloud up and running both quickly and painlessly.
NOTE: Before clicking the button below you'll want to make sure you've completed the prerequisite setup steps in the complete documentation.
Most routes require authentication, and School in the Cloud handles authentication by looking for a valid JWT's on the Authorization
header of a given request.
Valid JWTs are provided by the Auth0 integration with our React application. However -- for testing -- You can get a token programattically using the Auth0 Management API.
route | methods | description | Docs |
---|---|---|---|
api/auth/ |
POST | Takes a valid JWT provided by Auth0 and logs the user in | JS Docs |
route | methods | description | Docs |
---|---|---|---|
api/users |
GET | Gets all users in the database | JS Doc |
api/user/volunteers |
GET | Get all users with the role of Volunteer | JS Doc |
api/users/volunteers/approved |
GET | Get all users with the role of Volunteer that are approved | JS Doc |
api/users/volunteers/pending |
GET | Get all users with the role of Volunteer that are not approved | JS Doc |
api/users/volunteers/donator |
GET | Get all users with the role of Volunteer that are donators | JS Doc |
api/users/volunteers/donator |
GET | Get all users with the role of Volunteer that are donators | JS Doc |
api/users/:email |
GET | Get user with specific email | JS Doc |
api/users/:id |
DELETE | Delete a specific user in the database | JS Doc |
route | methods | description | Docs |
---|---|---|---|
api/training-series/ |
GET, POST | Get all training series in database and/or Create a new training series | JS Doc |
api/training-series/:id |
GET, PUT, DELETE | Read, Update, and Delete specific Training Series | JS Doc |
api/training-series/:id/volunteers |
DELETE, POST | Get Volunteers in specific Training Series and add Volunteer to a training series | JS Doc |
api/training-series/:id/volunteers/:user_id |
DELETE | Delete Volunteer (User) that is a part of the training series | JS Doc |
api/training-series/volunteers/:user_id |
GET | Gets the Training Series the specific User is a part of | JS Doc |
route | methods | description | Docs |
---|---|---|---|
api/classes |
GET, POST | Get all the Classes in the database and/or Create a new Class | JS Doc |
api/classes/:id |
GET, PUT, DELETE | Read, Delete, Update specific class | JS Doc |
api/classes/:id/volunteers |
GET, POST | Get Volunteers in a specific class and/or add a Volunteer to a specific class | JS Doc |
api/classes/:id/volunteers/:user_id |
Delete | Delete (Remove) volunteer from specific Class | JS Doc |
route | methods | description | Docs |
---|---|---|---|
api/messages/ |
GET, POST | Get all Messages in the database and/or Create a new Message | JS Doc |
api/messages/:id |
GET, PUT, DELETE | Read, Update, and Delete specific Messages | JS Doc |
route | methods | description | Docs |
---|---|---|---|
api/notifications/ |
GET, POST | Get all Notifications associated with an authenticated User and/or Create a new Notification associated with an authenticated User | JS Doc |
api/notifications/:id |
GET | Get specific Notifications | JS Doc |
api/notifications/:id/response |
GET | Get all Responses associated with an authenticated User for specific Notification | JS Doc |
api/notifications/:id/delete |
DELETE | Delete specific Notifications | JS Doc |