Shivam Tomar (shivam.tomar@sjsu.edu)
This Web Service contains the endpoints required for Cloud Technologies Project1.
Framework used: Node.js Server used: Express Port at which Server listens for requests: 3000
- /getUrls
It returns the URL to the files uploaded by user to S3 storage. HTTP verb: GET query params: key=user_name value={user name for the user logged in user}
-
/addurl
It adds the S3 storgae url to the database. HTTP verb: POST POST body structure: { user_name: {user name of logged in user}, usl: {URL of the file} } -
/updateurl It updates the modify date for the url. HTTP verb: POST POST body structure: { usl: {URL of the file} }
-
/adduser Adds new user to the database. HTTP verb: POST POST body structure: { user_name: {user name of new user}, first_name: {first name of new user}, last_name: {last name of new user}, password: {password of new user} }
-
/login Authenticates user name and password of user. HTTP verb: POST POST body structure: { user_name: {user name of new user}, password: {password of new user} }
-
/deleteurl Deletes the url from database. HTTP verb: POST POST body structure: { url: url }
-
/logout Logs out user and redirect user to login page. HTTP verb: GET
-
/login Return the login page. HTTP verb: GET
-
/user Return the user dashboard. HTTP verb: GET
-
/downloadfile Download the file through CloudFront. The name of file to be downloaded is passed as query params. Ex: /download?file_name=filename.png HTTP verb: GET