Skip to content
This repository has been archived by the owner on Mar 11, 2019. It is now read-only.

User Endpoint API Reference

ryanfaulkenberry100 edited this page Mar 1, 2017 · 10 revisions

User

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

More Info

CreateUser

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,
    }

ModifyUser

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

DeleteUser

Deletes a user

  • Endpoint: /user/:uid

  • Verb: DELETE

  • Request:

    None

  • Response:

    STATUS 200

GetUser

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

Clone this wiki locally