Open SOCSSabaragamuwa opened 6 years ago
There are three types of roles: user, admin and moderator. If the role is not set, it should default to user.
POST /users Request schema 1
{ “email”: “user@gmail.com” }
Response schema 1 Status 201: Return if the user was successfully created.
{ “self”: “http://localhost:8090/api/users/{user_id}”, “email”: “user@gmail.com”, "role": "user" }
Request schema 2
{ “email”: “moderator@letmehack.lk”, "role": "moderator" }
Response schema 2
{ “self”: “http://localhost:8090/api/users/{user_id}”, “email”: “moderator@letmehack.lk”, "role": "moderator" }
Status 400 Return if the input is invalid (e.g. invalid role name).
Note
There are three types of roles: user, admin and moderator. If the role is not set, it should default to user.
POST /users Request schema 1
Response schema 1 Status 201: Return if the user was successfully created.
Request schema 2
Response schema 2
Status 400 Return if the input is invalid (e.g. invalid role name).
Note