Skip to content

POST Student

Julien Lesaffre edited this page Mar 3, 2019 · 5 revisions

Create a new student

Method

POST

URL

/student/{phone}/{firstName}/{lastName}/{email}/{password}/{userId}/{id}/{academicYear}/{major}/{minor}

Params

  • phone - phone number of the student
  • firstName - first name of the student
  • lastName - last name of the student
  • email - email of the student
  • password - password of the student
  • userId - unique ID of the student needed to access the database
  • id - student personal ID
  • academicYear - academic Year of the student (U0, U1, U2, U3 ...)
  • major - faculty/major of the student
  • minor - minor of the student

Output

A JSON array of message header maps, containing the following fields:

  • phone - phone number of the student
  • firstName - first name of the student
  • lastName - last name of the student
  • email - email of the student
  • password - password of the student
  • userId - unique ID of the student needed to access the database
  • id - student personal ID
  • academicYear - academic Year of the student (U0, U1, U2, U3 ...)
  • major - major of the student
  • minor - minor of the student
  • administrator - a null administrator
  • faculty - major of the student
  • coopId - an array of coopId empty.

Example

Request: POST http://localhost:8080/student/438/TestStudentFirstName/TestStudentLastName/testing.student@mail.mcgill.ca/password/-1/260/U1/Software/NA

Success Response:

  • Code: 200
  • Content:
{
"phone":438,
"firstName":"TestStudentFirstName",
"lastName":"TestStudentLastName",
"email":"testing.student@mail.mcgill.ca",
"password":"password",
"userId":-1,"id":260,
"academicYear":"U1",
"major":"Software",
"minor":"NA",
"faculty":"Engineering",
"coopId":[],
"administrator:{ ... },
} 

Back to REST API

Clone this wiki locally