Migrating from PeterPortal API
Anteater API is our new API for UCI related data, and represents the culmination of years of knowledge we've gained from developing PeterPortal API. Migrate now, before PeterPortal API is sunset.
PeterPortal API will be sunset on Friday, January 31st, 2025, at 11:59 pm Pacific Standard Time. After this time, requests made to either version of PeterPortal API will no longer be served.
Anteater API is the successor to PeterPortal API. The sole upgrade path from either version of PeterPortal API is to Anteater API.
Why?
Over the past few years, we've learned a great deal about the data we work with through developing PeterPortal API. In these past iterations, we have made some assumptions about this data that no longer hold water.
We believe that sunsetting PeterPortal API in favor of Anteater API will allow us to make the data more accessible and correct, in a manner that is efficient and sustainable for many years into the future.
How to Migrate
Please make sure you have read the Attribution Policy in its entirety. By continuing, you represent that you have done so and accept its provisions.
Change the base URL used in your API calls to https://anteaterapi.com/v2/rest (for the REST API) or https://anteaterapi.com/v2/graphql (for the GraphQL API).
Optional, but highly recommended: Request an API key at https://dashboard.anteaterapi.com, and use that API key in all of your API calls. More details can be found here.
Read the section below that corresponds to your current usecase, and apply any modifications to your code.
We are happy to assist developers in the migration process. If you would like assistance, or have any questions regarding the migration, please contact us at icssc@uci.edu.
Please note however that our resources are limited, and as a result we may not be able to respond to all such requests. As an organization founded on the principle of open source, we will prioritize requests based on the project's license terms and usage.
Breaking Changes Since v0
This section applies to you if you are using the base URLs https://api.peterportal.org/rest/v0 (for the REST API) or https://api.peterportal.org/graphql (for the GraphQL API).
All endpoints
- All field names in the response object(s) are now in
camelCase
rather thansnake_case
.
All REST endpoints
- The object returned in a response now contains an
ok
boolean field. Ifok
istrue
, then the data is guaranteed to be in thedata
field. Otherwise, themessage
field contains an error message.
All GraphQL queries
- It is no longer possible to query course offerings directly from a
Course
object. At this time, there is no replacement for this functionality.
Courses (REST)
- The
/courses/all
endpoint is no longer available. It has been replaced by the/courses
endpoint, which is paginated. - The
department_alias
field is no longer available. At this time, there is no replacement for this field. - The
units
field is no longer available. It has been replaced by theminUnits
andmaxUnits
fields, which correspond tounits[0]
andunits[1]
, respectively. - The
professor_history
field is no longer available. The data can still be accessed by taking theid
field of each object in theinstructors
field. - The
prerequisite_tree
field is now an object, rather than a string containing a serialized object. - The
prerequisite_list
andprerequisite_for
fields are no longer available. The data can still be accessed by taking theid
field of each object in theprerequisites
anddependencies
fields, respectively.
Instructors (REST)
- The
/instructors/all
endpoint is no longer available. It has been replaced by the/instructors
endpoint, which is paginated. - The
schools
andrelated_departments
fields are no longer available. At this time, there is no replacement for these fields. - The
shortened_name
field is no longer available. It has been replaced by ashortenedNames
field, which is an array containing each WebSoc name associated with the instructor. - The
course_history
field is no longer available. The data can still be accessed by taking theid
field of each object in thecourses
field.
Grades (REST)
- The path to the endpoint which aggregates the grades is now
/grades/aggregate
instead of/grades/calculated
. - The
year
field/parameter is now a string containing one year number, and thequarter
field/parameter is now a string containing one of the six terms (Fall, Winter, Spring, Summer1, Summer10wk, Summer2). - The
department_name
,section
,title
, andtype
fields are no longer available. At this time, there is no replacement for these fields. - The
instructor
field has been replaced by theinstructors
field, which is an array containing all instructors associated with the section. - The
number
andnumber_int
fields/parameters have been renamed tocourseNumber
andcourseNumeric
respectively. - The
code
field/parameter has been renamed tosectionCode
and is now a string containing the section code.
WebSoc (REST)
- The path to this resource is now
/websoc
instead of/schedule/soc
. - The
term
parameter has been replaced by theyear
andquarter
parameters which together make up the two space-delimited parts of theterm
parameter. For example, if your original query usedterm=2021%20Fall
, you should useyear=2021&quarter=Fall
instead. - The
meetings
andfinalExam
fields now contain additional metadata. See the API Reference for more details.
Breaking Changes Since v1
This section applies to you if you are using the base URLs https://api-next.peterportal.org/v1/rest (for the REST API) or https://api-next.peterportal.org/v1/graphql (for the GraphQL API).
All REST endpoints
- The top-level
statusCode
,timestamp
, andrequestId
fields are no longer available. - The
success
andpayload
fields have been renamed took
anddata
respectively.
Courses
- The
/courses/all
endpoint is no longer available. It has been replaced by the/courses
endpoint, which is paginated. - The
instructorHistory
field is no longer available. The data can still be accessed by taking theid
field of each object in theinstructors
field. - The
shortenedName
field of the Instructor object is no longer available. It has been replaced by ashortenedNames
field, which is an array containing each WebSoc name associated with that instructor. - The
prerequisiteList
andprerequisiteFor
fields are no longer available. The data can still be accessed by taking theid
field of each object in theprerequisites
anddependencies
fields, respectively.
Instructors
- The
/instructors/all
endpoint is no longer available. It has been replaced by the/instructors
endpoint, which is paginated. - The
shortenedName
field is no longer available. It has been replaced by ashortenedNames
field, which is an array containing each WebSoc name associated with the instructor. - The
schools
andrelatedDepartments
fields are no longer available. At this time, there is no replacement for these fields. - The
courseHistory
field is no longer available. It has been consolidated into thecourses
field. Each object in thecourses
field now contains aterms
field, which contains all terms in which the course was or will be taught.
Grades
- If a section has only Pass and/or Not Pass grades, the
averageGPA
field will benull
, rather than0
.
WebSoc
- The
cache
option is no longer available.- Previously, if
cache
was set tofalse
, this endpoint proxied requests directly to the University Registrar's Web Schedule of Classes (WebSoc). - In the interest of preventing WebSoc from getting too many requests, at this time there is no replacement for this functionality. To remedy this, objects at most levels have an
updatedAt
field to indicate when WebSoc was last fetched. - If real-time access to WebSoc data is critical for your application, consider hosting your own proxy and using libwebsoc-next to normalize the data from WebSoc. However, please note that the format returned from this library will not contain some of the metadata returned by Anteater API's WebSoc endpoint.
- Previously, if