uWaterloo / OpenData

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

Request for instructor name in InstructorData #215

Closed edwinzhng closed 2 years ago

edwinzhng commented 3 years ago

Hi! I was trying to query for ClassSchedules using the API via the live documentation, but every time I tried to hit the ​/v3​/ClassSchedules​/{termCode}​/{courseId}, or the /v3/ClassSchedules/{termCode}/{subject}/{catalogNumber} endpoints, it returns a 404 response. I double checked that these courses were in fact listed when I query for /v3/Courses, so I'm not sure if there is an error with the service when returning the schedules.

For example, the course ECE 103 is listed when I query for /v3/Courses/1215/ECE, but when I try to query /v3/ClassSchedules/1215/ECE/103, I get a 404.

Any help would be appreciated!

sbobkin commented 3 years ago

Hi @edwinzhng

I looked at this particular ask around ECE, and I don't believe there is a data issue in this case. The relationship between Courses, and Classes (ClassSchedules) can be a bit obscure at Waterloo. A Course (v3/Courses endpoint) is any Course that exists according to Quest for the academic calendar year/term. A course can be scheduled to run as a class, and then it can optionally have a schedule (ClassSchedule); for open data purposes we only return Courses with at least one schedule.

This means a course can exist, but not be scheduled to run in any particular term(s). This is what you're seeing with ECE 103 in 1215 term. For example, if you try /v3/ClassSchedules/1215/ECE/318 you'll see a course that did get scheduled, and will return data on the ClassSchedules endpoint.

Let me know if that explains it enough to make sense for you?

edwinzhng commented 3 years ago

Thanks, that makes sense! I just had two more questions:

  1. I noticed that compared to the v2 API, we are no longer able to access instructor names for each of the courses. Is there any plan to add this back or would this be possible? The reason I'm asking is because I'm doing a (very late) migration of uwflow.com to import data from the new API version, and we rely on the instructor names to populate our schedules.

  2. Is there any API rate limit I should be aware of? We currently re-import schedule data for each course approximately every hour, which would be a couple thousand requests using the new API (on v2 it was only a single API request to retrieve all schedules for a term). If this is an issue, I could dial it back a bit.

sbobkin commented 3 years ago

A1. I did not hear back from the data stewards about introducing this data back in; I'll follow up today/tomorrow. A2. No rate limit, no plan to rate limit. If you're seeing performance issues please do let us know.

edwinzhng commented 3 years ago

Ok sounds great, thanks a lot for the help!

edwinzhng commented 3 years ago

Hey @sbobkin, just wondering if you might have any updates regarding the instructor name data for class schedules?

sbobkin commented 3 years ago

@edwinzhng entirely with the data steward/Registrar's Office to get an answer if they're okay with this or not. We've asked for an update, but I don't have an agreement from them, so we can't add it yet.

sbobkin commented 3 years ago

Sorry, no update, it may be of value to reach out to Dave Bean at the Registrar Office directly and indicate your desire to have this information in the Open Data API.

sbobkin commented 3 years ago

As an update, we have approval to add this data to the endpoint. I don't have an ETA yet, but sometime in September is likely.

edwinzhng commented 3 years ago

Awesome, thanks so much for the update

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

This adds instructor name, and an identifier information to the class schedules endpoint.

edwinzhng commented 3 years ago

Perfect thanks for all the help, I will try the new data next week!

edwinzhng commented 2 years ago

Hi @sbobkin, it seems like the API is returning 500 responses for ​/v3​/ClassSchedules​/{termCode}​/{subject}​/{catalogNumber} - for example /v3​/ClassSchedules​/1219​/ECE​/105 should have scheduled sections according to ADM, and v3/Courses/1219/ECE/105 returns course data properly, so maybe this was due an error in the new release? Do you mind looking into a fix for this? Please let me know if you need any more details

sbobkin commented 2 years ago

@edwinzhng thank you for reporting, with apologies, this should be fixed.

edwinzhng commented 2 years ago

Worked, thanks! Closing this issue since everything seems good