Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The production server AWS Chalice:port is https://4wuiajclt6.execute-api.us-east-1.amazonaws.com/api/ (Used for demographic tabs on the website)

The API for the feature that allows researchers to upload csv files is located in mobile server, the guidance can be found here: Backend Online APIs 

The reason why the dashboard backend APIs are located everywhere instead of one place is because the dashboard team Sp22 and Summer22 could

not find a way to successfully build backend code and develop it without causing errors. So write APIs at other places is a work-around.


URL/api/login/
DescriptionLogin a user, and set cookie for authentication
MethodPOST
Url Param
Request Body Data
  1. HTML Form Submission with fields:
    1. email (string)
    2. password (string)
    3. remember_me (optional boolean)
  2. Alternatively, you can manually add following fields in request body as a json format:
    1. email (string)
    2. password (string)
    3. remember_me (optional boolean)
    4. formdata (empty string)
Response
  • {message: "Logged in."} - 200
  • {message: "Bad request format"} - 400
  • {message: "invalid credential(s) provided, please check your credential(s) and try again"} - 400/401
Cookie
  • session: a cookie for trace login status
  • remember_token: a cookie for remember_me feature (only when logged in with remember_me set to true)

...