Skip to main content

Course Routes

GET /api/coursesByPlan/:plan_id

Gets a list of courses for a given plan.

NameTypeDescription
Paramsplan_idStringid of plan for which to get courses from
OutputCourse[]list of courses from the specific plan

Sample output

[
{
"_id": {
"$oid": "61ccf7f4723b840004850ea3"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Grade of C- or better in (AS.110.201 or AS.110.212)",
"Expression": "AS.110.201[C]^OR^AS.110.212[C]",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61cce47ca2ec790004427212"
},
{
"$oid": "61cce47ca2ec790004427214"
},
{
"$oid": "61cce47ca2ec790004427210"
},
{
"$oid": "61cce47ca2ec790004427216"
},
{
"$oid": "61cce47ca2ec79000442721c"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61cce47ca2ec790004427209"
},
"plan_id": {
"$oid": "61cce47ca2ec790004427200"
},
"title": "Introduction to Abstract Algebra",
"term": "fall",
"year": "Junior",
"credits": 4,
"number": "AS.110.401",
"area": "Q",
"version": "Fall 2021",
"expireAt": {
"$date": "2021-12-31T00:06:11.259Z"
},
"__v": 0
},
{
"_id": {
"$oid": "61d1b2eccfd6b0000490b269"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Students must have completed Lab Safety training prior to registering for this class. To access the tutorial, login to myLearning and enter 458083 in the Search box to locate the appropriate module.",
"Expression": "EN.990.100[C]",
"IsNegative": "N"
},
{
"Description": "((AS.171.101 AND AS.171.102) OR (AS.171.107 AND AS.171.108) OR (AS.171.101 AND AS.171.108) OR (AS.171.107 AND AS.171.102) OR (EN.530.103 AND EN.530.104) OR (EN.530.123 AND EN.530.124)) AND ((AS.110.106 OR AS.110.108) AND AS.110.109 AND (AS.110.202 OR AS.110.211) AND (EN.550.291 OR AS.110.302) AND (EN.530.241 OR (EN.520.230 AND EN.520.231)))",
"Expression": "(^(^AS.171.101[C]^AND^AS.171.102[C]^)^OR^(^AS.171.107[C]^AND^AS.171.108[C]^)^OR^(^AS.171.101[C]^AND^AS.171.108[C]^)^OR^(^AS.171.107[C]^AND^AS.171.102[C]^)^OR^(^EN.530.103[C]^AND^EN.530.104[C]^)^OR^(^EN.530.123[C]^AND^EN.530.124[C]^)^)^AND^(^(^AS.110.106[C]^OR^AS.110.108[C]^)^AND^AS.110.109[C]^AND^(^AS.110.202[C]^OR^AS.110.211[C]^)^AND^(^EN.550.291[C]^OR^AS.110.302[C]^)^AND^(^EN.530.241[C]^OR^(^EN.520.230[C]^AND^EN.520.231[C]^)^)^)",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61d19cb094752e0004306a65"
},
{
"$oid": "61d19cb094752e0004306a68"
},
{
"$oid": "61d19cb094752e0004306a6b"
},
{
"$oid": "61d19cb094752e0004306a6e"
},
{
"$oid": "61d19cb194752e0004306a71"
},
{
"$oid": "61d19cb194752e0004306a73"
},
{
"$oid": "61d19cb194752e0004306a79"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61d19caf94752e0004306a5a"
},
"plan_id": {
"$oid": "61d19caf94752e0004306a55"
},
"title": "Robot Sensors/Actuators",
"term": "fall",
"year": "Freshman",
"credits": 4,
"number": "EN.530.420",
"area": "E",
"version": "Fall 2021",
"expireAt": {
"$date": "2022-01-03T14:12:59.876Z"
},
"__v": 0
}
]

GET /api/coursesByDistribution/:distribution_id

Gets a list of courses for a given distribution

NameTypeDescription
Paramsdistribution_idStringid of distribution for which to get courses from
OutputCourse[]list of courses from the specific plan

Sample output

