peterportal-public-api
peterportal-public-api copied to clipboard
Can't request grades for professors with hyphenated last names
Looking at the grades for COMPSCI 121, we can see data for sections with Krone-Martins and Gago-Masague with their instructor names listed as "KRONE MARTINS, A." and "GAGO MASAGUE, S.". If you try to request raw grade data for each instructor though using those exact strings, you get a syntax error.
Example: Request to /grades/raw?instructor=KRONE%20MARTINS,%20A. Response:
{"timestamp":"Sun, 12 Mar 2023 22:46:58 GMT","status":400,"error":"Bad Request: Invalid syntax in parameters","message":"Invalid syntax found in parameters. Exception occurred at 'KRONE MARTINS, A.' in the [instructor] query value"}
Making a request to /grades/raw?instructor=KRONE-MARTINS,%20A. doesn't work either and returns an empty array.