You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node RESTful api for uptime monitoring application
Functionalities:
Users can enter a url they want to monitor and receive text alerts when the url goes down or is back online
sign up and sign in features
Twilio API to trigger text messages on state change (please create account and get auth token from https://www.twilio.com/ and edit the config.js file accordingly )
API Specifications
Accepts CRUD requests
API allows client connection for user CRUD
Token management and authentication for sign in
Invalidate token on Sign out
Signed in user can add URL to checks
Signed in user can edit delete checks
keep monitoring the urls every minute and create alerts on state change(i.e. up or down)
Temporarily stored in file system rather than a database
GET: Get the users checks and info
* Required Params
1. qString: phone
2. Headers: token
POST: Create a user
* Required Params
Body:
```javascript
'firstName': String,
'lastName': String,
'phone': Number, //must be equal to 10
'password': String,
'tosAgreement': true //true or false only create user if true
```
PUT: Change the user's first name or last name or password
* Required Params
1. Headers: token id
2. Body:
```javascript
'firstName': String, // optional
'lastName': String, // optional
'phone': Number, // Required
'password': String, // Password to be changed
```
DELETE: Delete the user
* Required Params
1. qString: phone
2. Headers: token
GET: Get the token and it's associated account, and it's expiry
* Required Params
1. qString: token id
POST: Create a token for a user
* Required Params
Body:
```javascript
'phone': Number, //must be equal to 10
'password': String,
```
PUT: Extend the token expiry by a predefined time
* Required Params
1. Body:
```javascript
'tokenId': String, // optional
'extends': true, // optional
```
DELETE: Delete the Toke
* Required Params
1. qString: tokenId