Course Routes
GET
/api/coursesByPlan/:plan_id
Gets a list of courses for a given plan.
Name | Type | Description | |
---|---|---|---|
Params | plan_id | String | id of plan for which to get courses from |
Output | Course[] | 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
Name | Type | Description | |
---|---|---|---|
Params | distribution_id | String | id of distribution for which to get courses from |
Output | Course[] | 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
}
]
Gets a course by course id.
Name | Type | Description | |
---|---|---|---|
Params | course_id | String | id of course to retrieve |
Output | Course | course to retrieve |
GET
/api/coursesByTerm/:plan_id
Gets a list of courses in a plan for a specific term.
Name | Type | Description | |
---|---|---|---|
Params | plan_id | String | id of plan to get courses for |
Query | year | String | year of courses to get |
term | String | semester of courses to get | |
Output | Course[] | 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.
Name | Type | Description | |
---|---|---|---|
Body | title | String | title of course to add |
plan_id | String | plan the course is part of | |
term | String | term the course is part of | |
termOffered | ?String[] | all terms the course was offered | |
year | String | year name (ie. "Sophomore"), must match the name of the year associated with the year_id | |
version | ?String | version of the course amongst its SIS course versions | |
number | ?String | course number | |
department | ?String | course department | |
tags | ?String[] | an array of course tags | |
area | ?String | course areas | |
credits | Number | course credit count | |
wi | ?Boolean | whether course is a written intensive | |
taken | ?Boolean | whether course has been taken | |
preReq | ?Array | course prereqs | |
isPlaceholder | ?Boolean | whether course is a placeholder | |
isTransfer | ?Boolean | whether course is a transfer course | |
ratings | ?Array | course ratings | |
distributionIds | String[] | course distributions course is part of | |
year_id | String | year id of year the course is part of | |
user_id | String | user who owns the plan the course is part of | |
forceSatisfied | ?String | jelps determine if course is force-satisfied | |
expireAt | ?Date | date course should be deleted by (for guest users) | |
Output | Course | newly 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.
Name | Type | Description | |
---|---|---|---|
Params | course_id | String | id of course to be updated |
Body | taken | Boolean | new status of aforementioned course |
Output | Course | updated 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.
Name | Type | Description | |
---|---|---|---|
Body | courseId | String | id of course to be updated |
newYear | String | new year to move course to | |
oldYear | String | old year that course exists in | |
newTerm | String | new term of course | |
Output | Course | updated 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.
Name | Type | Description | |
---|---|---|---|
Params | course_id | String | id of course to be deletes |
Output | Course | deleted 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
}