Skip to content

Latest commit

 

History

History
85 lines (50 loc) · 1.39 KB

File metadata and controls

85 lines (50 loc) · 1.39 KB

SimpleUserOnboarding

Backend API for the onboarding flow for an app and returns a score aggregating the answers

Endpoint

        method : POST
        path : /login
        body : {username:string,password:string}
        Return : JWT_TOKEN:Success | error:Failure

        method : POST
        path : /addAnswer 
        header : {Authorization:JWT_TOKEN}
        body : {answer:[{qid:string,type:string,response:string}]}
        Returns : 200:Success | Failure

        method : GET
        path : /CalcScore 
        header : {Authorization:JWT_TOKEN}
        Returns : 200:Success,Score:Number | Failure

        method:GET
        path : /getAllAnswers 
        header : {Authorization:JWT_TOKEN}
        body : {}
        Returns : 200:Success , answers:[{qid:string,type:string,response:string},...] | Failure

        path: /isOnboarded
        header : {Authorization:JWT_TOKEN}
        Returns : 200:Success , {true|false}  || failure (500:Internal Server Error)

        path: /signup
        body : {username:string,password:string,confirmpassword:string}
        Returns : 200:Success , {true|false}  || failure (500:Internal Server Error|409:User Already Exists)


Arch For Cloud

ER Diagram