openapi: 3.0.2
info:
title: Penn Courses API Documentation
version: ''
description: '
# Introduction
Penn Courses ([GitHub](https://github.com/pennlabs/penn-courses)) is the umbrella
categorization for [Penn Labs](https://pennlabs.org/)
products designed to help students navigate the course registration process. It currently
includes three products, each with their own API documented on this page:
Penn Course Alert, Penn Course Plan, and Penn Course Review.
See `Penn Labs Notion > Penn Courses` for more details on each of our (currently) three apps.
For instructions on how to maintain this documentation while writing code,
see the comments in `backend/PennCourses/docs_settings.py` (it is easy, and will be helpful
for maintaining Labs knowledge in spite of our high member turnover rate).
See our [GitHub](https://github.com/pennlabs/penn-courses) repo for instructions on
installation, running in development, and loading in course data for development. Visit
the `/admin/doc/` route ([link](/admin/doc/)) for the backend documentation generated by Django
(admin account required, which can be made by running
`python manage.py createsuperuser` in terminal/CLI).
# Unified Penn Courses
By virtue of the fact that all Penn Courses products deal with, well, courses,
it would make sense for all three products to share the same backend.
We realized the necessity of a unified backend when attempting to design a new Django backend
for Penn Course Plan. We like to live by the philosophy of keeping it
[DRY](https://en.wikipedia.org/wiki/Don''t_repeat_yourself), and
PCA and PCP''s data models both need to reference course and
section information. We could have simply copied over code (a bad idea)
or created a shared reusable Django app (a better idea) for course data,
but each app would still need to download copies of the same data.
Additionally, this will help us build integrations between our Courses products.
# Authentication
PCx user authentication is handled by platform''s Penn Labs Accounts Engine.
See [Penn Labs Notion > Platform > The Accounts Engine](https://www.notion.so/pennlabs/The-Accounts-Engine-726ccf8875e244f4b8dbf8a8f2c97a87?pvs=4)
for extensive documentation and links to repositories for this system. When tags or routes
are described as requiring user authentication, they are referring to this system.
I highly recommend the [official video course on OAuth2](https://oauth.net/2/) (by Aaron Parecki),
then the Platform Notion docs on the "Accounts Engine" for anyone who wants to understand
Labs authentication better. Platform is our OAuth2 "Authorization Server",
and Django Labs Accounts is an OAuth2 client run by our Django backends (Clubs, Penn Courses, etc),
exposing client-facing authentication routes like `penncourseplan.com/accounts/login`.
There''s also this Wikipedia page explaining [Shibboleth](https://en.wikipedia.org/wiki/Shibboleth_(software))
(which is used by Penn for authentication, and by the Platform authorization server).
See the Django docs for more on Django''s features for
[User Authentication](https://docs.djangoproject.com/en/3.0/topics/auth/),
which are used by PCX apps, as part of Platform''s accounts system.
'
x-logo:
url: https://i.imgur.com/tVsRNxJ.png
altText: Labs Logo
contact:
email: contact@pennlabs.org
paths:
/accounts/me/:
get:
operationId: Retrieve User
description: '(GET `/accounts/me/`)
This view exposes the Penn Labs Accounts User object.
User authentication required.'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
profile:
type: object
properties:
email:
type: string
format: email
nullable: true
description: The email of the User. Defaults to null.
maxLength: 254
phone:
type: string
nullable: true
description: '
The phone number of the user. Defaults to null.
The phone number will be stored in the E164 format, but any form parseable by
the
[phonenumbers library](https://pypi.org/project/phonenumbers/)
will be accepted and converted to E164 format automatically upon saving.
'
maxLength: 100
push_notifications:
type: boolean
description: '
Defaults to False, changed to True if the User enables mobile push notifications
for PCA, rather than text notifications.
'
description: The user profile object, storing collected info about the user.
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[Accounts] User'
put:
operationId: Update User
description: '(PUT `/accounts/me/`)
This view exposes the Penn Labs Accounts User object.
User authentication required.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
profile:
type: object
properties:
email:
type: string
format: email
nullable: true
description: The email of the User. Defaults to null.
maxLength: 254
phone:
type: string
nullable: true
description: '
The phone number of the user. Defaults to null.
The phone number will be stored in the E164 format, but any form parseable by
the
[phonenumbers library](https://pypi.org/project/phonenumbers/)
will be accepted and converted to E164 format automatically upon saving.
'
maxLength: 100
push_notifications:
type: boolean
description: '
Defaults to False, changed to True if the User enables mobile push notifications
for PCA, rather than text notifications.
'
description: The user profile object, storing collected info about the user.
responses:
'200':
content:
application/json:
schema:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
profile:
type: object
properties:
email:
type: string
format: email
nullable: true
description: The email of the User. Defaults to null.
maxLength: 254
phone:
type: string
nullable: true
description: '
The phone number of the user. Defaults to null.
The phone number will be stored in the E164 format, but any form parseable by
the
[phonenumbers library](https://pypi.org/project/phonenumbers/)
will be accepted and converted to E164 format automatically upon saving.
'
maxLength: 100
push_notifications:
type: boolean
description: '
Defaults to False, changed to True if the User enables mobile push notifications
for PCA, rather than text notifications.
'
description: The user profile object, storing collected info about the user.
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[Accounts] User'
patch:
operationId: Partial Update User
description: '(PATCH `/accounts/me/`)
This view exposes the Penn Labs Accounts User object.
User authentication required.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
profile:
type: object
properties:
email:
type: string
format: email
nullable: true
description: The email of the User. Defaults to null.
maxLength: 254
phone:
type: string
nullable: true
description: '
The phone number of the user. Defaults to null.
The phone number will be stored in the E164 format, but any form parseable by
the
[phonenumbers library](https://pypi.org/project/phonenumbers/)
will be accepted and converted to E164 format automatically upon saving.
'
maxLength: 100
push_notifications:
type: boolean
description: '
Defaults to False, changed to True if the User enables mobile push notifications
for PCA, rather than text notifications.
'
description: The user profile object, storing collected info about the user.
responses:
'200':
content:
application/json:
schema:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
profile:
type: object
properties:
email:
type: string
format: email
nullable: true
description: The email of the User. Defaults to null.
maxLength: 254
phone:
type: string
nullable: true
description: '
The phone number of the user. Defaults to null.
The phone number will be stored in the E164 format, but any form parseable by
the
[phonenumbers library](https://pypi.org/project/phonenumbers/)
will be accepted and converted to E164 format automatically upon saving.
'
maxLength: 100
push_notifications:
type: boolean
description: '
Defaults to False, changed to True if the User enables mobile push notifications
for PCA, rather than text notifications.
'
description: The user profile object, storing collected info about the user.
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[Accounts] User'
/api/review/course/{course_code}:
get:
operationId: Retrieve Course Reviews
description: '(GET `/api/review/course/{course_code}`)
User authentication required.'
parameters:
- name: course_code
in: path
required: true
description: The dash-joined department and code of the course you want reviews for, e.g. `CIS-120`
for CIS-120.
schema:
type: string
- name: semester
in: query
description: Optionally specify the semester of the desired course (defaults to most recent course
with the specified course code).
schema:
type: string
required: false
responses:
'200':
content:
application/json:
schema:
properties:
code:
type: string
description: The dash-joined department and most-recent code of this course, e.g.
`CIS-1200`.
last_offered_sem_if_superceded:
type: string
description: The last semester in which this course was offered, if it has been superseded
by a more recent course (with the same full code).
aliases:
type: array
description: A list of courses that are crosslisted with this course (each represented
by its dash-joined department and code).
items:
type: string
historical_codes:
description: The historical lineage of primary course codes that have represented
this course (from most recent to oldest).
items:
type: object
properties:
full_code:
type: string
description: The dash-joined department and course code.
branched_from:
type: boolean
description: A flag indicating whether this code was branched into multiple
new codes (e.g. in fall 2022). In these cases we should link to the old course
on PCR because its reviews will not be included on the same page (unlike linear
links).
semester:
type: string
description: The most recent semester this code was used (of the form YYYYx
where x is A [for spring], B [summer], or C [fall]), e.g. `2022C` for fall
2022.
name:
type: string
description: The title of the course, e.g. 'Programming Languages and Techniques I'
for CIS-120.
description:
type: string
description: The description of the course, e.g. 'A fast-paced introduction to the
fundamental concepts of programming... [etc.]' for CIS-120.
latest_semester:
type: string
description: The most recent semester this course was offered (of the form YYYYx where
x is A [for spring], B [summer], or C [fall]), e.g. `2022C` for fall 2022.
registration_metrics:
type: boolean
description: True if this course has registration metrics that you can access via
the Retrieve Plots route.
num_sections:
type: integer
description: The number of sections belonging to this course (excluding non-primary
crosslisted sections) across all semesters (that we have data for).
num_sections_recent:
type: integer
description: The number of sections belonging to this course (excluding non-primary
crosslisted sections) in its most recent semester.
average_reviews:
type: object
description: This course's average reviews across all of its sections (excluding non-primary
crosslisted sections) from all semesters. Note that if any of these subfields are
missing or null, that means the subfield is not applicable or missing from our data
(you should check for null values).
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations (of the
form YYYYx where x is A [for spring], B [summer], or C [fall]), e.g. `2019C`
for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations. This
field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance Registration
recent_reviews:
type: object
description: This course's average reviews across all of its sections (excluding non-primary
crosslisted sections) from the most recent semester. Note that if any of these subfields
are missing or null, that means the subfield is not applicable or missing from our
data (you should check for null values).
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations (of the
form YYYYx where x is A [for spring], B [summer], or C [fall]), e.g. `2019C`
for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations. This
field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance Registration
num_semesters:
type: integer
description: The number of semesters for which this course has been taught (that we
have data for).
instructors:
type: object
description: Reviews for this course broken down by instructor. Note that each key
in this subdictionary is a stringified instructor id (indicated by `STRINGIFIED_INSTRUCTOR_ID`;
this is not an actual key but a placeholder for potentially many keys).
properties:
STRINGIFIED_INSTRUCTOR_ID:
type: object
description: This key `STRINGIFIED_INSTRUCTOR_ID` is a placeholder for potentially
many stringified instructor id keys.
properties:
id:
type: integer
description: The integer id of this instructor; note that this is just the
int version of this subdictionary's key in the parent dictionary.
average_reviews:
type: object
description: This instructor's average reviews across all of the sections
of this course that he/she has taught. Note that if any of these subfields
are missing or null, that means the subfield is not applicable or missing
from our data (you should check for null values).
properties:
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance
Registration
recent_reviews:
type: object
description: This instructor's average reviews across all of the sections
of this course that he/she has taught in his/her most recent semester teaching
this course that has review data. Note that if any of these subfields are
missing or null, that means the subfield is not applicable or missing from
our data (you should check for null values).
properties:
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance
Registration
latest_semester:
type: string
description: The most recent semester this instructor taught this course (of
the form YYYYx where x is A [for spring], B [summer], or C [fall]), e.g.
`2019C` for fall 2019.
num_semesters:
type: integer
description: The number of semesters that this instructor has taught this
course (that we have data for).
name:
type: string
description: The instructor's name
description: Reviews retrieved successfully.
'403':
description: Access denied (missing or improper authentication).
'404':
description: Course with given course_code not found.
tags:
- '[PCR] Course Reviews'
/api/review/course_plots/{course_code}:
get:
operationId: Retrieve Plots
description: '(GET `/api/review/course_plots/{course_code}`)
Get all PCR plots for a given course.
User authentication required.'
parameters:
- name: course_code
in: path
description: The dash-joined department and code of the course you want plots for, e.g. `CIS-120`
for CIS-120.
schema:
type: string
required: true
- name: semester
in: query
description: Optionally specify the semester of the desired course (defaults to most recent course
with the specified course code).
schema:
type: string
required: false
- name: instructor_ids
in: query
description: A comma-separated list of instructor IDs with which to filter the sections underlying
the returned plots.Note that if only invalid instructor IDs are present, plot response fields
will be null or 0.
schema:
type: string
required: false
responses:
'200':
content:
application/json:
schema:
properties:
code:
type: string
description: The dash-joined department and most-recent (across all codes representing
the topic) code of the course, e.g. `CIS-120` for CIS-120.
current_add_drop_period:
type: object
description: The start and end dates of the upcoming/current semester's add/drop period
properties:
start:
type: string
description: A string datetime representation of the start of the current/upcoming
add/drop period.
end:
type: string
description: A string datetime representation of the end of the current/upcoming
add/drop period.
average_plots:
type: object
description: This course's plots (PCA demand, percent sections open), averaged across
all of its sections from all semesters. Note that if any of these subfields are
missing or null, that means the subfield is not applicable or missing from our data
(you should check for null values).
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations (of the
form YYYYx where x is A [for spring], B [summer], or C [fall]), e.g. `2019C`
for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations. This
field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance Registration
recent_plots:
type: object
description: This course's plots (PCA demand, percent sections open), averaged across
all of its sections from the most recent semester before the current semester. Note
that if any of these subfields are missing or null, that means the subfield is not
applicable or missing from our data (you should check for null values).
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations (of the
form YYYYx where x is A [for spring], B [summer], or C [fall]), e.g. `2019C`
for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations. This
field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance Registration
description: Plots retrieved successfully.
'403':
description: Access denied (missing or improper authentication).
'404':
description: Course with given course_code not found.
tags:
- '[PCR] Plots'
/api/review/instructor/{instructor_id}:
get:
operationId: Retrieve Instructor Reviews
description: '(GET `/api/review/instructor/{instructor_id}`)
Get all reviews for a given instructor, aggregated by course.
User authentication required.'
parameters:
- name: instructor_id
in: path
required: true
description: The integer id of the instructor you want reviews for. Note that you can get the
relative path for any instructor including this id by using the `url` field of objects in the
`instructors` list returned by Retrieve Autocomplete Data.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
properties:
name:
type: string
description: The full name of the instructor.
num_sections_recent:
type: integer
description: The number of sections this instructor taught in his/her most recent
semester teaching.
num_sections:
type: integer
description: The number of sections this instructor has taught (that we have data
for).
average_reviews:
type: object
description: This instructor's average reviews across all of his/her taught sections
from all semesters. Note that if any of these subfields are missing or null, that
means the subfield is not applicable or missing from our data (you should check
for null values).
properties:
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance Registration
recent_reviews:
type: object
description: This instructor's average reviews across all of his/her taught sections
from only his/her most recent semester teaching that has review data. Note that
if any of these subfields are missing or null, that means the subfield is not applicable
or missing from our data (you should check for null values).
properties:
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance Registration
num_semesters:
type: integer
description: The number of semesters this instructor has taught (that we have data
for).
courses:
type: object
description: Reviews for this instructor broken down by the courses he/she has taught.
Note that each key in this subdictionary is the course full code (indicated by `COURSE_FULL_CODE`;
this is not an actual key but a placeholder for potentially many keys).
properties:
COURSE_FULL_CODE:
type: object
description: This key `COURSE_FULL_CODE` is a placeholder for potentially many
course full code keys. Each full code is the dash-joined department and most-recent
(across all codes representing the topic) code of the course, e.g. `CIS-120`
for CIS-120.
properties:
full_code:
type: string
description: The dash-joined department and most-recent (across all codes
representing the topic) code of the course, e.g. `CIS-120` for CIS-120.
average_reviews:
type: object
description: This course's average reviews across all of its sections taught
by this instructor from all semesters. Note that if any of these subfields
are missing or null, that means the subfield is not applicable or missing
from our data (you should check for null values).
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations
(of the form YYYYx where x is A [for spring], B [summer], or C [fall]),
e.g. `2019C` for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations.
This field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance
Registration
recent_reviews:
type: object
description: This course's average reviews across all of its sections taught
by this instructor from the most recent semester. Note that if any of these
subfields are missing or null, that means the subfield is not applicable
or missing from our data (you should check for null values).
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations
(of the form YYYYx where x is A [for spring], B [summer], or C [fall]),
e.g. `2019C` for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations.
This field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance
Registration
latest_semester:
type: string
description: The most recent semester this course was taught by this instructor
(of the form YYYYx where x is A [for spring], B [summer], or C [fall]),
e.g. `2019C` for fall 2019.
num_semesters:
type: integer
description: The number of semesters in which this course was taught by this
instructor (that we have data for).
code:
type: string
description: Same as `full_code`.
name:
type: string
description: The title of the course, e.g. 'Programming Languages and Techniques
I' for CIS-120.
description: Reviews retrieved successfully.
'403':
description: Access denied (missing or improper authentication).
'404':
description: Instructor with given instructor_id not found.
tags:
- '[PCR] Instructor Reviews'
/api/review/department/{department_code}:
get:
operationId: Retrieve Department Reviews
description: '(GET `/api/review/department/{department_code}`)
Get reviews for all courses in a department.
User authentication required.'
parameters:
- name: department_code
in: path
required: true
description: The department code you want reviews for, e.g. `CIS` for the CIS department.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
properties:
code:
type: string
description: The department code, e.g. `CIS` for the CIS department.
name:
type: string
description: The name of the department, e.g. 'Computer and Information Sci' for the
CIS department.
courses:
type: object
description: Reviews for this department broken down by its courses. Note that each
key in this subdictionary is the course full code (indicated by `COURSE_FULL_CODE`;
this is not an actual key but a placeholder for potentially many keys).
properties:
COURSE_FULL_CODE:
type: object
description: This key `COURSE_FULL_CODE` is a placeholder for potentially many
course full code keys. Each full code is the dash-joined department and most-recent
(across all codes representing the topic) code of the course, e.g. `CIS-120`
for CIS-120.
properties:
id:
type: string
description: The dash-joined department and most-recent (across all codes
representing the topic) code of the course, e.g. `CIS-120` for CIS-120.
average_reviews:
type: object
description: This course's average reviews across all of its sections from
all semesters. Note that if any of these subfields are missing or null,
that means the subfield is not applicable or missing from our data (you
should check for null values).
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations
(of the form YYYYx where x is A [for spring], B [summer], or C [fall]),
e.g. `2019C` for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations.
This field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance
Registration
recent_reviews:
type: object
description: This course's average reviews across all of its sections from
the most recent semester. Note that if any of these subfields are missing
or null, that means the subfield is not applicable or missing from our data
(you should check for null values).
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations
(of the form YYYYx where x is A [for spring], B [summer], or C [fall]),
e.g. `2019C` for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations.
This field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance
Registration
latest_semester:
type: string
description: The most recent semester this course was taught (of the form
YYYYx where x is A [for spring], B [summer], or C [fall]), e.g. `2019C`
for fall 2019.
num_semesters:
type: integer
description: The number of semesters this class has been taught (that we have
data for).
code:
type: string
description: Same as `id`.
name:
type: string
description: The title of the course, e.g. 'Programming Languages and Techniques
I' for CIS-120.
description: Reviews retrieved successfully.
'403':
description: Access denied (missing or improper authentication).
'404':
description: Department with the given department_code not found.
tags:
- '[PCR] Department Reviews'
/api/review/course/{course_code}/{instructor_id}:
get:
operationId: Retrieve Section-Specific Reviews
description: '(GET `/api/review/course/{course_code}/{instructor_id}`)
Get the review history of an instructor teaching a course.
User authentication required.'
parameters:
- name: course_code
in: path
required: true
description: The dash-joined department and code of the course you want reviews for, e.g. `CIS-120`
for CIS-120.
schema:
type: string
- name: instructor_id
in: path
required: true
description: The integer id of the instructor you want reviews for.
schema:
type: string
- name: semester
in: query
description: Optionally specify the semester of the desired course (defaults to most recent course
with the specified course code).
schema:
type: string
required: false
responses:
'200':
content:
application/json:
schema:
properties:
instructor:
type: object
description: Information about the instructor.
properties:
id:
type: integer
description: The integer id of the instructor.
name:
type: string
description: The full name of the instructor.
course_code:
type: string
description: The dash-joined department and most-recent (across all codes representing
the topic) code of the course, e.g. `CIS-120` for CIS-120.
sections:
type: array
description: The sections of this course taught by this instructor.
items:
type: object
properties:
course_code:
type: string
description: The dash-joined department and course code of the section, `CIS-120`
for CIS-120-001.
course_name:
type: string
description: The title of the section's course, e.g. 'Programming Languages
and Techniques I' for CIS-120-001.
activity:
type: string
description: 'The activity of the section. Options: `[''Undefined'', ''Clinic'',
''Clinical Rotation'', ''Dissertation Abroad'', ''Dissertation'', ''Doctoral
Program Exchange'', ''Field Work'', ''Hybrid'', ''Independent Study'', ''Lab'',
''Lecture'', ''Masters Thesis'', ''Online'', ''Practicum'', ''Recitation'',
''Seminar'', ''Senior Thesis'', ''Studio'', None]`'
semester:
type: string
description: The semester this section was taught (of the form YYYYx where x
is A [for spring], B [summer], or C [fall]), e.g. `2019C` for fall 2019.
forms_returned:
type: integer
description: The number of review responses collected for this section (or null
if this section does not have review data).
forms_produced:
type: integer
description: The final enrollment of this section (or null if this section does
not have review data).
ratings:
type: object
description: The reviews for this section.
properties:
rSemesterCalc:
type: string
description: The oldest semester included in these review aggregations (of
the form YYYYx where x is A [for spring], B [summer], or C [fall]), e.g.
`2019C` for fall 2019. This field will not be missing.
rSemesterCount:
type: integer
description: The number of semesters included in these review aggregations.
This field will not be missing.
rInstructorQuality:
type: number
description: Average Instructor Quality
rCourseQuality:
type: number
description: Average Course Quality
rCommunicationAbility:
type: number
description: Average Comm. Ability
rStimulateInterest:
type: number
description: Average Stimulate Ability
rInstructorAccess:
type: number
description: Average Instructor Access
rDifficulty:
type: number
description: Average Difficulty
rWorkRequired:
type: number
description: Average Work Required
rTaQuality:
type: number
description: Average TA Quality
rReadingsValue:
type: number
description: Average Readings Value
rAmountLearned:
type: number
description: Average Amount Learned
rRecommendMajor:
type: number
description: Average Recommend Major
rRecommendNonmajor:
type: number
description: Average Recommend Non-Major
rAbilitiesChallenged:
type: number
description: Average Abilities Challenged
rClassPace:
type: number
description: Average Class Pace
rInstructorEffective:
type: number
description: Average Instructor Effectiveness
rNativeAbility:
type: number
description: Average Native Ability
rFinalEnrollment:
type: number
description: Average Final Enrollment at the End of the Semester
rPercentOpen:
type: number
description: Average Percent of Add/Drop Period Open
rNumOpenings:
type: number
description: Average Number of Openings During Add/Drop
rFilledInAdvReg:
type: number
description: Average Percent of Sections Completely Filled During Advance
Registration
comments:
type: string
description: A textual description of the section, as well as common sentiment
about it from reviews.
description: Reviews retrieved successfully.
'403':
description: Access denied (missing or improper authentication).
'404':
description: Invalid course_code or instructor_id.
tags:
- '[PCR] Section-Specific Reviews'
/api/review/autocomplete:
get:
operationId: Retrieve Autocomplete Dump
description: '(GET `/api/review/autocomplete`)
Autocomplete entries for Courses, departments, instructors. All objects have title, description,
and url. This route does not have any path parameters or query parameters, it just dumps
all the information necessary for frontend-based autocomplete. It is also cached
to improve performance.'
parameters: []
responses:
'200':
content:
application/json:
schema:
properties:
courses:
type: array
description: Data on courses for autocomplete.
items:
type: object
properties:
title:
type: string
description: The dash-joined department and code of the course, e.g. `CIS-120`
for CIS-120.
desc:
type: string
description: The title of the course, e.g. 'Programming Languages and Techniques
I' for CIS-120.
url:
type: url
description: The relative route through which this course's reviews can be accessed
(a prefix of `/api/review/` is assumed).
departments:
type: array
description: Data on departments for autocomplete.
items:
type: object
properties:
title:
type: string
description: The string department code, e.g. `CIS` for the CIS department.
desc:
type: string
description: The name of the department, e.g. 'Computer and Information Sci'
for the CIS department.
url:
type: url
description: The relative route through which this department's reviews can
be accessed (a prefix of `/api/review/` is assumed).
instructors:
type: array
description: Data on instructors for autocomplete.
items:
type: object
properties:
title:
type: string
description: The full name of the instructor.
desc:
type: string
description: A comma-separated string list of department codes to which this
instructor belongs.
url:
type: url
description: The relative route through which this instructor's reviews can
be accessed (a prefix of `/api/review/` is assumed).
description: Autocomplete dump retrieved successfully.
tags:
- '[PCR] Autocomplete Dump'
/api/plan/{schedule_pk}/calendar/:
get:
operationId: Get Calendar
description: '(GET `/api/plan/{schedule_pk}/calendar/`)
Return a .ics file of the user''s selected schedule'
parameters:
- name: schedule_pk
in: path
required: true
description: The PCP id of the schedule you want to export.
schema:
type: string
responses:
'200':
description: Schedule exported successfully
content: {}
tags:
- '[PCP] Calendar'
/api/plan/schedules/:
get:
operationId: List Schedules
description: '(GET `/api/plan/schedules/`)
Get a list of all the logged-in user''s schedules for the current semester. Normally, the
response code is 200. Each object in the returned list is of the same form as the object
returned by Retrieve Schedule.
User authentication required.'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
description: The id of the schedule.
sections:
type: array
items: []
description: The sections in the schedule.
breaks:
type: array
items: []
description: The breaks in the schedule.
semester:
type: string
description: '
The academic semester planned out by the schedule (of the form YYYYx where x is
A
[for spring], B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
maxLength: 5
name:
type: string
description: '
The user''s nick-name for the schedule. No two schedules can match in all of the
fields
`[name, semester, person]`
'
maxLength: 255
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: Schedules listed successfully.
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Schedule'
post:
operationId: Create Schedule
description: '(POST `/api/plan/schedules/`)
Use this route to create a schedule for the authenticated user.
This route will return a 201 if it succeeds (or a 200 if the POST specifies an id which already
is associated with a schedule, causing that schedule to be updated), with a JSON in the same
format as if you were to get the schedule you just posted (the 200 response schema for Retrieve
Schedule). If any of the given sections are invalid, a 404 is returned. If any two sections
in the `sections` list have differing semesters, a 400 is returned.
Note that your posted object can include either a `sections` field or a `meetings` field to
list all sections you would like to be in the schedule (mentioned above).
If both fields exist in the object, only `meetings` will be considered. In all cases,
the field in question will be renamed to `sections`, so that will be the field name whenever
you GET from the server. (Sorry for this confusing behavior, it is grandfathered in
from when the PCP frontend was referring to sections as meetings, before schedules were
stored on the backend.)
User authentication required.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
required:
- sections
- name
properties:
id:
required: false
type: string
description: '
Optionally include an `id` to update the schedule
with the given id (if such a schedule exists),
or otherwise create a new schedule with that id.
'
semester:
type: string
description: '
The semester of the schedule (of the form YYYYx where x is
A [for spring], B [summer], or C [fall]), e.g. 2019C for fall 2019.
Can also be specified in Path format (YYYYxx, where xx is
10 [for spring], 20 [summer], or 30 [fall]), e.g. 201930 for fall 2019.
You can omit this field and the first semester found in the
sections/meetings list will be used instead (or if no semester
is specified in the request, the current semester open for registration
will be used).
'
sections:
type: array
description: The sections in the schedule (can also be called "meetings").
items:
type: object
required:
- id
properties:
id:
type: string
description: A course code of the form DEPT-XXXX (e.g. CIS-1200), or a Path CRN
semester:
type: string
description: '
Optionally specify a section semester if you want the
backend to validate that all sections have the same
semester as the claimed schedule semester (taking the
first section semester as the schedule semester if none
is specified). Format is same as schedule semester.
'
name:
type: string
maxLength: 255
description: The user's nick-name for the schedule. No two schedules can match in all
of the fields [name, semester, person]. Optional for PUT path registration.
responses:
'201':
description: Schedule successfully created.
'403':
description: Access denied (missing or improper authentication).
'200':
description: Schedule successfully updated (a schedule with the specified id already existed).
'400':
description: Bad request (see description above).
tags:
- '[PCP] Schedule'
/api/plan/schedules/{id}/:
get:
operationId: Retrieve Schedule
description: '(GET `/api/plan/schedules/{id}/`)
Get one of the logged-in user''s schedules for the current semester, using the schedule''s ID.
If a schedule with the specified ID exists, a 200 response code is returned, along with
the schedule object.
If the given id does not exist, a 404 is returned.
User authentication required.'
parameters:
- name: id
in: path
required: true
description: A unique integer value identifying this schedule.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the schedule.
sections:
type: array
items: []
description: The sections in the schedule.
breaks:
type: array
items: []
description: The breaks in the schedule.
semester:
type: string
description: '
The academic semester planned out by the schedule (of the form YYYYx where x is
A
[for spring], B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
maxLength: 5
name:
type: string
description: '
The user''s nick-name for the schedule. No two schedules can match in all of the
fields
`[name, semester, person]`
'
maxLength: 255
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: Successful retrieve (the specified schedule exists).
'403':
description: Access denied (missing or improper authentication).
'404':
description: No schedule with the specified id exists.
tags:
- '[PCP] Schedule'
put:
operationId: Update Schedule
description: '(PUT `/api/plan/schedules/{id}/`)
Send a put request to this route to update a specific schedule.
The `id` path parameter (an integer) specifies which schedule you want to update. [You can also
pass `path` for the `id` path parameter, in order to create/update a Path Registration schedule
for the user. But to do this, you must be authenticated via Platform''s token auth for IPC,
e.g. from Penn Mobile - otherwise a 403 is returned.] If a schedule with
the specified id does not exist, a 404 is returned. In the body of the PUT, use the same format
as a POST request (see the Create Schedule docs).
This is an alternate way to update schedules (you can also just include the id field
in a schedule when you post and it will update that schedule if the id exists). Note that in
a
put request the id field in the putted object is ignored; the id taken from the route
always takes precedence. If the request succeeds, it will return a 200 and a JSON in the same
format as if you were to get the schedule you just updated (in the same format as returned by
the GET /schedules/ route).
User authentication required.'
parameters:
- name: id
in: path
required: true
description: A unique integer value identifying this schedule.
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
required:
- sections
- name
properties:
semester:
type: string
description: '
The semester of the schedule (of the form YYYYx where x is
A [for spring], B [summer], or C [fall]), e.g. 2019C for fall 2019.
Can also be specified in Path format (YYYYxx, where xx is
10 [for spring], 20 [summer], or 30 [fall]), e.g. 201930 for fall 2019.
You can omit this field and the first semester found in the
sections/meetings list will be used instead (or if no semester
is specified in the request, the current semester open for registration
will be used).
'
sections:
type: array
description: The sections in the schedule (can also be called "meetings").
items:
type: object
required:
- id
properties:
id:
type: string
description: A course code of the form DEPT-XXXX (e.g. CIS-1200), or a Path CRN
semester:
type: string
description: '
Optionally specify a section semester if you want the
backend to validate that all sections have the same
semester as the claimed schedule semester (taking the
first section semester as the schedule semester if none
is specified). Format is same as schedule semester.
'
name:
type: string
maxLength: 255
description: The user's nick-name for the schedule. No two schedules can match in all
of the fields [name, semester, person]. Optional for PUT path registration.
responses:
'200':
description: Successful update (the specified schedule was found and updated).
'403':
description: Access denied (missing or improper authentication).
'400':
description: Bad request (see description above).
'404':
description: No schedule with the specified id exists.
tags:
- '[PCP] Schedule'
delete:
operationId: Destroy Schedule
description: '(DELETE `/api/plan/schedules/{id}/`)
Send a delete request to this route to delete a specific schedule. The `id` path parameter
(an integer) specifies which schedule you want to update. If a schedule with the specified
id does not exist, a 404 is returned. If the delete is successful, a 204 is returned.
User authentication required.'
parameters:
- name: id
in: path
required: true
description: A unique integer value identifying this schedule.
schema:
type: string
responses:
'204':
description: Successful delete (the specified schedule was found and deleted).
'403':
description: Access denied (missing or improper authentication).
'404':
description: No schedule with the specified id exists.
tags:
- '[PCP] Schedule'
/api/plan/primary-schedules/:
get:
operationId: List Primary Schedules
description: '(GET `/api/plan/primary-schedules/`)
Get the primary schedule for the current user as well as primary
schedules of the user''s friends.
User authentication required.'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
user:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_
only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
readOnly: true
description: The user to which the primary schedule belongs.
schedule:
type: object
properties:
id:
type: integer
description: The id of the schedule.
sections:
type: array
items: []
description: The sections in the schedule.
breaks:
type: array
items: []
description: The breaks in the schedule.
semester:
type: string
description: '
The academic semester planned out by the schedule (of the form YYYYx where
x is A
[for spring], B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
maxLength: 5
name:
type: string
description: '
The user''s nick-name for the schedule. No two schedules can match in all
of the fields
`[name, semester, person]`
'
maxLength: 255
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
readOnly: true
description: The primary schedule.
description: Primary schedule (and friend's schedules) retrieved successfully.
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Primary Schedule'
post:
operationId: Create Primary Schedule
description: '(POST `/api/plan/primary-schedules/`)
Create/update/delete the primary schedule for the current user.
User authentication required.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
schedule_id:
type: integer
description: The ID of the schedule you want to make primary (or null to unset).
responses:
'201':
description: Primary schedule updated successfully.
'403':
description: Access denied (missing or improper authentication).
'400':
description: Invalid schedule in request.
tags:
- '[PCP] Primary Schedule'
/api/plan/primary-schedules/{id}/:
get:
operationId: Retrieve Primary Schedule
description: '(GET `/api/plan/primary-schedules/{id}/`)
User authentication required.'
parameters:
- name: id
in: path
required: true
description: A unique integer value identifying this primary schedule.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
user:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_
only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
readOnly: true
description: The user to which the primary schedule belongs.
schedule:
type: object
properties:
id:
type: integer
description: The id of the schedule.
sections:
type: array
items: []
description: The sections in the schedule.
breaks:
type: array
items: []
description: The breaks in the schedule.
semester:
type: string
description: '
The academic semester planned out by the schedule (of the form YYYYx where x
is A
[for spring], B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
maxLength: 5
name:
type: string
description: '
The user''s nick-name for the schedule. No two schedules can match in all of
the fields
`[name, semester, person]`
'
maxLength: 255
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
readOnly: true
description: The primary schedule.
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Primary Schedule'
/api/plan/breaks/:
get:
operationId: List Breaks
description: '(GET `/api/plan/breaks/`)
User authentication required.'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]`
for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R,
F for each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can
be used.
'
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Break'
post:
operationId: Create Break
description: '(POST `/api/plan/breaks/`)
User authentication required.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F for
each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can be
used.
'
required:
- name
responses:
'201':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F
for each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can
be used.
'
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Break'
/api/plan/breaks/{id}/:
get:
operationId: Retrieve Break
description: '(GET `/api/plan/breaks/{id}/`)
User authentication required.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F
for each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can
be used.
'
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Break'
put:
operationId: Update Break
description: '(PUT `/api/plan/breaks/{id}/`)
User authentication required.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F for
each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can be
used.
'
required:
- name
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F
for each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can
be used.
'
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Break'
patch:
operationId: Partial Update Break
description: '(PATCH `/api/plan/breaks/{id}/`)
User authentication required.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F for
each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can be
used.
'
required:
- name
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F
for each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can
be used.
'
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Break'
delete:
operationId: Destroy Break
description: '(DELETE `/api/plan/breaks/{id}/`)
User authentication required.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
responses:
'204':
description: ''
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCP] Break'
/api/alert/registrations/:
get:
operationId: List Registrations
description: '(GET `/api/alert/registrations/`)
Returns all registrations which are not deleted or made obsolete by resubscription. Put
another way, this endpoint will return a superset of all active registrations: all
active registrations (meaning registrations which would trigger an alert to be sent if their
section were to open up), IN ADDITION TO all inactive registrations from the current semester
which are at the head of their resubscribe chains and not deleted. However, one extra
modification is made: if multiple registrations for the same section are included in the
above-specified set, then all but the most recent (latest `created_at` value) are removed from
the list. This ensures that at most 1 registration is returned for each section. Note that this
is still a superset of all active registrations. If a registration is active, its `created_at`
value will be greater than any other registrations for the same section (our code ensures no
registration can be created or resubscribed to when an active registration exists for the same
section). This extra modification is actually made to prevent the user from being able to
resubscribe to an older registration after creating a new one (which would cause the backend to
return a 409 error).
Each object in the returned list of registrations is of the same form as the object returned
by Retrieve Registration.
User authentication required.'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration
belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
description: The dash-separated full code of the section associated with this Registration.
user:
type: string
readOnly: true
description: The Penn Labs Accounts username of the User who owns this Registration.
cancelled:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been cancelled. A cancelled
registration will not trigger any alerts to be sent even if the relevant section
opens.
A cancelled section can be resubscribed to (unlike deleted alerts), and will show
up
on the manage alerts page on the frontend (also unlike deleted alerts). Note that
once
a registration is cancelled, it cannot be uncancelled (resubscribing creates a
new
registration which is accessible via the resubscribed_to field, related name of
resubscribed_from).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been deleted. A deleted
registration will not trigger any alerts to be sent even if the relevant section
opens.
A deleted section cannot be resubscribed to or undeleted, and will not show up
on the
manage alerts page on the frontend. It is kept in the database for analytics purposes,
even though it serves no immediate functional purpose for its original user.
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
readOnly: true
description: '
Defaults to False, in which case a registration will not be automatically resubscribed
after it triggers an alert to be sent (but the user can still resubscribe to a
sent alert,
as long as it is not deleted). If set to True, the registration will be automatically
resubscribed to once it triggers an alert to be sent (this is useful in the case
of
volatile sections which are opening and closing frequently, often before the user
has
time to register).
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent
to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea
of
Registration objects and resubscribe chains is completely abstracted out of the
User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
readOnly: true
description: "Defaults to false. If set to true, the user will receive\n \
\ a close notification (an alert when the section closes after an\n alert\
\ was sent for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes
to open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
section_status:
type: string
readOnly: true
description: 'The current status of the watched section. Options and meanings:
| "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
description: Registrations successfully listed.
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCA] Registration'
post:
operationId: Create Registration
description: '(POST `/api/alert/registrations/`)
Use this route to create a PCA registration for a certain section. A PCA registration
represents a "subscription" to receive alerts for that section. The body of the request must
include a section field (with the dash-separated full code of the section) and optionally
can contain an auto_resubscribe field (defaults to false) which sets whether the registration
will automatically create a new registration once it triggers an alerts (i.e. whether it will
automatically resubscribe the user to receive alerts for that section). It can also optionally
contain a "close_notification" field, to enable close notifications on the registration.
Note that close notifications CANNOT be sent by text so you shouldn''t allow the user to
enable close notifications for any registration unless they have an email set in their
User Profile or have push notifications enabled. If you try to create a registration with
close_notification enabled and the user only has texts enabled, , a 406 will be returned
and the registration will not be created.
Note that if you include the "id" field in the body of your POST request, and that id
does not already exist, the id of the created registration will be set to the given value.
However, if the given id does exist, the request will instead be treated as a PUT request for
the registration (see the Update Registration docs for more info on how
PUT requests are handled).
This route returns a 201 if the registration is successfully created, a 400 if the input is
invalid (for instance if a null section is given), a 404 if the given section is not found in
the database, a 406 if the authenticated user does not have either a phone or an email set
in their profile (thus making it impossible for them to receive alerts), and a 409 if the
user is already currently registered to receive alerts for the given section. If the request
is redirected to update (when the passed in id is already associated with a registration),
other response codes may be returned (see the Update Registration docs for more info). If
registration is not currently open on PCA, a 503 is returned.
User authentication required.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The id of the registration (can optionally be used to customize the id
of a new registration, or to update an existing registration).
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration
belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
description: The dash-separated full code of the section associated with this Registration.
maxLength: 16
user:
type: string
readOnly: true
nullable: true
description: '
The User that registered for this alert. This object will be none if registration
occurred
before the PCA refresh of Spring 2020 (before the refresh user''s were only identified
by
their email and phone numbers, which are legacy fields in this model now). This object
might also be none if registration occurred through a 3rd part API such as Penn Course
Notify (now that Notify has fallen this is an unlikely event).
'
cancelled:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been cancelled. A cancelled
registration will not trigger any alerts to be sent even if the relevant section opens.
A cancelled section can be resubscribed to (unlike deleted alerts), and will show
up
on the manage alerts page on the frontend (also unlike deleted alerts). Note that
once
a registration is cancelled, it cannot be uncancelled (resubscribing creates a new
registration which is accessible via the resubscribed_to field, related name of
resubscribed_from).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been deleted. A deleted
registration will not trigger any alerts to be sent even if the relevant section opens.
A deleted section cannot be resubscribed to or undeleted, and will not show up on
the
manage alerts page on the frontend. It is kept in the database for analytics purposes,
even though it serves no immediate functional purpose for its original user.
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
description: '
Set this to true to turn on auto resubscribe (causing the registration to automatically
resubscribe once it sends out a notification). Default is false if not specified.
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent
to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea of
Registration objects and resubscribe chains is completely abstracted out of the User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
description: "Defaults to false. If set to true, the user will receive\n a close\
\ notification (an alert when the section closes after an\n alert was sent\
\ for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes to open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
required:
- section
responses:
'201':
content:
application/json:
schema:
properties:
message:
type: string
id:
type: integer
description: Registration successfully created.
'403':
description: Access denied (missing or improper authentication).
'400':
description: Bad request (e.g. given null section).
'404':
description: Given section not found in database.
'406':
description: No contact information (phone or email) set for user.
'409':
description: Registration for given section already exists.
'503':
description: Registration not currently open.
tags:
- '[PCA] Registration'
/api/alert/registrations/{id}/:
get:
operationId: Retrieve Registration
description: '(GET `/api/alert/registrations/{id}/`)
Get one of the logged-in user''s PCA registrations for the current semester, using
the registration''s ID. Note that if a registration with the specified ID exists, but that
registration is not at the head of its resubscribe chain (i.e. there is a more recent
registration which was created by resubscribing to the specified registration), the
HEAD of the resubscribe chain will be returned. This means the same registration could be
returned from a GET request to 2 distinct IDs (if they are in the same resubscribe chain).
If a registration with the specified ID exists, a 200 response code is returned, along
with the head registration object. If no registration with the given id exists,
a 404 is returned.
User authentication required.'
parameters:
- name: id
in: path
required: true
description: A unique integer value identifying this registration.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration
belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
description: The dash-separated full code of the section associated with this Registration.
user:
type: string
readOnly: true
description: The Penn Labs Accounts username of the User who owns this Registration.
cancelled:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been cancelled. A cancelled
registration will not trigger any alerts to be sent even if the relevant section
opens.
A cancelled section can be resubscribed to (unlike deleted alerts), and will show
up
on the manage alerts page on the frontend (also unlike deleted alerts). Note that
once
a registration is cancelled, it cannot be uncancelled (resubscribing creates a new
registration which is accessible via the resubscribed_to field, related name of
resubscribed_from).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been deleted. A deleted
registration will not trigger any alerts to be sent even if the relevant section
opens.
A deleted section cannot be resubscribed to or undeleted, and will not show up on
the
manage alerts page on the frontend. It is kept in the database for analytics purposes,
even though it serves no immediate functional purpose for its original user.
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
readOnly: true
description: '
Defaults to False, in which case a registration will not be automatically resubscribed
after it triggers an alert to be sent (but the user can still resubscribe to a sent
alert,
as long as it is not deleted). If set to True, the registration will be automatically
resubscribed to once it triggers an alert to be sent (this is useful in the case
of
volatile sections which are opening and closing frequently, often before the user
has
time to register).
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent
to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea
of
Registration objects and resubscribe chains is completely abstracted out of the
User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
readOnly: true
description: "Defaults to false. If set to true, the user will receive\n a\
\ close notification (an alert when the section closes after an\n alert was\
\ sent for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes to
open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
section_status:
type: string
readOnly: true
description: 'The current status of the watched section. Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
description: Registration detail successfully retrieved.
'403':
description: Access denied (missing or improper authentication).
'404':
description: Registration not found with given id.
tags:
- '[PCA] Registration'
put:
operationId: Update Registration
description: '(PUT `/api/alert/registrations/{id}/`)
Use this route to update existing PCA Registrations. Note that the provided id does
not always strictly specify which Registration gets modified. In fact, the actual Registration
that would get modified by a PUT request would be the head of the resubscribe chain of the
Registration with the specified id (so if you try to update an outdated Registration it will
instead update the most recent Registration). The parameters which can be
included in the request body are `resubscribe`, `auto_resubscribe`, ''close_notification'',
`cancelled`, and `deleted`. If you include multiple parameters, the order of precedence in
choosing what action to take is `resubscribe` > `deleted` > `cancelled` >
[`auto_resubscribe` and `close_notification`] (so if you include multiple
parameters only the action associated with the highest priority parameter will be executed,
except both auto_resubscribe and close_notification can be updated in the same request).
Note that close notifications CANNOT be sent by text so you shouldn''t allow the user to
enable close notifications for any registration unless they have an email set in their
User Profile or have push notifications enabled. If you try to update a registration to
enable close_notification and the user only has texts enabled, a 406 will be returned
and the registration will not be created.
Note that a registration will send an alert when the section it is watching opens, if and only
if it hasn''t sent one before, it isn''t cancelled, and it isn''t deleted. If a registration
would
send an alert when the section it is watching opens, we call it "active". Registrations which
have triggered an alert can be resubscribed to (which creates a new registration with the same
settings and adds that to the end of the original registration''s resubscribe chain). Triggered
registrations would show up in List Registrations (as long as they are at the head of
their resubscribe chain), even though they aren''t active. Cancelled registrations can also
be resubscribed to (in effect uncancelling), and also show up in List Registrations, despite
not being active. A user might cancel an alert rather than delete it if they want to keep it
in their PCA manage console but don''t want to receive alerts for it. Deleted registrations
are not active, do not show up in List Registrations, and cannot be resubscribed to. You can
think of deleted registrations as effectively nonexistent; they are only kept on the backend
for analytics purposes. Note that while you can cancel a registration by setting the cancelled
parameter to true in your PUT request (and the same for delete/deleted), you cannot uncancel
or undelete (cancelled registrations can be resubscribed to and deleted registrations
are effectively nonexistent).
If the update is successful, a 200 is returned. If there is some issue with the request,
a 400 is returned. This could be caused by trying to update a registration from a different
semester, trying to resubscribe to a deleted registration, resubscribing to a registration
which is not cancelled or hasn''t yet triggered a notification, cancelling a deleted or
triggered registration, trying to make changes to a deleted registration, or otherwise
breaking rules. Look in the detail field of the response object for more detail on what
exactly went wrong if you encounter a 400. If no registration with the given id is found,
a 404 is returned. If registration is not currently open on PCA, a 503 is returned.
User authentication required.'
parameters:
- name: id
in: path
required: true
description: A unique integer value identifying this registration.
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration
belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
readOnly: true
description: The section that the user registered to be notified about.
user:
type: string
readOnly: true
nullable: true
description: '
The User that registered for this alert. This object will be none if registration
occurred
before the PCA refresh of Spring 2020 (before the refresh user''s were only identified
by
their email and phone numbers, which are legacy fields in this model now). This object
might also be none if registration occurred through a 3rd part API such as Penn Course
Notify (now that Notify has fallen this is an unlikely event).
'
cancelled:
type: boolean
description: '
Set this to true to cancel to this registration (making it inactive while keeping
it
in List Registration).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
description: '
Set this to true to delete this registration (making it inactive and preventing it
from
showing up in List Registrations).
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
description: '
Set this to true to turn on auto resubscribe (causing the registration to automatically
resubscribe once it sends out a notification).
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent
to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea of
Registration objects and resubscribe chains is completely abstracted out of the User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
description: "Defaults to false. If set to true, the user will receive\n a close\
\ notification (an alert when the section closes after an\n alert was sent\
\ for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes to open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
resubscribe:
type: boolean
description: '
Set this to true to resubscribe to this registration (only works if the registration
has sent a notification and hasn''t been deleted).
'
responses:
'200':
description: Registration successfully updated (or no changes necessary).
'403':
description: Access denied (missing or improper authentication).
'400':
description: Bad request (see route description).
'404':
description: Registration not found with given id.
'503':
description: Registration not currently open.
tags:
- '[PCA] Registration'
/api/alert/registrationhistory/:
get:
operationId: List Registration History
description: '(GET `/api/alert/registrationhistory/`)
List all of the user''s registrations for the current semester, regardless of whether
they are active, obsolete (not at the head of their resubscribe chains), or deleted. Note
that this is not appropriate to use for listing registrations and presenting them to the user;
for that you should use List Registrations (GET `/api/alert/registrations/`).
User authentication required.'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration
belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
description: The dash-separated full code of the section associated with this Registration.
user:
type: string
readOnly: true
description: The Penn Labs Accounts username of the User who owns this Registration.
cancelled:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been cancelled. A cancelled
registration will not trigger any alerts to be sent even if the relevant section
opens.
A cancelled section can be resubscribed to (unlike deleted alerts), and will show
up
on the manage alerts page on the frontend (also unlike deleted alerts). Note that
once
a registration is cancelled, it cannot be uncancelled (resubscribing creates a
new
registration which is accessible via the resubscribed_to field, related name of
resubscribed_from).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been deleted. A deleted
registration will not trigger any alerts to be sent even if the relevant section
opens.
A deleted section cannot be resubscribed to or undeleted, and will not show up
on the
manage alerts page on the frontend. It is kept in the database for analytics purposes,
even though it serves no immediate functional purpose for its original user.
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
readOnly: true
description: '
Defaults to False, in which case a registration will not be automatically resubscribed
after it triggers an alert to be sent (but the user can still resubscribe to a
sent alert,
as long as it is not deleted). If set to True, the registration will be automatically
resubscribed to once it triggers an alert to be sent (this is useful in the case
of
volatile sections which are opening and closing frequently, often before the user
has
time to register).
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent
to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea
of
Registration objects and resubscribe chains is completely abstracted out of the
User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
readOnly: true
description: "Defaults to false. If set to true, the user will receive\n \
\ a close notification (an alert when the section closes after an\n alert\
\ was sent for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes
to open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
section_status:
type: string
readOnly: true
description: 'The current status of the watched section. Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
description: Registration history successfully listed.
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCA] Registration History'
/api/alert/registrationhistory/{id}/:
get:
operationId: Retrieve Historic Registration
description: '(GET `/api/alert/registrationhistory/{id}/`)
Get the detail of a specific registration from the current semester. All registrations are
accessible via this endpoint, regardless of whether they are active,
obsolete (not at the head of their resubscribe chains), or deleted. Unless you need to access
inactive and obsolete registrations, you should probably use Retrieve Registration
(GET `/api/alert/registrations/{id}/`) rather than this endpoint.
User authentication required.'
parameters:
- name: id
in: path
required: true
description: A unique integer value identifying this registration.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration
belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
description: The dash-separated full code of the section associated with this Registration.
user:
type: string
readOnly: true
description: The Penn Labs Accounts username of the User who owns this Registration.
cancelled:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been cancelled. A cancelled
registration will not trigger any alerts to be sent even if the relevant section
opens.
A cancelled section can be resubscribed to (unlike deleted alerts), and will show
up
on the manage alerts page on the frontend (also unlike deleted alerts). Note that
once
a registration is cancelled, it cannot be uncancelled (resubscribing creates a new
registration which is accessible via the resubscribed_to field, related name of
resubscribed_from).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been deleted. A deleted
registration will not trigger any alerts to be sent even if the relevant section
opens.
A deleted section cannot be resubscribed to or undeleted, and will not show up on
the
manage alerts page on the frontend. It is kept in the database for analytics purposes,
even though it serves no immediate functional purpose for its original user.
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
readOnly: true
description: '
Defaults to False, in which case a registration will not be automatically resubscribed
after it triggers an alert to be sent (but the user can still resubscribe to a sent
alert,
as long as it is not deleted). If set to True, the registration will be automatically
resubscribed to once it triggers an alert to be sent (this is useful in the case
of
volatile sections which are opening and closing frequently, often before the user
has
time to register).
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent
to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea
of
Registration objects and resubscribe chains is completely abstracted out of the
User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
readOnly: true
description: "Defaults to false. If set to true, the user will receive\n a\
\ close notification (an alert when the section closes after an\n alert was\
\ sent for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes to
open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
section_status:
type: string
readOnly: true
description: 'The current status of the watched section. Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
description: Historic registration detail successfully retrieved.
'403':
description: Access denied (missing or improper authentication).
'404':
description: Historic registration not found with given id.
tags:
- '[PCA] Registration History'
/api/degree/degreeplans:
get:
operationId: List Degree Plan Lists
description: '(GET `/api/degree/degreeplans`)
List, retrieve, create, destroy, and update a DegreePlan.'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: ''
tags:
- '[PDP] Degree Plan Lists'
post:
operationId: Create Degree Plan Detail
description: '(POST `/api/degree/degreeplans`)
List, retrieve, create, destroy, and update a DegreePlan.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- name
- degrees
responses:
'201':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: ''
tags:
- '[PDP] Degree Plan Detail'
/api/degree/degreeplans/{id}:
get:
operationId: Retrieve Degree Plan Detail
description: '(GET `/api/degree/degreeplans/{id}`)
List, retrieve, create, destroy, and update a DegreePlan.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: ''
tags:
- '[PDP] Degree Plan Detail'
put:
operationId: Update Degree Plan Detail
description: '(PUT `/api/degree/degreeplans/{id}`)
List, retrieve, create, destroy, and update a DegreePlan.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- name
- degrees
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: ''
tags:
- '[PDP] Degree Plan Detail'
patch:
operationId: Partial Update Degree Plan Detail
description: '(PATCH `/api/degree/degreeplans/{id}`)
List, retrieve, create, destroy, and update a DegreePlan.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- name
- degrees
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: ''
tags:
- '[PDP] Degree Plan Detail'
delete:
operationId: Destroy Degree Plan Detail
description: '(DELETE `/api/degree/degreeplans/{id}`)
List, retrieve, create, destroy, and update a DegreePlan.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
responses:
'204':
description: ''
tags:
- '[PDP] Degree Plan Detail'
/api/degree/degrees:
get:
operationId: List Degrees
description: '(GET `/api/degree/degrees`)
Retrieve a list of all Degree objects.'
parameters:
- name: search
required: false
in: query
description: A search term.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
readOnly: true
program:
enum:
- EU_BSE
- EU_BAS
- AU_BA
- WU_BS
- NU_BSN
type: string
description: '
The program code for this degree, e.g., EU_BSE
'
degree:
type: string
description: '
The degree code for this degree, e.g., BSE
'
maxLength: 4
major:
type: string
description: '
The major code for this degree, e.g., BIOL
'
maxLength: 4
major_name:
type: string
nullable: true
description: '
The name of the major for this degree, e.g., Africana Studies
'
maxLength: 128
concentration:
type: string
nullable: true
description: '
The concentration code for this degree, e.g., BMAT
'
maxLength: 4
concentration_name:
type: string
nullable: true
description: '
The name of the concentration for this degree, e.g., African American Studies
'
maxLength: 128
year:
type: integer
maximum: 2147483647
minimum: -2147483648
description: '
The effective year of this degree, e.g., 2023
'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
nullable: true
description: '
The minimum number of CUs required for this degree.
'
rules:
type: array
items:
type: integer
description: '
The rules for this degree. Blank if this degree has no rules.
'
description: ''
tags:
- '[PDP] Degree'
/api/degree/degrees/{id}:
get:
operationId: Retrieve Degree
description: '(GET `/api/degree/degrees/{id}`)
Retrieve a list of all Degree objects.'
parameters:
- name: id
in: path
required: true
description: A unique integer value identifying this degree.
schema:
type: string
- name: search
required: false
in: query
description: A search term.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
rules:
type: array
items: []
readOnly: true
double_count_restrictions:
type: array
items: []
readOnly: true
program:
enum:
- EU_BSE
- EU_BAS
- AU_BA
- WU_BS
- NU_BSN
type: string
description: '
The program code for this degree, e.g., EU_BSE
'
degree:
type: string
description: '
The degree code for this degree, e.g., BSE
'
maxLength: 4
major:
type: string
description: '
The major code for this degree, e.g., BIOL
'
maxLength: 4
major_name:
type: string
nullable: true
description: '
The name of the major for this degree, e.g., Africana Studies
'
maxLength: 128
concentration:
type: string
nullable: true
description: '
The concentration code for this degree, e.g., BMAT
'
maxLength: 4
concentration_name:
type: string
nullable: true
description: '
The name of the concentration for this degree, e.g., African American Studies
'
maxLength: 128
year:
type: integer
maximum: 2147483647
minimum: -2147483648
description: '
The effective year of this degree, e.g., 2023
'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
nullable: true
description: '
The minimum number of CUs required for this degree.
'
description: ''
tags:
- '[PDP] Degree'
/api/degree/docked:
get:
operationId: List Docked Courses
description: '(GET `/api/degree/docked`)
List, retrieve, create, destroy, and update docked courses'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
id:
type: string
readOnly: true
description: The id of the docked course
attribute_codes:
type: string
readOnly: true
description: ''
tags:
- '[PDP] Docked Course'
post:
operationId: Create Docked Course
description: '(POST `/api/degree/docked`)
List, retrieve, create, destroy, and update docked courses'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
id:
type: string
readOnly: true
description: The id of the docked course
attribute_codes:
type: string
readOnly: true
required:
- full_code
responses:
'201':
content:
application/json:
schema:
type: object
properties:
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
id:
type: string
readOnly: true
description: The id of the docked course
attribute_codes:
type: string
readOnly: true
description: ''
tags:
- '[PDP] Docked Course'
/api/degree/docked/{full_code}:
get:
operationId: Retrieve Docked Course
description: '(GET `/api/degree/docked/{full_code}`)
List, retrieve, create, destroy, and update docked courses'
parameters:
- name: full_code
in: path
required: true
description: The dash-joined department and code of the course, e.g., `CIS-120`
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
id:
type: string
readOnly: true
description: The id of the docked course
attribute_codes:
type: string
readOnly: true
description: ''
tags:
- '[PDP] Docked Course'
delete:
operationId: Destroy Docked Course
description: '(DELETE `/api/degree/docked/{full_code}`)
List, retrieve, create, destroy, and update docked courses'
parameters:
- name: full_code
in: path
required: true
description: The dash-joined department and code of the course, e.g., `CIS-120`
schema:
type: string
responses:
'204':
description: ''
tags:
- '[PDP] Docked Course'
/api/degree/degreeplans/{degreeplan_pk}/fulfillments:
get:
operationId: List Fulfillments
description: '(GET `/api/degree/degreeplans/{degreeplan_pk}/fulfillments`)
List, retrieve, create, destroy, and update a Fulfillment.'
parameters:
- name: degreeplan_pk
in: path
required: true
description: ''
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included
in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted
anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
description: ''
tags:
- '[PDP] Fulfillment'
post:
operationId: Create Fulfillment
description: '(POST `/api/degree/degreeplans/{degreeplan_pk}/fulfillments`)
Create or update fulfillment.'
parameters:
- name: degreeplan_pk
in: path
required: true
description: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
required:
- degree_plan
- full_code
responses:
'201':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included
in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted
anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
description: ''
tags:
- '[PDP] Fulfillment'
/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}:
get:
operationId: Retrieve Fulfillment
description: '(GET `/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}`)
List, retrieve, create, destroy, and update a Fulfillment.'
parameters:
- name: degreeplan_pk
in: path
required: true
description: ''
schema:
type: string
- name: full_code
in: path
required: true
description: The dash-joined department and code of the course, e.g., `CIS-120`
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included
in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted
anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
description: ''
tags:
- '[PDP] Fulfillment'
delete:
operationId: Destroy Fulfillment
description: '(DELETE `/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}`)
List, retrieve, create, destroy, and update a Fulfillment.'
parameters:
- name: degreeplan_pk
in: path
required: true
description: ''
schema:
type: string
- name: full_code
in: path
required: true
description: The dash-joined department and code of the course, e.g., `CIS-120`
schema:
type: string
responses:
'204':
description: ''
tags:
- '[PDP] Fulfillment'
/api/degree/satisfied-rule-list/{degree_plan_id}/{full_code}/{rule_id}:
get:
operationId: Retrieve Satisfied Rule List
description: '(GET `/api/degree/satisfied-rule-list/{degree_plan_id}/{full_code}/{rule_id}`)
Provided a degree plan and a course code, retrieve a sublist
of the degrees'' rules that are satisfied by the course.'
parameters:
- name: degree_plan_id
in: path
required: true
description: The ID of the degree plan to query
schema:
type: string
- name: full_code
in: path
required: true
description: "The full course code (e.g., 'CIS-1200')\n to\
\ check against requirements"
schema:
type: string
- name: rule_id
in: path
required: true
description: "The ID of a specific rule to check, or '-1'\n to\
\ automatically determine the highest priority rule"
schema:
type: string
responses:
'200':
description: "Returns a list of degree requirements satisfied by the course,\n \
\ including selected rules, newly selected rules, unselected rules that could\n \
\ be satisfied, and whether the selections can be legally double counted."
tags:
- '[PDP] Satisfied Rule Lists'
/api/base/health/:
get:
operationId: List Healths
description: '(GET `/api/base/health/`)
'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items: {}
description: ''
tags:
- '[PCx] Healths'
/api/base/{semester}/courses/:
get:
operationId: List Courses
description: '(GET `/api/base/{semester}/courses/`)
Retrieve a list of (all) courses for the provided semester.'
parameters:
- name: semester
in: path
required: true
description: 'The semester of the course (of the form YYYYx where x is A [for spring], B [summer],
or C [fall]), e.g. ''2019C'' for fall 2019. Alternatively, you can just pass ''current'' for
the current semester. Finally, you can pass ''all'' to always return the most recent course
for each full_code, no matter which semester it is from. The ''all'' option can be significantly
more expensive, so use only where needed. '
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
readOnly: true
description: '
The full code of the course, in the form ''{dept code}-{course code}''
dash-joined department and code of the course, e.g. `CIS-120` for CIS-120.'
title:
type: string
readOnly: true
description: '
The title of the course, e.g. ''Programming Languages and Techniques I'' for CIS-120.
'
description:
type: string
readOnly: true
description: '
The description of the course, e.g. ''A fast-paced introduction to the fundamental
concepts
of programming... [etc.]'' for CIS-120.
'
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
num_sections:
type: integer
readOnly: true
description: The number of sections for this course.
course_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average course quality rating for this section, on a scale of 0-4.
instructor_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average instructor quality for this section, on a scale of 0-4.
difficulty:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average difficult rating for this section, on a scale of 0-4.
work_required:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average work required for this section, on a scale of 0-4.
recommendation_score:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: '
The recommendation score for this course if the user is logged in, or null if
the
the user is not logged in.'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
readOnly: true
nullable: true
description: The number of credits this course takes. This is precomputed for efficiency.
description: Courses listed successfully.
tags:
- '[PCx] Course'
/api/base/{semester}/search/courses/:
get:
operationId: Course Search
description: '(GET `/api/base/{semester}/search/courses/`)
This route allows you to list courses by certain search terms and/or filters.
Without any GET parameters, this route simply returns all courses
for a given semester. There are a few filter query parameters which constitute ranges of
floating-point numbers. The values for these are - , with minimum excluded.
For example, looking for classes in the range of 0-2.5 in difficulty, you would add the
parameter difficulty=0-2.5. If you are a backend developer, you can find these filters in
backend/plan/filters.py/CourseSearchFilterBackend. If you are reading the frontend docs,
these filters are listed below in the query parameters list (with description starting with
"Filter").'
parameters:
- name: semester
in: path
required: true
description: 'The semester of the course (of the form YYYYx where x is A [for spring], B [summer],
or C [fall]), e.g. ''2019C'' for fall 2019. Alternatively, you can just pass ''current'' for
the current semester. Finally, you can pass ''all'' to always return the most recent course
for each full_code, no matter which semester it is from. The ''all'' option can be significantly
more expensive, so use only where needed. '
schema:
type: string
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- name: search
schema:
type: string
required: false
in: query
description: Search query. Can be either a fragment of a course code, or any keyword/professor
name.
- name: degree_rules
required: false
in: query
description: Filter to courses that satisfy certain degree Rules. Accepts a string of comma-separated
Rule ids. If multiple Rule ids are passed then filtered courses satisfy all the rules.
schema:
type: string
- name: type
required: false
in: query
description: Can specify what kind of query to run. Course queries are faster, keyword queries
look against professor name and course title.
schema:
type: string
default: auto
enum:
- auto
- course
- keyword
- name: pre_ngss_requirements
required: false
in: query
description: Deprecated since 2022B. Filter courses by comma-separated pre ngss requirements,
ANDed together. Use the [List Requirements](/api/documentation/#operation/List%20Pre-Ngss%20Requirements)
endpoint to get requirement IDs.
schema:
type: string
example: SS@SEAS,H@SEAS
- name: attributes
required: false
in: query
description: 'This query parameter accepts a logical expression of attribute codes separated by
`*` (AND) or `|` (OR) connectives, optionally grouped into clauses by parentheses and arbitrarily
nested (we avoid using `&` for the AND connective so the query string doesn''t have to be escaped).
You can negate an individual attribute code or a clause with the `~` operator (this will filter
for courses that do NOT have that attribute or do not satisfy that clause). Binary operators
are left-associative, and operator precedence is as follows: `~ > * > |`. Whitespace is ignored.
A syntax error will cause a 400 response to be returned. Example: `(EUHS|EUSS)*(QP|QS)` would
filter for courses that satisfy the EAS humanities or social science requirements and also have
a standard grade type or a pass/fail grade type. Use the [List Attributes](/api/documentation/#operation/List%20Attributes)
endpoint to get a list of valid attribute codes and descriptions.'
schema:
type: string
example: WUOM|WUGA
- name: cu
required: false
in: query
description: Filter course units to be within the given range.
schema:
type: string
example: 0-0.5
- name: difficulty
required: false
in: query
description: Filter course difficulty (average across all reviews) to be within the given range.
schema:
type: string
example: 1-2.5
- name: course_quality
required: false
in: query
description: Filter course quality (average across all reviews) to be within the given range.
schema:
type: string
example: 2.5-4
- name: instructor_quality
required: false
in: query
description: Filter instructor quality (average across all reviews) to be within the given range.
schema:
type: string
example: 2.5-4
- name: days
required: false
in: query
description: 'Filter meetings to be within the specified set of days. The set of days should be
specified as a string containing some combination of the characters [M, T, W, R, F, S, U]. This
filters courses by the following condition: include a course only if the specified day filter
does not limit the set of section activities we can participate in for the course. Passing an
empty string will return only asynchronous classes or classes with meeting days TBD.'
schema:
type: string
example: TWR
- name: time
required: false
in: query
description: 'Filter meeting times to be within the specified range. The start and end time of
the filter should be dash-separated. Times should be specified as decimal numbers of the form
`h+mm/100` where h is the hour `[0..23]` and mm is the minute `[0,60)`, in ET. You can omit
either the start or end time to leave that side unbounded, e.g. ''11.30-''. This filters courses
by the following condition: include a course only if the specified time filter does not limit
the set of section activities we can participate in for the course.'
schema:
type: string
example: 11.30-18
- name: schedule-fit
required: false
in: query
description: 'Filter meeting times to fit into the schedule with the specified integer id. You
must be authenticated with the account owning the specified schedule, or this filter will be
ignored. This filters courses by the following condition: include a course only if the specified
schedule-fit filter does not limit the set of section activities we can participate in for the
course.'
schema:
type: integer
example: '242'
- name: is_open
required: false
in: query
description: 'Filter courses to only those that are open. A boolean of true should be included
if you want to apply the filter. By default (ie when the `is_open` is not supplied, the filter
is not applied. This filters courses by the following condition: include a course only if the
specification that a section is open does not limit the set of section activities we can participate
in for the course.In other words, filter to courses for which all activities have open sections.'
schema:
type: boolean
example: 'true'
responses:
'200':
content:
application/json:
schema:
type: object
properties:
count:
type: integer
example: 123
next:
type: string
nullable: true
format: uri
example: http://api.example.org/accounts/?page=4
previous:
type: string
nullable: true
format: uri
example: http://api.example.org/accounts/?page=2
results:
type: array
items:
type: object
properties:
id:
type: string
readOnly: true
description: '
The full code of the course, in the form ''{dept code}-{course code}''
dash-joined department and code of the course, e.g. `CIS-120` for CIS-120.'
title:
type: string
readOnly: true
description: '
The title of the course, e.g. ''Programming Languages and Techniques I'' for
CIS-120.
'
description:
type: string
readOnly: true
description: '
The description of the course, e.g. ''A fast-paced introduction to the fundamental
concepts
of programming... [etc.]'' for CIS-120.
'
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
num_sections:
type: integer
readOnly: true
description: The number of sections for this course.
course_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average course quality rating for this section, on a scale
of 0-4.
instructor_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average instructor quality for this section, on a scale of
0-4.
difficulty:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average difficult rating for this section, on a scale of 0-4.
work_required:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average work required for this section, on a scale of 0-4.
recommendation_score:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: '
The recommendation score for this course if the user is logged in, or null
if the
the user is not logged in.'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
readOnly: true
nullable: true
description: The number of credits this course takes. This is precomputed for
efficiency.
description: Courses listed successfully.
'400':
description: Bad request (invalid query).
tags:
- '[PCx] Course'
/api/base/{semester}/courses/{full_code}/:
get:
operationId: Retrieve Course
description: '(GET `/api/base/{semester}/courses/{full_code}/`)
Retrieve a detailed look at a specific course. Includes all details necessary to display course
info, including requirements this class fulfills, and all sections.'
parameters:
- name: semester
in: path
required: true
description: 'The semester of the course (of the form YYYYx where x is A [for spring], B [summer],
or C [fall]), e.g. ''2019C'' for fall 2019. Alternatively, you can just pass ''current'' for
the current semester. Finally, you can pass ''all'' to always return the most recent course
for each full_code, no matter which semester it is from. The ''all'' option can be significantly
more expensive, so use only where needed. '
schema:
type: string
- name: full_code
in: path
required: true
description: The dash-joined department and code of the course, e.g. `CIS-120` for CIS-120.
schema:
type: string
- name: check_offered_in
in: query
description: '
Check that the desired course was offered under the specified
code in the specified semester.
Format is `course_code@semester`, e.g. `CIS-1210@2022A`.
404 will be returned if the course
does not exist, or was not offered in that semester.
'
schema:
type: string
required: false
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: string
readOnly: true
description: '
The full code of the course, in the form ''{dept code}-{course code}''
dash-joined department and code of the course, e.g. `CIS-120` for CIS-120.'
title:
type: string
readOnly: true
description: '
The title of the course, e.g. ''Programming Languages and Techniques I'' for CIS-120.
'
description:
type: string
readOnly: true
description: '
The description of the course, e.g. ''A fast-paced introduction to the fundamental
concepts
of programming... [etc.]'' for CIS-120.
'
syllabus_url:
type: string
readOnly: true
nullable: true
description: '
A URL for the syllabus of the course, if available.
Not available for courses offered in or before spring 2022.
'
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
prerequisites:
type: string
readOnly: true
description: Text describing the prereqs for a course, e.g. 'CIS 120, 160' for CIS-121.
course_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average course quality rating for this section, on a scale of 0-4.
instructor_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average instructor quality for this section, on a scale of 0-4.
difficulty:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average difficult rating for this section, on a scale of 0-4.
work_required:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average work required for this section, on a scale of 0-4.
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
readOnly: true
nullable: true
description: The number of credits this course takes. This is precomputed for efficiency.
crosslistings:
type: array
items:
type: string
readOnly: true
description: '
A list of the full codes (DEPT-###) of all crosslistings for this course
(not including this course).
'
pre_ngss_requirements:
type: array
items: []
readOnly: true
description: '
A list of the pre-NGSS (deprecated since 2022B) academic requirements
this course fulfills.
'
attributes:
type: array
items: []
readOnly: true
description: '
A list of attributes this course has. Attributes are typically
used to mark courses which students in a program/major should
take.
'
restrictions:
type: array
items: []
readOnly: true
description: '
A list of NGSSRestrictions this course has. Restrictions provide information about
who can take a course.
'
sections:
type: array
items: []
readOnly: true
description: A list of the sections of this course.
description: Courses detail retrieved successfully.
tags:
- '[PCx] Course'
/api/base/{semester}/search/sections/:
get:
operationId: Section Search
description: '(GET `/api/base/{semester}/search/sections/`)
Retrieve a list of sections (less detailed than [PCx] Section, or SectionDetail on the
backend). The sections are filtered by the search term (assumed to be a prefix of a
section''s full code, with each chunk either space-delimited, dash-delimited, or not delimited).'
parameters:
- name: semester
in: path
required: true
description: 'The semester of the course (of the form YYYYx where x is A [for spring], B [summer],
or C [fall]), e.g. ''2019C'' for fall 2019. Alternatively, you can just pass ''current'' for
the current semester. Finally, you can pass ''all'' to always return the most recent course
for each full_code, no matter which semester it is from. The ''all'' option can be significantly
more expensive, so use only where needed. '
schema:
type: string
- name: search
required: false
in: query
description: A search term.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
section_id:
type: string
readOnly: true
description: '
The dash-separated dept, full-code, and section-code, e.g. `CIS-120-001` for the
001 lecture section of CIS-120.
'
status:
enum:
- O
- C
- X
- ''
type: string
readOnly: true
description: 'The registration status of the section. Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
activity:
enum:
- ''
- CLN
- CRT
- DAB
- DIS
- DPC
- FLD
- HYB
- IND
- LAB
- LEC
- MST
- ONL
- PRC
- REC
- SEM
- SRT
- STU
type: string
readOnly: true
description: 'The section activity, e.g. `LEC` for CIS-120-001 (2020A). Options
and meanings: | "" | "Undefined" |
| "CLN" | "Clinic" |
| "CRT" | "Clinical
Rotation" |
| "DAB" | "Dissertation Abroad" |
| "DIS" | "Dissertation" |
| "DPC" | "Doctoral
Program Exchange" |
| "FLD" | "Field Work" |
| "HYB" | "Hybrid" |
| "IND" | "Independent
Study" |
| "LAB" | "Lab" |
| "LEC" | "Lecture" |
| "MST" | "Masters
Thesis" |
| "ONL" | "Online" |
| "PRC" | "Practicum" |
| "REC" | "Recitation" |
| "SEM" | "Seminar" |
| "SRT" | "Senior
Thesis" |
| "STU" | "Studio" |
'
meeting_times:
type: string
readOnly: true
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]`
for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R,
F for each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can
be used.
'
instructors:
type: array
items: []
readOnly: true
description: A list of the names of the instructors teaching this section.
course_code:
type: string
readOnly: true
description: '
The full code of the course this section belongs to, e.g. `CIS-120` for CIS-120-001.
'
course_title:
type: string
readOnly: true
description: '
The title of the course this section belongs to, e.g.
''Programming Languages and Techniques I'' for CIS-120-001.
'
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
registration_volume:
type: integer
readOnly: true
description: The number of active PCA registrations watching this section.
description: Sections Listed Successfully.
tags:
- '[PCx] Section'
/api/base/{semester}/sections/{full_code}/:
get:
operationId: Retrieve Section
description: '(GET `/api/base/{semester}/sections/{full_code}/`)
Retrieve a detailed look at a specific course section.'
parameters:
- name: semester
in: path
required: true
description: 'The semester of the course (of the form YYYYx where x is A [for spring], B [summer],
or C [fall]), e.g. ''2019C'' for fall 2019. Alternatively, you can just pass ''current'' for
the current semester. Finally, you can pass ''all'' to always return the most recent course
for each full_code, no matter which semester it is from. The ''all'' option can be significantly
more expensive, so use only where needed. '
schema:
type: string
- name: full_code
in: path
required: true
description: '
The full code of the section, in the form ''{dept code}-{course code}-{section code}'',
e.g. `CIS-120-001` for the 001 section of CIS-120.
'
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
id:
type: string
readOnly: true
description: '
The dash-separated dept, full-code, and section-code, e.g. `CIS-120-001` for the
001 lecture section of CIS-120.
'
status:
enum:
- O
- C
- X
- ''
type: string
readOnly: true
description: 'The registration status of the section. Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
activity:
enum:
- ''
- CLN
- CRT
- DAB
- DIS
- DPC
- FLD
- HYB
- IND
- LAB
- LEC
- MST
- ONL
- PRC
- REC
- SEM
- SRT
- STU
type: string
readOnly: true
description: 'The section activity, e.g. `LEC` for CIS-120-001 (2020A). Options and
meanings: | "" | "Undefined" |
| "CLN" | "Clinic" |
| "CRT" | "Clinical
Rotation" |
| "DAB" | "Dissertation Abroad" |
| "DIS" | "Dissertation" |
| "DPC" | "Doctoral
Program Exchange" |
| "FLD" | "Field Work" |
| "HYB" | "Hybrid" |
| "IND" | "Independent
Study" |
| "LAB" | "Lab" |
| "LEC" | "Lecture" |
| "MST" | "Masters
Thesis" |
| "ONL" | "Online" |
| "PRC" | "Practicum" |
| "REC" | "Recitation" |
| "SEM" | "Seminar" |
| "SRT" | "Senior
Thesis" |
| "STU" | "Studio" |
'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
readOnly: true
nullable: true
description: The number of credits this section is worth.
capacity:
type: integer
readOnly: true
description: The max allowed enrollment across all crosslistings of this section.
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
instructors:
type: array
items: []
readOnly: true
description: A list of the names of the instructors teaching this section.
course_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average course quality rating for this section, on a scale of 0-4.
instructor_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average instructor quality for this section, on a scale of 0-4.
difficulty:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average difficult rating for this section, on a scale of 0-4.
work_required:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average work required for this section, on a scale of 0-4.
associated_sections:
type: array
items: []
readOnly: true
description: '
A list of all sections associated with the Course which this section belongs to;
e.g. for
CIS-120-001, all of the lecture and recitation sections for CIS-120 (including CIS-120-001)
in the same semester.
'
registration_volume:
type: integer
readOnly: true
description: The number of active PCA registrations watching this section.
description: Section detail retrieved successfully.
tags:
- '[PCx] Section'
/api/base/{semester}/pre-ngss-requirements/:
get:
operationId: List Pre-Ngss Requirements
description: '(GET `/api/base/{semester}/pre-ngss-requirements/`)
Retrieve a list of all pre-NGSS (deprecated since 2022B) academic requirements
in the database for this semester.'
parameters:
- name: semester
in: path
required: true
description: The semester of the requirement (of the form YYYYx where x is A [for spring], B [summer],
or C [fall]), e.g. `2019C` for fall 2019. We organize requirements by semester so that we don't
get huge related sets which don't give particularly good info.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
readOnly: true
description: A string representation of the requirement, in the form '{code}@{school}'
code:
type: string
readOnly: true
description: '
The code identifying this requirement, e.g. `MFR` for ''Formal Reasoning Course'',
an SAS requirement satisfied by CIS-120.
'
school:
enum:
- SEAS
- WH
- SAS
type: string
readOnly: true
description: '
What school this requirement belongs to, e.g. `SAS` for the SAS ''Formal Reasoning
Course''
requirement satisfied by CIS-120. Options and meanings:
| "SEAS" | "Engineering" |
| "WH" | "Wharton" |
| "SAS" | "College" |
'
semester:
type: string
readOnly: true
description: '
The semester of the requirement (of the form YYYYx where x is A [for spring],
B [summer],
or C [fall]), e.g. `2019C` for fall 2019. We organize requirements by semester
so that we
don''t get huge related sets which don''t give particularly good info.
'
name:
type: string
readOnly: true
description: '
The name of the requirement, e.g. ''Formal Reasoning Course'', an SAS requirement
satisfied by CIS-120.
'
description: Requirements listed successfully.
tags:
- '[PCx] Pre-NGSS Requirements'
/api/base/attributes/:
get:
operationId: List Attributes
description: '(GET `/api/base/attributes/`)
Retrieve a list of unique attributes (introduced post-NGSS)'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
code:
type: string
readOnly: true
description: '
A registration attribute code, for instance ''WUOM'' for Wharton OIDD Operations
track.
'
school:
enum:
- SAS
- LPS
- SEAS
- DSGN
- GSE
- LAW
- MED
- MODE
- VET
- NUR
- WH
type: string
readOnly: true
nullable: true
description: '
What school/program this attribute belongs to, e.g. `SAS` for `ASOC` restriction
or `WH` for `WUOM` or `MODE` for `QP`. Options and meanings:
| "SAS" | "School of Arts and Sciences" |
| "LPS" | "College
of Liberal and Professional Studies" |
| "SEAS" | "Engineering" |
| "DSGN" | "Design" |
| "GSE" | "Graduate
School of Education" |
| "LAW" | "Law School" |
| "MED" | "School
of Medicine" |
| "MODE" | "Grade Mode" |
| "VET" | "School
of Veterinary Medicine" |
| "NUR" | "Nursing" |
| "WH" | "Wharton" |
'
description:
type: string
readOnly: true
description: '
The registration attribute description, e.g. ''Wharton OIDD Operation''
for the WUOM attribute.
'
description: Attributes listed successfully.
tags:
- '[PCx] Attributes'
/api/base/restrictions/:
get:
operationId: List Ngss Restrictions
description: '(GET `/api/base/restrictions/`)
Retrieve a list of unique restrictions (introduced post-NGSS)'
parameters: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
type: object
properties:
code:
type: string
readOnly: true
description: '
The code of the restriction.
'
restriction_type:
type: string
readOnly: true
description: '
What the restriction is based on (e.g., Campus).
'
inclusive:
type: boolean
readOnly: true
description: '
Whether this is an include or exclude restriction. Corresponds to the `incl_excl_ind`
response field. `True` if include (ie, `incl_excl_ind` is "I") and `False`
if exclude ("E").
'
description:
type: string
readOnly: true
description: '
The registration restriction description.
'
description: Restrictions listed successfully.
tags:
- '[PCx] NGSS Restrictions'
/api/base/statusupdate/{full_code}/:
get:
operationId: List Status Updates
description: '(GET `/api/base/statusupdate/{full_code}/`)
Retrieve all Status Update objects from the current semester for a specific section.'
parameters:
- name: full_code
in: path
required: true
description: The code of the section which this status update applies to, in the form '{dept code}-{course
code}-{section code}', e.g. `CIS-120-001` for the 001 section of CIS-120.
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: object
properties:
section:
type: string
readOnly: true
description: '
The code of the section which this status update applies to, in the form
''{dept code}-{course code}-{section code}'', e.g. `CIS-120-001` for the
001 section of CIS-120.
'
old_status:
enum:
- O
- C
- X
- ''
type: string
readOnly: true
description: 'The old status code (from which the section changed). Options and meanings:
| "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
new_status:
enum:
- O
- C
- X
- ''
type: string
readOnly: true
description: 'The new status code (to which the section changed). Options and meanings:
| "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
created_at:
type: string
format: date-time
readOnly: true
alert_sent:
type: boolean
readOnly: true
description: Was an alert was sent to a User as a result of this status update?
description: Status Updates for section listed successfully.
tags:
- '[PCx] Status Updates'
/api/base/friendship/:
get:
operationId: List Friendships
description: '(GET `/api/base/friendship/`)
Get a list of all friendships and friendship requests (sent and recieved) for the
specified user. Filter the list by status (accepted, sent) to distinguish between
friendships and friendship requests.
User authentication required.'
parameters: []
responses:
'200':
description: Friendships retrieved successfully.
'403':
description: Access denied (missing or improper authentication).
tags:
- '[PCx] Friendship'
post:
operationId: Create Friendship
description: '(POST `/api/base/friendship/`)
Create a friendship between two users (sender and recipient). If a previous request does
not exist between the two friendships, then we create friendship request. If a previous request
exists (where the recipient is the sender) and the recipient of a request hits this route, then
we accept the request.
User authentication required.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
pennkey:
type: string
description: The Pennkey of the user you are sending a friend request to or handling
a request from.
required: true
responses:
'201':
description: Friendship request created successfully.
'403':
description: Access denied (missing or improper authentication).
'200':
description: Friendship request accepted successfully.
'404':
description: Username was None/ Username did not exist.
'409':
description: Friendship request already exists
tags:
- '[PCx] Friendship'
delete:
operationId: Destroy Friendship
description: '(DELETE `/api/base/friendship/`)
Delete a friendship between two users (sender and recipient). If there exists only
a friendship request between two users, then we either delete the friendship request
if the sender hits the route, or we reject the request if the recipient hits this route.
User authentication required.'
parameters:
- name: pennkey
in: query
description: The Pennkey of the user you are ending/rejecting your friendship/friend request with.
schema:
type: string
required: true
responses:
'204':
description: ''
'403':
description: Access denied (missing or improper authentication).
'200':
description: Friendship rejected/deleted/cancelled successfully.
'404':
description: Friendship does not exist or Username does not exist.
'409':
description: Friendship request already rejected.
tags:
- '[PCx] Friendship'
/api/plan/recommendations/:
post:
operationId: Create Course Recommendations
description: '(POST `/api/plan/recommendations/`)
This route will optionally take in current and past courses. In order to
make recommendations solely on the user''s courses in past and current PCP schedules, simply
omit both the curr_courses and past_courses fields in your request.
Otherwise, in order to specify past and current courses,
include a "curr-courses" and/or "past_courses" attribute in the request that should each contain
an array of string course full codes of the form DEPT-XXX (e.g. CIS-120).
If successful, this route will return a list of recommended courses, with the same schema
as the List Courses route, starting with the most relevant course. The number of
recommended courses returned can be specified using the n_recommendations attribute in the
request body, but if this attribute is omitted, the default will be 5.
If n_recommendations is not an integer, or is <=0, a 400 will be returned.
If curr_courses contains repeated courses or invalid courses or non-current courses, a
400 will be returned.
If past_courses contains repeated courses or invalid courses, a 400 will be returned.
If curr_courses and past_courses contain overlapping courses, a 400 will be returned.
User authentication required.'
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
curr_courses:
type: array
description: An array of courses the user is currently planning to take, each specified
by its string full code, of the form DEPT-XXXX, e.g. CIS-1200.
items:
type: string
past_courses:
type: array
description: An array of courses the user has previously taken, each specified by its
string full code, of the form DEPT-XXXX, e.g. CIS-1200.
items:
type: string
n_recommendations:
type: integer
description: The number of course recommendations you want returned. Defaults to 5.
responses:
'403':
description: Access denied (missing or improper authentication).
'200':
description: Response returned successfully.
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
readOnly: true
description: '
The full code of the course, in the form ''{dept code}-{course code}''
dash-joined department and code of the course, e.g. `CIS-120` for CIS-120.'
title:
type: string
readOnly: true
description: '
The title of the course, e.g. ''Programming Languages and Techniques I'' for CIS-120.
'
description:
type: string
readOnly: true
description: '
The description of the course, e.g. ''A fast-paced introduction to the fundamental
concepts
of programming... [etc.]'' for CIS-120.
'
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
num_sections:
type: integer
readOnly: true
description: The number of sections for this course.
course_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average course quality rating for this section, on a scale of 0-4.
instructor_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average instructor quality for this section, on a scale of 0-4.
difficulty:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average difficult rating for this section, on a scale of 0-4.
work_required:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average work required for this section, on a scale of 0-4.
recommendation_score:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: '
The recommendation score for this course if the user is logged in, or null if
the
the user is not logged in.'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
readOnly: true
nullable: true
description: The number of credits this course takes. This is precomputed for efficiency.
'400':
description: Invalid curr_courses, past_courses, or n_recommendations (see response).
tags:
- '[PCP] Course Recommendations'
/api/degree/degreeplans/{id}/copy:
post:
operationId: Copy Degree Plan Detail
description: '(POST `/api/degree/degreeplans/{id}/copy`)
Copy a degree plan.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- name
- degrees
responses:
'201':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: ''
tags:
- '[PDP] Degree Plan Detail'
/api/degree/degreeplans/{id}/degrees:
post:
operationId: Degrees Degree Plan Detail
description: '(POST `/api/degree/degreeplans/{id}/degrees`)
Add or remove degrees from a degree plan.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- name
- degrees
responses:
'201':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
description: ''
tags:
- '[PDP] Degree Plan Detail'
delete:
operationId: Degrees Degree Plan Detail
description: '(DELETE `/api/degree/degreeplans/{id}/degrees`)
Add or remove degrees from a degree plan.'
parameters:
- name: id
in: path
required: true
description: ''
schema:
type: string
responses:
'204':
description: ''
tags:
- '[PDP] Degree Plan Detail'
/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}/override:
post:
operationId: Add Override Fulfillment
description: '(POST `/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}/override`)
Add a manual override that allows a course to count for a rule regardless of whether
it satisfies the rule''s Q filter. Also adds the rule to the fulfillment''s selected
rules if not already present.
POST with `{"rule_id": }`.'
parameters:
- name: degreeplan_pk
in: path
required: true
description: ''
schema:
type: string
- name: full_code
in: path
required: true
description: The dash-joined department and code of the course, e.g., `CIS-120`
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
required:
- degree_plan
- full_code
responses:
'201':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included
in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted
anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
description: ''
tags:
- '[PDP] Fulfillment'
/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}/switch-rule:
post:
operationId: Switch Rule Fulfillment
description: '(POST `/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}/switch-rule`)
Switch a fulfillment''s selected rule to another rule in the same degree.
This promotes the requested rule from `unselected_rules` to `rules`, and
demotes any currently selected rules for that same degree into
`unselected_rules`.
If another course was already fulfilling the target rule, that course is'
parameters:
- name: degreeplan_pk
in: path
required: true
description: ''
schema:
type: string
- name: full_code
in: path
required: true
description: The dash-joined department and code of the course, e.g., `CIS-120`
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
required:
- degree_plan
- full_code
responses:
'201':
content:
application/json:
schema:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included
in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted
anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
description: ''
tags:
- '[PDP] Fulfillment'
/api/degree/onboard-from-transcript/{degree_plan_id}:
post:
operationId: Create Onboard From Transcript
description: '(POST `/api/degree/onboard-from-transcript/{degree_plan_id}`)
Given courses taken and degrees pursuing, determines an optimized assignment
of courses to degree rules and creates relevant Fulfillment objects.'
parameters:
- name: degree_plan_id
in: path
required: true
description: ''
schema:
type: string
requestBody:
content:
application/json:
schema: {}
responses:
'201':
content:
application/json:
schema: {}
description: ''
tags:
- '[PDP] Onboard From Transcript'
/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}/override/{rule_id}:
delete:
operationId: Remove Override Fulfillment
description: '(DELETE `/api/degree/degreeplans/{degreeplan_pk}/fulfillments/{full_code}/override/{rule_id}`)
Remove a manual override, and remove the rule from the fulfillment''s selected
and unselected rules.
DELETE to `override//`.'
parameters:
- name: degreeplan_pk
in: path
required: true
description: ''
schema:
type: string
- name: full_code
in: path
required: true
description: The dash-joined department and code of the course, e.g., `CIS-120`
schema:
type: string
- name: rule_id
in: path
required: true
description: ''
schema:
type: string
responses:
'204':
description: ''
tags:
- '[PDP] Fulfillment'
components:
schemas:
User:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
profile:
type: object
properties:
email:
type: string
format: email
nullable: true
description: The email of the User. Defaults to null.
maxLength: 254
phone:
type: string
nullable: true
description: '
The phone number of the user. Defaults to null.
The phone number will be stored in the E164 format, but any form parseable by the
[phonenumbers library](https://pypi.org/project/phonenumbers/)
will be accepted and converted to E164 format automatically upon saving.
'
maxLength: 100
push_notifications:
type: boolean
description: '
Defaults to False, changed to True if the User enables mobile push notifications
for PCA, rather than text notifications.
'
description: The user profile object, storing collected info about the user.
Schedule:
type: object
properties:
id:
type: integer
description: The id of the schedule.
sections:
type: array
items: []
description: The sections in the schedule.
breaks:
type: array
items: []
description: The breaks in the schedule.
semester:
type: string
description: '
The academic semester planned out by the schedule (of the form YYYYx where x is A
[for spring], B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
maxLength: 5
name:
type: string
description: '
The user''s nick-name for the schedule. No two schedules can match in all of the fields
`[name, semester, person]`
'
maxLength: 255
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- sections
- name
PrimarySchedule:
type: object
properties:
user:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
readOnly: true
description: The user to which the primary schedule belongs.
schedule:
type: object
properties:
id:
type: integer
description: The id of the schedule.
sections:
type: array
items: []
description: The sections in the schedule.
breaks:
type: array
items: []
description: The breaks in the schedule.
semester:
type: string
description: '
The academic semester planned out by the schedule (of the form YYYYx where x is A
[for spring], B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
maxLength: 5
name:
type: string
description: '
The user''s nick-name for the schedule. No two schedules can match in all of the fields
`[name, semester, person]`
'
maxLength: 255
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- sections
- name
readOnly: true
description: The primary schedule.
Break:
type: object
properties:
id:
type: integer
description: The id of the schedule.
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
location_string:
type: string
nullable: true
description: '
This represents the location that the user can input themselves.
Will use a building object from a drop down or have it validated
or something so it can interact with map.
Didn''t want to run into issue of users creating arbitrary
Room objects, so just using a char field
'
maxLength: 80
name:
type: string
description: '
The user''s name for the break. No two breaks can match in all of the fields
`[name, person]`
'
maxLength: 255
checked:
type: boolean
description: '
Whether or not the break has been checked by the user. This is used to
determine if the break should be displayed in the user''s schedule.
'
meeting_times:
type: string
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F for each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can be used.
'
required:
- name
Registration:
type: object
properties:
id:
type: integer
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
description: The dash-separated full code of the section associated with this Registration.
user:
type: string
readOnly: true
description: The Penn Labs Accounts username of the User who owns this Registration.
cancelled:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been cancelled. A cancelled
registration will not trigger any alerts to be sent even if the relevant section opens.
A cancelled section can be resubscribed to (unlike deleted alerts), and will show up
on the manage alerts page on the frontend (also unlike deleted alerts). Note that once
a registration is cancelled, it cannot be uncancelled (resubscribing creates a new
registration which is accessible via the resubscribed_to field, related name of
resubscribed_from).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been deleted. A deleted
registration will not trigger any alerts to be sent even if the relevant section opens.
A deleted section cannot be resubscribed to or undeleted, and will not show up on the
manage alerts page on the frontend. It is kept in the database for analytics purposes,
even though it serves no immediate functional purpose for its original user.
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
readOnly: true
description: '
Defaults to False, in which case a registration will not be automatically resubscribed
after it triggers an alert to be sent (but the user can still resubscribe to a sent alert,
as long as it is not deleted). If set to True, the registration will be automatically
resubscribed to once it triggers an alert to be sent (this is useful in the case of
volatile sections which are opening and closing frequently, often before the user has
time to register).
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea of
Registration objects and resubscribe chains is completely abstracted out of the User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
readOnly: true
description: "Defaults to false. If set to true, the user will receive\n a close notification\
\ (an alert when the section closes after an\n alert was sent for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes to open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
section_status:
type: string
readOnly: true
description: 'The current status of the watched section. Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
DegreePlanList:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- name
DegreePlanDetail:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
description: The user's nickname for the degree plan.
maxLength: 255
degrees:
type: array
items: []
description: The degrees belonging to this degree plan
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- name
- degrees
DegreeList:
type: object
properties:
id:
type: integer
readOnly: true
program:
enum:
- EU_BSE
- EU_BAS
- AU_BA
- WU_BS
- NU_BSN
type: string
description: '
The program code for this degree, e.g., EU_BSE
'
degree:
type: string
description: '
The degree code for this degree, e.g., BSE
'
maxLength: 4
major:
type: string
description: '
The major code for this degree, e.g., BIOL
'
maxLength: 4
major_name:
type: string
nullable: true
description: '
The name of the major for this degree, e.g., Africana Studies
'
maxLength: 128
concentration:
type: string
nullable: true
description: '
The concentration code for this degree, e.g., BMAT
'
maxLength: 4
concentration_name:
type: string
nullable: true
description: '
The name of the concentration for this degree, e.g., African American Studies
'
maxLength: 128
year:
type: integer
maximum: 2147483647
minimum: -2147483648
description: '
The effective year of this degree, e.g., 2023
'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
nullable: true
description: '
The minimum number of CUs required for this degree.
'
rules:
type: array
items:
type: integer
description: '
The rules for this degree. Blank if this degree has no rules.
'
required:
- program
- degree
- major
- concentration
- year
DegreeDetail:
type: object
properties:
id:
type: integer
readOnly: true
rules:
type: array
items: []
readOnly: true
double_count_restrictions:
type: array
items: []
readOnly: true
program:
enum:
- EU_BSE
- EU_BAS
- AU_BA
- WU_BS
- NU_BSN
type: string
description: '
The program code for this degree, e.g., EU_BSE
'
degree:
type: string
description: '
The degree code for this degree, e.g., BSE
'
maxLength: 4
major:
type: string
description: '
The major code for this degree, e.g., BIOL
'
maxLength: 4
major_name:
type: string
nullable: true
description: '
The name of the major for this degree, e.g., Africana Studies
'
maxLength: 128
concentration:
type: string
nullable: true
description: '
The concentration code for this degree, e.g., BMAT
'
maxLength: 4
concentration_name:
type: string
nullable: true
description: '
The name of the concentration for this degree, e.g., African American Studies
'
maxLength: 128
year:
type: integer
maximum: 2147483647
minimum: -2147483648
description: '
The effective year of this degree, e.g., 2023
'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
nullable: true
description: '
The minimum number of CUs required for this degree.
'
required:
- program
- degree
- major
- concentration
- year
DockedCourse:
type: object
properties:
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
id:
type: string
readOnly: true
description: The id of the docked course
attribute_codes:
type: string
readOnly: true
required:
- full_code
Fulfillment:
type: object
properties:
id:
type: integer
readOnly: true
degree_plan:
type: integer
description: The degree plan with which this fulfillment is associated
full_code:
type: string
description: The dash-joined department and code of the course, e.g., `CIS-120`
maxLength: 16
course:
type: string
readOnly: true
semester:
type: string
nullable: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019. Null if this fulfillment
does not yet have a semester.
'
maxLength: 5
rules:
type: array
items:
type: integer
unselected_rules:
type: array
items:
type: integer
description: '
The rules this course fulfills that should be shown in the open-ended rule box
(as opposed to the expandable box). Blank if this course should not be included in
any open-ended rule boxes.
'
legal:
type: boolean
description: '
True if course associated with this fulfillment isn''t illegally double counted anywhere,
false otherwise.
'
overrides:
type: array
items:
type: string
readOnly: true
required:
- degree_plan
- full_code
CourseList:
type: object
properties:
id:
type: string
readOnly: true
description: '
The full code of the course, in the form ''{dept code}-{course code}''
dash-joined department and code of the course, e.g. `CIS-120` for CIS-120.'
title:
type: string
readOnly: true
description: '
The title of the course, e.g. ''Programming Languages and Techniques I'' for CIS-120.
'
description:
type: string
readOnly: true
description: '
The description of the course, e.g. ''A fast-paced introduction to the fundamental concepts
of programming... [etc.]'' for CIS-120.
'
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
num_sections:
type: integer
readOnly: true
description: The number of sections for this course.
course_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average course quality rating for this section, on a scale of 0-4.
instructor_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average instructor quality for this section, on a scale of 0-4.
difficulty:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average difficult rating for this section, on a scale of 0-4.
work_required:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average work required for this section, on a scale of 0-4.
recommendation_score:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: '
The recommendation score for this course if the user is logged in, or null if the
the user is not logged in.'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
readOnly: true
nullable: true
description: The number of credits this course takes. This is precomputed for efficiency.
CourseDetail:
type: object
properties:
id:
type: string
readOnly: true
description: '
The full code of the course, in the form ''{dept code}-{course code}''
dash-joined department and code of the course, e.g. `CIS-120` for CIS-120.'
title:
type: string
readOnly: true
description: '
The title of the course, e.g. ''Programming Languages and Techniques I'' for CIS-120.
'
description:
type: string
readOnly: true
description: '
The description of the course, e.g. ''A fast-paced introduction to the fundamental concepts
of programming... [etc.]'' for CIS-120.
'
syllabus_url:
type: string
readOnly: true
nullable: true
description: '
A URL for the syllabus of the course, if available.
Not available for courses offered in or before spring 2022.
'
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
prerequisites:
type: string
readOnly: true
description: Text describing the prereqs for a course, e.g. 'CIS 120, 160' for CIS-121.
course_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average course quality rating for this section, on a scale of 0-4.
instructor_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average instructor quality for this section, on a scale of 0-4.
difficulty:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average difficult rating for this section, on a scale of 0-4.
work_required:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average work required for this section, on a scale of 0-4.
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
readOnly: true
nullable: true
description: The number of credits this course takes. This is precomputed for efficiency.
crosslistings:
type: array
items:
type: string
readOnly: true
description: '
A list of the full codes (DEPT-###) of all crosslistings for this course
(not including this course).
'
pre_ngss_requirements:
type: array
items: []
readOnly: true
description: '
A list of the pre-NGSS (deprecated since 2022B) academic requirements
this course fulfills.
'
attributes:
type: array
items: []
readOnly: true
description: '
A list of attributes this course has. Attributes are typically
used to mark courses which students in a program/major should
take.
'
restrictions:
type: array
items: []
readOnly: true
description: '
A list of NGSSRestrictions this course has. Restrictions provide information about
who can take a course.
'
sections:
type: array
items: []
readOnly: true
description: A list of the sections of this course.
MiniSection:
type: object
properties:
section_id:
type: string
readOnly: true
description: '
The dash-separated dept, full-code, and section-code, e.g. `CIS-120-001` for the
001 lecture section of CIS-120.
'
status:
enum:
- O
- C
- X
- ''
type: string
readOnly: true
description: 'The registration status of the section. Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
activity:
enum:
- ''
- CLN
- CRT
- DAB
- DIS
- DPC
- FLD
- HYB
- IND
- LAB
- LEC
- MST
- ONL
- PRC
- REC
- SEM
- SRT
- STU
type: string
readOnly: true
description: 'The section activity, e.g. `LEC` for CIS-120-001 (2020A). Options and meanings:
| "" | "Undefined" |
| "CLN" | "Clinic" |
| "CRT" | "Clinical
Rotation" |
| "DAB" | "Dissertation Abroad" |
| "DIS" | "Dissertation" |
| "DPC" | "Doctoral
Program Exchange" |
| "FLD" | "Field Work" |
| "HYB" | "Hybrid" |
| "IND" | "Independent
Study" |
| "LAB" | "Lab" |
| "LEC" | "Lecture" |
| "MST" | "Masters
Thesis" |
| "ONL" | "Online" |
| "PRC" | "Practicum" |
| "REC" | "Recitation" |
| "SEM" | "Seminar" |
| "SRT" | "Senior
Thesis" |
| "STU" | "Studio" |
'
meeting_times:
type: string
readOnly: true
description: '
A JSON-stringified list of meeting times of the form
`{days code} {start time} - {end time}`, e.g.
`["MWF 09:00 AM - 10:00 AM","F 11:00 AM - 12:00 PM","T 05:00 PM - 06:00 PM"]` for
PHYS-151-001 (2020A). Each letter of the days code is of the form M, T, W, R, F for each
day of the work week, respectively (and multiple days are combined with concatenation).
To access the Meeting objects for this section, the related field `meetings` can be used.
'
instructors:
type: array
items: []
readOnly: true
description: A list of the names of the instructors teaching this section.
course_code:
type: string
readOnly: true
description: '
The full code of the course this section belongs to, e.g. `CIS-120` for CIS-120-001.
'
course_title:
type: string
readOnly: true
description: '
The title of the course this section belongs to, e.g.
''Programming Languages and Techniques I'' for CIS-120-001.
'
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
registration_volume:
type: integer
readOnly: true
description: The number of active PCA registrations watching this section.
SectionDetail:
type: object
properties:
id:
type: string
readOnly: true
description: '
The dash-separated dept, full-code, and section-code, e.g. `CIS-120-001` for the
001 lecture section of CIS-120.
'
status:
enum:
- O
- C
- X
- ''
type: string
readOnly: true
description: 'The registration status of the section. Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
activity:
enum:
- ''
- CLN
- CRT
- DAB
- DIS
- DPC
- FLD
- HYB
- IND
- LAB
- LEC
- MST
- ONL
- PRC
- REC
- SEM
- SRT
- STU
type: string
readOnly: true
description: 'The section activity, e.g. `LEC` for CIS-120-001 (2020A). Options and meanings:
| "" | "Undefined" |
| "CLN" | "Clinic" |
| "CRT" | "Clinical
Rotation" |
| "DAB" | "Dissertation Abroad" |
| "DIS" | "Dissertation" |
| "DPC" | "Doctoral
Program Exchange" |
| "FLD" | "Field Work" |
| "HYB" | "Hybrid" |
| "IND" | "Independent
Study" |
| "LAB" | "Lab" |
| "LEC" | "Lecture" |
| "MST" | "Masters
Thesis" |
| "ONL" | "Online" |
| "PRC" | "Practicum" |
| "REC" | "Recitation" |
| "SEM" | "Seminar" |
| "SRT" | "Senior
Thesis" |
| "STU" | "Studio" |
'
credits:
type: number
multipleOf: 0.01
maximum: 100
minimum: -100
readOnly: true
nullable: true
description: The number of credits this section is worth.
capacity:
type: integer
readOnly: true
description: The max allowed enrollment across all crosslistings of this section.
semester:
type: string
readOnly: true
description: '
The semester of the course (of the form YYYYx where x is A [for spring],
B [summer], or C [fall]), e.g. `2019C` for fall 2019.
'
meetings:
type: string
readOnly: true
description: '
A list of the meetings of this section (each meeting is a continuous span of time
during which a section would meet).
'
instructors:
type: array
items: []
readOnly: true
description: A list of the names of the instructors teaching this section.
course_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average course quality rating for this section, on a scale of 0-4.
instructor_quality:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average instructor quality for this section, on a scale of 0-4.
difficulty:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average difficult rating for this section, on a scale of 0-4.
work_required:
type: number
multipleOf: 0.001
maximum: 10
minimum: -10
readOnly: true
description: The average work required for this section, on a scale of 0-4.
associated_sections:
type: array
items: []
readOnly: true
description: '
A list of all sections associated with the Course which this section belongs to; e.g. for
CIS-120-001, all of the lecture and recitation sections for CIS-120 (including CIS-120-001)
in the same semester.
'
registration_volume:
type: integer
readOnly: true
description: The number of active PCA registrations watching this section.
PreNGSSRequirementList:
type: object
properties:
id:
type: string
readOnly: true
description: A string representation of the requirement, in the form '{code}@{school}'
code:
type: string
readOnly: true
description: '
The code identifying this requirement, e.g. `MFR` for ''Formal Reasoning Course'',
an SAS requirement satisfied by CIS-120.
'
school:
enum:
- SEAS
- WH
- SAS
type: string
readOnly: true
description: '
What school this requirement belongs to, e.g. `SAS` for the SAS ''Formal Reasoning Course''
requirement satisfied by CIS-120. Options and meanings:
| "SEAS" | "Engineering" |
| "WH" | "Wharton" |
| "SAS" | "College" |
'
semester:
type: string
readOnly: true
description: '
The semester of the requirement (of the form YYYYx where x is A [for spring], B [summer],
or C [fall]), e.g. `2019C` for fall 2019. We organize requirements by semester so that we
don''t get huge related sets which don''t give particularly good info.
'
name:
type: string
readOnly: true
description: '
The name of the requirement, e.g. ''Formal Reasoning Course'', an SAS requirement
satisfied by CIS-120.
'
AttributeList:
type: object
properties:
code:
type: string
readOnly: true
description: '
A registration attribute code, for instance ''WUOM'' for Wharton OIDD Operations track.
'
school:
enum:
- SAS
- LPS
- SEAS
- DSGN
- GSE
- LAW
- MED
- MODE
- VET
- NUR
- WH
type: string
readOnly: true
nullable: true
description: '
What school/program this attribute belongs to, e.g. `SAS` for `ASOC` restriction
or `WH` for `WUOM` or `MODE` for `QP`. Options and meanings:
| "SAS" | "School of Arts and Sciences" |
| "LPS" | "College
of Liberal and Professional Studies" |
| "SEAS" | "Engineering" |
| "DSGN" | "Design" |
| "GSE" | "Graduate
School of Education" |
| "LAW" | "Law School" |
| "MED" | "School
of Medicine" |
| "MODE" | "Grade Mode" |
| "VET" | "School
of Veterinary Medicine" |
| "NUR" | "Nursing" |
| "WH" | "Wharton" |
'
description:
type: string
readOnly: true
description: '
The registration attribute description, e.g. ''Wharton OIDD Operation''
for the WUOM attribute.
'
NGSSRestrictionList:
type: object
properties:
code:
type: string
readOnly: true
description: '
The code of the restriction.
'
restriction_type:
type: string
readOnly: true
description: '
What the restriction is based on (e.g., Campus).
'
inclusive:
type: boolean
readOnly: true
description: '
Whether this is an include or exclude restriction. Corresponds to the `incl_excl_ind`
response field. `True` if include (ie, `incl_excl_ind` is "I") and `False`
if exclude ("E").
'
description:
type: string
readOnly: true
description: '
The registration restriction description.
'
StatusUpdate:
type: object
properties:
section:
type: string
readOnly: true
description: '
The code of the section which this status update applies to, in the form
''{dept code}-{course code}-{section code}'', e.g. `CIS-120-001` for the
001 section of CIS-120.
'
old_status:
enum:
- O
- C
- X
- ''
type: string
readOnly: true
description: 'The old status code (from which the section changed). Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
new_status:
enum:
- O
- C
- X
- ''
type: string
readOnly: true
description: 'The new status code (to which the section changed). Options and meanings: | "O" | "Open" |
| "C" | "Closed" |
| "X" | "Cancelled" |
| "" | "Unlisted" |
'
created_at:
type: string
format: date-time
readOnly: true
alert_sent:
type: boolean
readOnly: true
description: Was an alert was sent to a User as a result of this status update?
Friendship:
type: object
properties:
sender:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
readOnly: true
description: The user that is sending the request.
recipient:
type: object
properties:
username:
type: string
readOnly: true
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
readOnly: true
description: The user that is recieving the request.
status:
enum:
- S
- A
- R
type: string
sent_at:
type: string
format: date-time
nullable: true
accepted_at:
type: string
format: date-time
nullable: true
RegistrationCreate:
type: object
properties:
id:
type: integer
description: The id of the registration (can optionally be used to customize the id of a new
registration, or to update an existing registration).
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
description: The dash-separated full code of the section associated with this Registration.
maxLength: 16
user:
type: string
readOnly: true
nullable: true
description: '
The User that registered for this alert. This object will be none if registration occurred
before the PCA refresh of Spring 2020 (before the refresh user''s were only identified by
their email and phone numbers, which are legacy fields in this model now). This object
might also be none if registration occurred through a 3rd part API such as Penn Course
Notify (now that Notify has fallen this is an unlikely event).
'
cancelled:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been cancelled. A cancelled
registration will not trigger any alerts to be sent even if the relevant section opens.
A cancelled section can be resubscribed to (unlike deleted alerts), and will show up
on the manage alerts page on the frontend (also unlike deleted alerts). Note that once
a registration is cancelled, it cannot be uncancelled (resubscribing creates a new
registration which is accessible via the resubscribed_to field, related name of
resubscribed_from).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
readOnly: true
description: '
Defaults to False, changed to True if the registration has been deleted. A deleted
registration will not trigger any alerts to be sent even if the relevant section opens.
A deleted section cannot be resubscribed to or undeleted, and will not show up on the
manage alerts page on the frontend. It is kept in the database for analytics purposes,
even though it serves no immediate functional purpose for its original user.
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
description: '
Set this to true to turn on auto resubscribe (causing the registration to automatically
resubscribe once it sends out a notification). Default is false if not specified.
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea of
Registration objects and resubscribe chains is completely abstracted out of the User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
description: "Defaults to false. If set to true, the user will receive\n a close notification\
\ (an alert when the section closes after an\n alert was sent for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes to open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
required:
- section
RegistrationUpdate:
type: object
properties:
id:
type: integer
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was created.
original_created_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
The datetime at which the tail of the resubscribe chain to which this registration belongs
was created. In other words, the datetime at which the user created the original
registration for this section, before resubscribing some number of times
(0 or more) to reach this registration.
'
updated_at:
type: string
format: date-time
readOnly: true
description: The datetime at which this registration was last modified.
section:
type: string
readOnly: true
description: The section that the user registered to be notified about.
user:
type: string
readOnly: true
nullable: true
description: '
The User that registered for this alert. This object will be none if registration occurred
before the PCA refresh of Spring 2020 (before the refresh user''s were only identified by
their email and phone numbers, which are legacy fields in this model now). This object
might also be none if registration occurred through a 3rd part API such as Penn Course
Notify (now that Notify has fallen this is an unlikely event).
'
cancelled:
type: boolean
description: '
Set this to true to cancel to this registration (making it inactive while keeping it
in List Registration).
'
cancelled_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration cancelled? Null if it hasn't been cancelled.
deleted:
type: boolean
description: '
Set this to true to delete this registration (making it inactive and preventing it from
showing up in List Registrations).
'
deleted_at:
type: string
format: date-time
readOnly: true
nullable: true
description: When was the registration deleted? Null if it hasn't been deleted.
auto_resubscribe:
type: boolean
description: '
Set this to true to turn on auto resubscribe (causing the registration to automatically
resubscribe once it sends out a notification).
'
notification_sent:
type: boolean
readOnly: true
description: True if an alert has been sent to the user, false otherwise.
notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was an alert sent to the user as a result of this registration?
Null if an alert was not sent.
'
last_notification_sent_at:
type: string
readOnly: true
description: '
The last time the user was sent an opening notification for this registration''s
section. This property is None (or null in JSON) if no notification has been sent to the
user for this registration''s section.
This is used on the frontend to tell the user a last time an alert was sent for
the SECTION of a certain registration in the manage alerts page. Since the idea of
Registration objects and resubscribe chains is completely abstracted out of the User''s
understanding, they expect alerts to work by section (so the "LAST NOTIFIED"
column should tell them the last time they were alerted about that section).
'
close_notification:
type: boolean
description: "Defaults to false. If set to true, the user will receive\n a close notification\
\ (an alert when the section closes after an\n alert was sent for it opening).\n"
close_notification_sent:
type: boolean
readOnly: true
description: True if a close notification has been sent to the user, false otherwise.
close_notification_sent_at:
type: string
format: date-time
readOnly: true
nullable: true
description: '
When was a close notification sent to the user as a result of this registration?
Null if a close notification was not sent.
'
is_active:
type: string
readOnly: true
description: '
True if the registration would send an alert when the watched section changes to open,
False otherwise. This is equivalent to
[not(notification_sent or deleted or cancelled) and semester is current].
'
is_waiting_for_close:
type: string
readOnly: true
description: '
True if the registration is waiting to send a close notification to the user
once the section closes. False otherwise.
'
resubscribe:
type: boolean
description: '
Set this to true to resubscribe to this registration (only works if the registration
has sent a notification and hasn''t been deleted).
'
tags:
- name: '[PCR] Course Reviews'
description: ''
- name: '[PDP] Docked Course'
description: ''
- name: '[PCA] Registration History'
description: '
These routes expose a user''s registration history (including
inactive and obsolete registrations) for the current semester. Inactive registrations are
registrations which would not trigger a notification to be sent if their section opened,
and obsolete registrations are registrations which are not at the head of their resubscribe
chain.
'
- name: '[PCP] Course Recommendations'
description: ''
- name: '[PCR] Autocomplete Dump'
description: ''
- name: '[PCP] Schedule'
description: '
These routes allow interfacing with the user''s PCP Schedules for the current semester,
stored on the backend. Ever since we integrated Penn Labs Accounts into PCP so that users
can store their schedules across devices and browsers, we have stored users'' schedules on
our backend (rather than local storage).
'
- name: '[PCR] Department Reviews'
description: ''
- name: '[PCR] Section-Specific Reviews'
description: ''
- name: '[PCx] NGSS Restrictions'
description: ''
- name: '[PDP] Degree'
description: ''
- name: '[PCx] Attributes'
description: ''
- name: '[PCR] Plots'
description: ''
- name: '[PCA] Registration'
description: '
As the main API endpoints for PCA, these routes allow interaction with the user''s
PCA registrations. An important concept which is referenced throughout the documentation
for these routes is that of the "resubscribe chain". A resubscribe chain is a chain
of PCA registrations where the tail of the chain was an original registration created
through a POST request to `/api/alert/registrations/` specifying a new section (one that
the user wasn''t already registered to receive alerts for). Each next element in the chain
is a registration created by resubscribing to the previous registration (once that
registration had triggered an alert to be sent), either manually by the user or
automatically if auto_resubscribe was set to true. Then, it follows that the head of the
resubscribe chain is the most relevant Registration for that user/section combo; if any
of the registrations in the chain are active, it would be the head. And if the head
is active, none of the other registrations in the chain are active.
Note that a registration will send an alert when the section it is watching opens, if and
only if it hasn''t sent one before, it isn''t cancelled, and it isn''t deleted. If a
registration would send an alert when the section it is watching opens, we call it
"active". See the Create Registration docs for an explanation of how to create a new
registration, and the Update Registration docs for an explanation of how you can modify
a registration after it is created.
In addition to sending alerts for when a class opens up, we have also implemented
an optionally user-enabled feature called "close notifications".
If a registration has close_notification enabled, it will act normally when the watched
section opens up for the first time (triggering an alert to be sent). However, once the
watched section closes, it will send another alert (the email alert will be in the same
chain as the original alert) to let the user know that the section has closed. Thus,
if a user sees a PCA notification on their phone during a class for instance, they won''t
need to frantically open up their laptop and check PennInTouch to see if the class is still
open just to find that it is already closed. To avoid spam and wasted money, we DO NOT
send any close notifications over text. So the user must have an email saved or use
push notifications in order to be able to enable close notifications on a registration.
Note that the close_notification setting carries over across resubscriptions, but can be
disabled at any time using Update Registration.
After the PCA backend refactor in 2019C/2020A, all PCA Registrations have a `user` field
pointing to the user''s Penn Labs Accounts User object. In other words, we implemented a
user/accounts system for PCA which required that
people log in to use the website. Thus, the contact information used in PCA alerts
is taken from the user''s User Profile. You can edit this contact information using
Update User or Partial Update User. If push_notifications is set to True, then
a push notification will be sent when the user is alerted, but no text notifications will
be sent (as that would be a redundant alert to the user''s phone). Otherwise, an email
or a text alert is sent if and only if contact information for that medium exists in
the user''s profile.
'
- name: '[PCx] Status Updates'
description: ''
- name: '[PCx] Healths'
description: ''
- name: '[PCx] Friendship'
description: ''
- name: '[PCP] Primary Schedule'
description: ''
- name: '[PDP] Onboard From Transcript'
description: ''
- name: '[PCP] Calendar'
description: ''
- name: '[PCx] Course'
description: ''
- name: '[PCP] Break'
description: ''
- name: '[PCR] Instructor Reviews'
description: ''
- name: '[PCx] Section'
description: ''
- name: '[PDP] Fulfillment'
description: ''
- name: '[PCx] Pre-NGSS Requirements'
description: ''
- name: '[PDP] Degree Plan Lists'
description: ''
- name: '[PDP] Satisfied Rule Lists'
description: ''
- name: '[PDP] Degree Plan Detail'
description: ''
- name: '[Accounts] User'
description: '
These routes allow interaction with the User object of a Penn Labs Accounts user.
We do not document `/accounts/...` authentication routes here, as they are described
by the [Authentication](#section/Authentication) section, and the
[Penn Labs Account Engine](https://www.notion.so/pennlabs/The-Accounts-Engine-726ccf8875e244f4b8dbf8a8f2c97a87?pvs=4)
Notion page.
'
x-tagGroups:
- name: Penn Course Plan
tags:
- '[PCP] Course Recommendations'
- '[PCP] Schedule'
- '[PCP] Primary Schedule'
- '[PCP] Calendar'
- '[PCP] Break'
- name: Penn Course Alert
tags:
- '[PCA] Registration History'
- '[PCA] Registration'
- name: Penn Course Review
tags:
- '[PCR] Course Reviews'
- '[PCR] Autocomplete Dump'
- '[PCR] Department Reviews'
- '[PCR] Section-Specific Reviews'
- '[PCR] Plots'
- '[PCR] Instructor Reviews'
- name: Penn Courses (Base)
tags:
- '[PCx] NGSS Restrictions'
- '[PCx] Attributes'
- '[PCx] Status Updates'
- '[PCx] Healths'
- '[PCx] Friendship'
- '[PCx] Course'
- '[PCx] Section'
- '[PCx] Pre-NGSS Requirements'
- name: Penn Labs Accounts
tags:
- '[Accounts] User'
- name: Other
tags:
- '[PDP] Docked Course'
- '[PDP] Degree'
- '[PDP] Onboard From Transcript'
- '[PDP] Fulfillment'
- '[PDP] Degree Plan Lists'
- '[PDP] Satisfied Rule Lists'
- '[PDP] Degree Plan Detail'
servers:
- url: https://penncoursereview.com
description: Penn Course Review
- url: https://penncourseplan.com
description: Penn Course Plan