[
{
"_id": {
"$oid": "61ccf7f4723b840004850ea3"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Grade of C- or better in (AS.110.201 or AS.110.212)",
"Expression": "AS.110.201[C]^OR^AS.110.212[C]",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61cce47ca2ec790004427212"
},
{
"$oid": "61cce47ca2ec790004427214"
},
{
"$oid": "61cce47ca2ec790004427210"
},
{
"$oid": "61cce47ca2ec790004427216"
},
{
"$oid": "61cce47ca2ec79000442721c"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61cce47ca2ec790004427209"
},
"plan_id": {
"$oid": "61cce47ca2ec790004427200"
},
"title": "Introduction to Abstract Algebra",
"term": "fall",
"year": "Junior",
"credits": 4,
"number": "AS.110.401",
"area": "Q",
"version": "Fall 2021",
"expireAt": {
"$date": "2021-12-31T00:06:11.259Z"
},
"__v": 0
},
{
"_id": {
"$oid": "61d1b2eccfd6b0000490b269"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Students must have completed Lab Safety training prior to registering for this class. To access the tutorial, login to myLearning and enter 458083 in the Search box to locate the appropriate module.",
"Expression": "EN.990.100[C]",
"IsNegative": "N"
},
{
"Description": "((AS.171.101 AND AS.171.102) OR (AS.171.107 AND AS.171.108) OR (AS.171.101 AND AS.171.108) OR (AS.171.107 AND AS.171.102) OR (EN.530.103 AND EN.530.104) OR (EN.530.123 AND EN.530.124)) AND ((AS.110.106 OR AS.110.108) AND AS.110.109 AND (AS.110.202 OR AS.110.211) AND (EN.550.291 OR AS.110.302) AND (EN.530.241 OR (EN.520.230 AND EN.520.231)))",
"Expression": "(^(^AS.171.101[C]^AND^AS.171.102[C]^)^OR^(^AS.171.107[C]^AND^AS.171.108[C]^)^OR^(^AS.171.101[C]^AND^AS.171.108[C]^)^OR^(^AS.171.107[C]^AND^AS.171.102[C]^)^OR^(^EN.530.103[C]^AND^EN.530.104[C]^)^OR^(^EN.530.123[C]^AND^EN.530.124[C]^)^)^AND^(^(^AS.110.106[C]^OR^AS.110.108[C]^)^AND^AS.110.109[C]^AND^(^AS.110.202[C]^OR^AS.110.211[C]^)^AND^(^EN.550.291[C]^OR^AS.110.302[C]^)^AND^(^EN.530.241[C]^OR^(^EN.520.230[C]^AND^EN.520.231[C]^)^)^)",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61d19cb094752e0004306a65"
},
{
"$oid": "61d19cb094752e0004306a68"
},
{
"$oid": "61d19cb094752e0004306a6b"
},
{
"$oid": "61d19cb094752e0004306a6e"
},
{
"$oid": "61d19cb194752e0004306a71"
},
{
"$oid": "61d19cb194752e0004306a73"
},
{
"$oid": "61d19cb194752e0004306a79"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61d19caf94752e0004306a5a"
},
"plan_id": {
"$oid": "61d19caf94752e0004306a55"
},
"title": "Robot Sensors/Actuators",
"term": "fall",
"year": "Freshman",
"credits": 4,
"number": "EN.530.420",
"area": "E",
"version": "Fall 2021",
"expireAt": {
"$date": "2022-01-03T14:12:59.876Z"
},
"__v": 0
}
]
### `GET` `/api/courses/:course_id`

Gets a course by course id.

NameTypeDescription
Paramscourse_idStringid of course to retrieve
OutputCoursecourse to retrieve

GET /api/coursesByTerm/:plan_id

Gets a list of courses in a plan for a specific term.

NameTypeDescription
Paramsplan_idStringid of plan to get courses for
QueryyearStringyear of courses to get
termStringsemester of courses to get
OutputCourse[]list of courses to retrieve

Sample output

