PantherWatch API

Base URL: https://api.pantherwatch.app

This page lists available endpoints, request parameters and example responses. Public endpoints can be called directly. Protected endpoints require a Supabase JWT in the Authorization header.

Authentication

Protected endpoints require:

Authorization: Bearer <your_supabase_jwt>

A 401 is returned if the header is missing/invalid. CORS and OPTIONS requests are allowed.

Courses (Public)

GET /api/courses/terms public

Returns a list of available terms.

Response (200):
[
  {
    "code": "202508",
    "description": "Fall 2025"
  }
]
curl:
curl -s https://api.pantherwatch.app/api/courses/terms
GET /api/courses/search public

Searches courses. Supply query parameters below. Returns a paged result with data array of course sections.

Query params:
  • txt_subject (e.g., CS)
  • txt_courseNumber (e.g., 1301)
  • txt_term (term code, see terms endpoint)
  • txt_level (optional)
Response (200):
{
  "success": true,
  "totalCount": 1,
  "data": [
    {
      "termDesc": "Fall 2025",
      "courseReferenceNumber": "12345",
      "courseNumber": "1301",
      "subject": "CS",
      "subjectDescription": "Computer Science",
      "courseTitle": "Intro to Programming",
      "seatsAvailable": 5,
      "faculty": [ { "displayName": "Prof. Ada" } ],
      "meetingsFaculty": [ { "meetingTime": { "monday": true, "beginTime": "09:00" }} ]
    }
  ],
  "pageOffset": 1,
  "pageMaxSize": 10
}
curl:
curl -s "https://api.pantherwatch.app/api/courses/search?txt_subject=CS&txt_courseNumber=1301&txt_term=202508"

Watched Classes (Protected)

All endpoints below require Authorization: Bearer <token>.

GET /api/watched-classes protected

Returns your current watch list.

Response:
{
  "success": true,
  "data": [
    {
      "id": 1,
      "crn": "12345",
      "term": "202508",
      "courseTitle": "Intro to Programming",
      "courseNumber": "1301",
      "subject": "CS",
      "instructor": "Prof. Ada",
      "createdAt": "2025-08-30T12:34:56"
    }
  ],
  "count": 1
}
curl:
curl -s -H "Authorization: Bearer $TOKEN" https://api.pantherwatch.app/api/watched-classes
POST /api/watched-classes protected

Add a class to your watch list.

Body (JSON):
{
  "crn": "12345",
  "term": "202508",
  "courseTitle": "Intro to Programming",
  "courseNumber": "1301",
  "subject": "CS",
  "instructor": "Prof. Ada"
}
Response:
{ "success": true, "message": "Class added to watch list", "data": { ... } }
curl:
curl -s -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"crn":"12345","term":"202508","courseTitle":"Intro to Programming","courseNumber":"1301","subject":"CS","instructor":"Prof. Ada"}' \
  https://api.pantherwatch.app/api/watched-classes
DELETE /api/watched-classes?crn=...&term=... protected

Remove a class from your watch list.

Response:
{ "success": true, "message": "Class removed from watch list" }
curl:
curl -s -X DELETE -H "Authorization: Bearer $TOKEN" \
  "https://api.pantherwatch.app/api/watched-classes?crn=12345&term=202508"
GET /api/watched-classes/check?crn=...&term=... protected

Check if you are watching a specific class.

Response:
{ "success": true, "isWatching": true }
GET /api/watched-classes/count protected

Get the number of classes you are watching.

Response:
{ "success": true, "count": 3 }
GET /api/watched-classes/full-details protected

Returns full course details (CourseData objects) for your watch list.

Response (example fields):
{
  "success": true,
  "data": [
    {
      "termDesc": "Fall 2025",
      "courseReferenceNumber": "12345",
      "subject": "CS",
      "courseNumber": "1301",
      "courseTitle": "Intro to Programming",
      "seatsAvailable": 5
    }
  ],
  "count": 1
}

Notes