Skip to content

Web Server

Thomas Mahut edited this page Nov 19, 2025 · 2 revisions

The web server component is built using FastAPI and scrapes reservation status from the school's reservation system (limited to the Webster library for now).

The Webster library study room booking portal makes a POST request to https://concordiauniversity.libcal.com/spaces/availability/grid to get study room availabilities.

A sample of the form data passed in this POST request is:

lid=2161           --> Webster library ID (Vanier library ID seems to be 2162)
&gid=5032          --> Not sure what this is, seems to break when I change it (Vanier req uses 5034)
&eid=-1            --> Set to negative 1 for instances of the API, also not sure what it is
&seat=0
&seatId=0
&zone=0
&start=2025-11-19  --> Needs to be set to the current date
&end=2025-11-20    --> Needs to be set to the date after the current date
&pageIndex=0       --> Seems related to pagination... but so far the webpage has never paginated
&pageSize=18       --> Seems related to pagination... but way more than 18 slots are returned so im not sure what's the point.

Necessary request headers:

referer  https://concordiauniversity.libcal.com/reserve/webster
content-type  application/x-www-form-urlencoded; charset=UTF-8

The JSON response looks something like this:

{
  "slots": [
    {
      "start": "2025-11-19 08:00:00", // slot start time
      "end": "2025-11-19 08:30:00", // slot end time
      "itemId": 18508, // study room id
      "checksum": "d164e303fba03d8a6c1bd80506626a9a", // not sure what this is used for
      "className": "s-lc-eq-checkout" // only present on slots that are reserved (not available)
    }
// one slot for every half hour slot
  ],
  "bookings": [],
  "isPreCreatedBooking": false,
  "windowEnd": false // set to true if we're looking too far into the future (and ig too far into the past too)
}

Clone this wiki locally