[
{
"_id": {
"$oid": "61ccf7f4723b840004850ea3"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Grade of C- or better in (AS.110.201 or AS.110.212)",
"Expression": "AS.110.201[C]^OR^AS.110.212[C]",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61cce47ca2ec790004427212"
},
{
"$oid": "61cce47ca2ec790004427214"
},
{
"$oid": "61cce47ca2ec790004427210"
},
{
"$oid": "61cce47ca2ec790004427216"
},
{
"$oid": "61cce47ca2ec79000442721c"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61cce47ca2ec790004427209"
},
"plan_id": {
"$oid": "61cce47ca2ec790004427200"
},
"title": "Introduction to Abstract Algebra",
"term": "fall",
"year": "Junior",
"credits": 4,
"number": "AS.110.401",
"area": "Q",
"version": "Fall 2021",
"expireAt": {
"$date": "2021-12-31T00:06:11.259Z"
},
"__v": 0
},
{
"_id": {
"$oid": "61d1b2eccfd6b0000490b269"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Students must have completed Lab Safety training prior to registering for this class. To access the tutorial, login to myLearning and enter 458083 in the Search box to locate the appropriate module.",
"Expression": "EN.990.100[C]",
"IsNegative": "N"
},
{
"Description": "((AS.171.101 AND AS.171.102) OR (AS.171.107 AND AS.171.108) OR (AS.171.101 AND AS.171.108) OR (AS.171.107 AND AS.171.102) OR (EN.530.103 AND EN.530.104) OR (EN.530.123 AND EN.530.124)) AND ((AS.110.106 OR AS.110.108) AND AS.110.109 AND (AS.110.202 OR AS.110.211) AND (EN.550.291 OR AS.110.302) AND (EN.530.241 OR (EN.520.230 AND EN.520.231)))",
"Expression": "(^(^AS.171.101[C]^AND^AS.171.102[C]^)^OR^(^AS.171.107[C]^AND^AS.171.108[C]^)^OR^(^AS.171.101[C]^AND^AS.171.108[C]^)^OR^(^AS.171.107[C]^AND^AS.171.102[C]^)^OR^(^EN.530.103[C]^AND^EN.530.104[C]^)^OR^(^EN.530.123[C]^AND^EN.530.124[C]^)^)^AND^(^(^AS.110.106[C]^OR^AS.110.108[C]^)^AND^AS.110.109[C]^AND^(^AS.110.202[C]^OR^AS.110.211[C]^)^AND^(^EN.550.291[C]^OR^AS.110.302[C]^)^AND^(^EN.530.241[C]^OR^(^EN.520.230[C]^AND^EN.520.231[C]^)^)^)",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61d19cb094752e0004306a65"
},
{
"$oid": "61d19cb094752e0004306a68"
},
{
"$oid": "61d19cb094752e0004306a6b"
},
{
"$oid": "61d19cb094752e0004306a6e"
},
{
"$oid": "61d19cb194752e0004306a71"
},
{
"$oid": "61d19cb194752e0004306a73"
},
{
"$oid": "61d19cb194752e0004306a79"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61d19caf94752e0004306a5a"
},
"plan_id": {
"$oid": "61d19caf94752e0004306a55"
},
"title": "Robot Sensors/Actuators",
"term": "fall",
"year": "Freshman",
"credits": 4,
"number": "EN.530.420",
"area": "E",
"version": "Fall 2021",
"expireAt": {
"$date": "2022-01-03T14:12:59.876Z"
},
"__v": 0
}
]

POST /api/courses

Posts a new course to the database. Associated distributions, plan & year is also updated.

NameTypeDescription
BodytitleStringtitle of course to add
plan_idStringplan the course is part of
termStringterm the course is part of
termOffered?String[]all terms the course was offered
yearStringyear name (ie. "Sophomore"), must match the name of the year associated with the year_id
version?Stringversion of the course amongst its SIS course versions
number?Stringcourse number
department?Stringcourse department
tags?String[]an array of course tags
area?Stringcourse areas
creditsNumbercourse credit count
wi?Booleanwhether course is a written intensive
taken?Booleanwhether course has been taken
preReq?Arraycourse prereqs
isPlaceholder?Booleanwhether course is a placeholder
isTransfer?Booleanwhether course is a transfer course
ratings?Arraycourse ratings
distributionIdsString[]course distributions course is part of
year_idStringyear id of year the course is part of
user_idStringuser who owns the plan the course is part of
forceSatisfied?Stringjelps determine if course is force-satisfied
expireAt?Datedate course should be deleted by (for guest users)
OutputCoursenewly added course
{
"_id": {
"$oid": "61ccf7f4723b840004850ea3"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Grade of C- or better in (AS.110.201 or AS.110.212)",
"Expression": "AS.110.201[C]^OR^AS.110.212[C]",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61cce47ca2ec790004427212"
},
{
"$oid": "61cce47ca2ec790004427214"
},
{
"$oid": "61cce47ca2ec790004427210"
},
{
"$oid": "61cce47ca2ec790004427216"
},
{
"$oid": "61cce47ca2ec79000442721c"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61cce47ca2ec790004427209"
},
"plan_id": {
"$oid": "61cce47ca2ec790004427200"
},
"title": "Introduction to Abstract Algebra",
"term": "fall",
"year": "Junior",
"credits": 4,
"number": "AS.110.401",
"area": "Q",
"version": "Fall 2021",
"expireAt": {
"$date": "2021-12-31T00:06:11.259Z"
},
"__v": 0
}

