This repository has been archived by the owner on Mar 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
User Endpoint API Reference
ryanfaulkenberry100 edited this page Mar 1, 2017
·
10 revisions
Method | Endpoint | Verb | Description |
---|---|---|---|
CreateUser | /user |
POST | Creates a user |
ModifyUser | /user/:uid |
PUT | Modifies a user |
DeleteUser | /user/:uid |
DELETE | Deletes a user |
GetUser | /user/:uid |
GET | Returns a user |
Creates a user
-
Endpoint:
/user
-
Verb: POST
-
Request:
{ "approvalStatus" : BOOLEAN, "email" : STRING , "firstName" : STRING, "lastName" : STRING, "points" : { "career" : NUMBER, "community" : NUMBER, "firstother" : NUMBER, "firstworkshops" : NUMBER, "mentor" : NUMBER, "other" : NUMBER, "outreach" : NUMBER, "professor" : NUMBER, "staff" :NUMBER, "misc": NUMBER, }, "role" : ENUM/STRING, "studentId" : STRING }
-
Response:
STATUS 201 - Returns the new user's uid
{ "uid" : NUMBER, }
Modifies a user
-
Endpoint:
/user/:uid
-
Verb: PUT
-
Request:
{ "requesterUid" : NUMBER, "approvalStatus" : BOOLEAN, "email" : STRING , "firstName" : STRING, "lastName" : STRING, "points" : { "career" : NUMBER, "community" : NUMBER, "firstother" : NUMBER, "firstworkshops" : NUMBER, "mentor" : NUMBER, "other" : NUMBER, "outreach" : NUMBER, "professor" : NUMBER, "staff" :NUMBER, "misc": NUMBER, }, "role" : ENUM/STRING, "studentId" : STRING }
-
Response:
STATUS 200
Deletes a user
-
Endpoint:
/user/:uid
-
Verb: DELETE
-
Request:
None
-
Response:
STATUS 200
Returns a user
-
Endpoint:
/user/:uid
-
Verb: GET
-
Request:
None
-
Response:
STATUS 200 - Returns either a student or an admin, and a link to somewhere else
{ "student" : { "approvalStatus" : BOOLEAN, "email" : STRING , "firstName" : STRING, "lastName" : STRING, "points" : { "career" : NUMBER, "community" : NUMBER, "firstother" : NUMBER, "firstworkshops" : NUMBER, "mentor" : NUMBER, "other" : NUMBER, "outreach" : NUMBER, "professor" : NUMBER, "staff" :NUMBER, "misc": NUMBER, }, "role" : ENUM/STRING, "studentId" : STRING }, "url" : "www.this.com/elsewhere" }
OR
Admin
{ "admin" : { "email" : STRING, "firstName" : STRING, "lastName" : STRING, "role" : ENUM/STRING, }, "url" : "www.this.com/elsewhere" }
test sidebar