uWaterloo / OpenData

Help and Support for University of Waterloo Open Data Initiative
https://api.uwaterloo.ca
90 stars 12 forks source link

/v3/Courses/{termCode} includes courses not being held in the term #219

Closed atomala closed 3 years ago

atomala commented 3 years ago

I'm looking to get a list of courses that has classes for a particular term. When I query the "/v3/Courses/1215" endpoint, I get courses that are not held in that term (e.g. CIVE 104). Is this expected behaviour or is there a bug?

sbobkin commented 3 years ago

A Course at Waterloo is an entity that's available in any valid official Course Catalog for that Term for a student to potentially enroll in and for the University to scheduled as a Class. A class is a scheduled instance of a course for a term and a time slot. It's valid to have courses that are valid in a course catalog and the courses endpoint that do not have a scheduled instance of a class in that term.

atomala commented 3 years ago

Is there anyway to only grab courses that have a scheduled class for a specific term? The v2 API allowed this when I was using it.

sbobkin commented 3 years ago

@atomala I can take a look at adding an endpoint that returns the set of scheduled classes. Can you describe your use case so we understand why? Thanks.

atomala commented 3 years ago

I have a site (http://uwcourse.atomala.com/) that provides historical information related to course enrolments. As part of this site, I have a script that queries the UWaterloo API for every course being held in the current semester and retrieves the number of students enrolled in them. At the moment, I don't have a way to get every course that is scheduled in a semester.

sbobkin commented 3 years ago

Hi,

I've published a new release, you can see the changes here: https://wiki.uwaterloo.ca/display/UWAPI/2021/09/16/Open+Data+API+v3%2C+2021.09.16.1+release

They contain an added endpoint that will return a list of course IDs that should help you with your request.