OwlAPI serves data directly from MyPortal. It parses and cleans the data in order to make it more usable. For now, only the most recent quarter's data is pulled from MyPortal. On opencourse.dev, seat data is synced every 2 minutes with MyPortal.
| key | description |
|---|---|
CRN |
Course Number |
course |
Course ID: [F0*][ID][Section ID][WYH] (see note below) |
desc |
Short-form course description |
campus |
Campus the section is held at |
days |
Day(s) the section is held on (M, T, W, Th, F, S, U) |
instructor |
Professor for the section |
room |
Room the section is held at |
time |
Time for the section |
start |
First date for the section |
end |
Last date for the course |
units |
Number of course units |
seats |
Seats left in the course |
status |
Status of the course (Online / Waitlist) |
wait_cap |
Waitlist capacity |
wait_seats |
Waitlist slots left in the course |
| type | flag |
|---|---|
| Online | W (Foothill) / Z (De Anza) |
| Hybrid | Y |
| Honors | H |
Before any of the endpoints below, you must select which campus' data you'd like the query. Before the endpoint type /fh or /da for Foothill and De Anza respectively.
Alternatively, if either campus' data cannot be accessed, a debug campus has been put into production. Use the
campus selector test to grab this older copy of Foothill data.
GET /single handles a single request to get a whole department or a whole course listing from the database
It expects a mandatory query parameter dept and an optionally course.
/single returns a JSON format with the keys as the CRN for the course, and the values as a list. The list is necessary to account for hybrid classes or classes with labs, that have two or more listings per CRN.
You can view an example of the /single route here.
POST /batch handles a batch request to get many departments or many sections from the database.
This batch request is meant to simulate hitting the api route with this data N times.
It expects a mandatory list of objects containing keys dept and course.
/batch returns a JSON format with the initial key as courses and a value containing a list of courses. The courses are formatted in the same way as found in the /single response.
You can view an example of the /batch route here.
Additionally, in the POST /batch body you can specify any number of filters to narrow the results. Add the filter key to the post body and then apply the appropriate filter. Multiple options can be selected by changing the value from a 0 to a 1.
Be careful because too many filters may result in zero sections returned from the database. Also, even if 2 out of 3 courses are valid, one invalid will return 404.
Filter by the availability of a course (Open, Waitlist, Full). The example below shows how you can filter only open and waitlist sections.
Filter by the format of the course (In Person, Online, Hybrid). The example below shows how you can filter only online and hybrid sections.
Filter by the days the course should be limited to (M, T, W, Th, F, S, U). The example below shows how you can filter only M and W sections.
Filter by a specified time interval (7:30 AM - 12:00 PM). The example below shows how you can filter only morning sections.
GET /list handles a single request to list department or course keys from the database
It takes an optional query parameter dept which is first checked for existence and then returns the dept keys.
GET /urls returns a tree of all departments, their courses, and the courses' endpoints to hit.