Skip to content

Students

Alex Crowley edited this page Feb 15, 2017 · 7 revisions

Students are applicants in the Xtern recruiting process. They contain all the necessary information required for viewing student information and comments related to them made by recruiters.

API Overview

The following routes are supported for performing operations on the Student entity.

CreateStudent POST /student
GetStudent GET /student/{studentKey}
GetStudents GET /student
ExportStudents GET /student/export
SetGrade PUT /student/{studentKey}/grade
SetStatus PUT /student/{studentKey}/status
(Deprecated) UpdateResume POST /student/{Id}

JSON Representation:

Skill Structure:

Skills are categorized in order to provide filtering for a particular desired skill domain and to provide a color code for skills to make recruiting easier.

name string Language or skill name
category string Category the language falls under

Grade Structure:

Grades are given in the recruitment process to provide a ranking mechanism for Students. Each Grade contains the key to the reviewer and the associated grade.

reviewer int Id of the reviewer grade float Numeric value of assessment to control granularity

Comment Structure:

authorName string Author of Comment
author int Id of the author message string Content of comment

Student Structure:

A Student contains all the information that was filled out during the application process. The Student uses the Language, Grade and Comment structures for fields.

_id int64 Id reference
firstName string First name
lastName string Last name
email string Email address
university string University attended
major string Student major
gradYear string Expected graduation year
workStatus string Current work status (Citizen, Visa, etc.)
homeState string Home state
gender string Gender
skills List of(Skill) List of known programming languages and skills
resume string Link to resume for retrieval
linkedinUrl string Link to LinkedIn profile
personalWebiteUrl string Link to personal website
interests List of(string) List of job types student is interested in
grade float Grade from reviewing the student
reviewerGrades List of(Grade) Grades from reviewers of the student
status string Current status in the Recruitment process

API Reference

Note: to run in Postman, just take the information contained in the quotes of --data and paste in the body field.

CreateStudent

Takes an array of students and adds them to the database

URL Structure:

(POST) xtern-matching.appspot.com/student

Example Request:

curl -X POST xtern-matching.appspot.com/student \
--data '[{
"firstName": "Darla", 
"lastName": "Leach", 
"email":"[email protected]",
"university": "Rose-Hulman Institute of Technology", 
"major": "Computer Engineering",
"gradYear": "2017", 
"workStatus": "US Citizen", 
"homeState": "West Virginia", 
"gender": "female",
"languages": [{"name": "Hadoop", "category": "Database"}, 
              {"name": "Firebase", "category": "Database"}],
"resume": "", 
"githubUrl": "https://github.com/xniccum", 
"linkedinUrl": null, 
"personalWebiteUrl": null,
"interestedIn": ["Software Engineer- Middle-tier Dev.", "Product Management"], 
"interestedInEmail": "false",
"r1Grade": {"text": "C", "value": "2"}, 
"status": "Stage 1 Approved",
"comments": [{"author": "Yesenia Larsen", "group": "Xtern", "text": "Lorem ipsum ..."}]}]'

Returns

None

Errors

Internal Server Error 500:

Invalid Student JSON formatting
Invalid structure for Datastore


GetStudent

Retrieves the requested Student by Id

URL Structure:

xtern-matching.appspot.com/student/{Id}

Example Request:

curl -X GET xtern-matching.appspot.com/student/01234567

Returns

Student JSON representation. See Student data format for more information.

Errors

Bad Request 400:

Missing or invalid Id in request

Internal Server Error 500:

Datastore ErrFieldMismatch if types do not agree of if data structure models differ


GetStudents

Retrieves all Students in the database

URL Structure:

xtern-matching.appspot.com/student

Example Request:

curl -X GET xtern-matching.appspot.com/student

Returns

List of Student JSON representations from entire dataset. See Student data format for more information.

Errors

Internal Server Error 500:

Datastore ErrFieldMismatch if types do not agree of if data structure models differ


ExportStudents

Exports all students in the database to a csv file

URL Structure:

xtern-matching.appspot.com/student/export

Example Request:

curl -X GET xtern-matching.appspot.com/student/export

Returns

students.csv : Exported list of students in CSV formatting

Errors

Internal Server Error 500:

Datastore ErrFieldMismatch if types do not agree of if data structure models differ


SetGrade

Sets the Grade of a particular student

URL Structure:

xtern-matching.appspot.com/{studentKey}/grade

Example Request:

curl -X GET xtern-matching.appspot.com/{studentKey}/grade
--data '{grade : 5.0}'

Returns

None

Errors

Internal Server Error 500:

Datastore ErrFieldMismatch if types do not agree of if data structure models differ

SetStatus

Sets the Status of a particular student

URL Structure:

xtern-matching.appspot.com/{studentKey}/status

Example Request:

curl -X GET xtern-matching.appspot.com/{studentKey}/status
--data '{status : "Accepted"}'

Returns

None

Errors

Internal Server Error 500:

Datastore ErrFieldMismatch if types do not agree of if data structure models differ


UpdateResume

(Deprecated) Updates the resume of a particular student

URL Structure:

xtern-matching.appspot.com/student/resume/{Id}

Example Request:

curl -X POST xtern-matching.appspot.com/student/resume/01234567	\
-F "[email protected]"

Returns

None

Errors

Forbidden 403:

Maximum alotted file size of 8Mb exceeded Missing or invalid Id in request

Internal Server Error 500:

No file included in multi-part form
Error creating storage bucket if nonexistent
Error adding resume to storage bucket
Error retrieving student
Error updating student