PATCH /api/courses/changeStatus/:course_id

Changes the "taken" status of a course, update credits & satisfaction status of the associated distributions.

NameTypeDescription
Paramscourse_idStringid of course to be updated
BodytakenBooleannew status of aforementioned course
OutputCourseupdated course
{
"_id": {
"$oid": "61ccf7f4723b840004850ea3"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Grade of C- or better in (AS.110.201 or AS.110.212)",
"Expression": "AS.110.201[C]^OR^AS.110.212[C]",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61cce47ca2ec790004427212"
},
{
"$oid": "61cce47ca2ec790004427214"
},
{
"$oid": "61cce47ca2ec790004427210"
},
{
"$oid": "61cce47ca2ec790004427216"
},
{
"$oid": "61cce47ca2ec79000442721c"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61cce47ca2ec790004427209"
},
"plan_id": {
"$oid": "61cce47ca2ec790004427200"
},
"title": "Introduction to Abstract Algebra",
"term": "fall",
"year": "Junior",
"credits": 4,
"number": "AS.110.401",
"area": "Q",
"version": "Fall 2021",
"expireAt": {
"$date": "2021-12-31T00:06:11.259Z"
},
"__v": 0
}

PATCH /api/courses/dragged

Updates a year and semester of course in the database from previous location to newly dragged location.

NameTypeDescription
BodycourseIdStringid of course to be updated
newYearStringnew year to move course to
oldYearStringold year that course exists in
newTermStringnew term of course
OutputCourseupdated course

Sample output

{
"_id": {
"$oid": "61ccf7f4723b840004850ea3"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Grade of C- or better in (AS.110.201 or AS.110.212)",
"Expression": "AS.110.201[C]^OR^AS.110.212[C]",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61cce47ca2ec790004427212"
},
{
"$oid": "61cce47ca2ec790004427214"
},
{
"$oid": "61cce47ca2ec790004427210"
},
{
"$oid": "61cce47ca2ec790004427216"
},
{
"$oid": "61cce47ca2ec79000442721c"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61cce47ca2ec790004427209"
},
"plan_id": {
"$oid": "61cce47ca2ec790004427200"
},
"title": "Introduction to Abstract Algebra",
"term": "fall",
"year": "Junior",
"credits": 4,
"number": "AS.110.401",
"area": "Q",
"version": "Fall 2021",
"expireAt": {
"$date": "2021-12-31T00:06:11.259Z"
},
"__v": 0
}

DELETE /api/courses/:course_id

Deletes a specific course from the database. Credit & satisfication status of the associated distributions are recalculated.

NameTypeDescription
Paramscourse_idStringid of course to be deletes
OutputCoursedeleted course
{
"_id": {
"$oid": "61ccf7f4723b840004850ea3"
},
"termOffered": [],
"tags": [],
"wi": false,
"taken": false,
"preReq": [
{
"Description": "Grade of C- or better in (AS.110.201 or AS.110.212)",
"Expression": "AS.110.201[C]^OR^AS.110.212[C]",
"IsNegative": "N"
}
],
"isPlaceholder": false,
"isTransfer": false,
"ratings": [],
"distribution_ids": [
{
"$oid": "61cce47ca2ec790004427212"
},
{
"$oid": "61cce47ca2ec790004427214"
},
{
"$oid": "61cce47ca2ec790004427210"
},
{
"$oid": "61cce47ca2ec790004427216"
},
{
"$oid": "61cce47ca2ec79000442721c"
}
],
"user_id": "guestUser",
"year_id": {
"$oid": "61cce47ca2ec790004427209"
},
"plan_id": {
"$oid": "61cce47ca2ec790004427200"
},
"title": "Introduction to Abstract Algebra",
"term": "fall",
"year": "Junior",
"credits": 4,
"number": "AS.110.401",
"area": "Q",
"version": "Fall 2021",
"expireAt": {
"$date": "2021-12-31T00:06:11.259Z"
},
"__v": 0
}