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
camelCaserather thansnake_case.
All REST endpoints
- The object returned in a response now contains an
okboolean field. Ifokistrue, then the data is guaranteed to be in thedatafield. Otherwise, themessagefield contains an error message.
All GraphQL queries
- It is no longer possible to query course offerings directly from a
Courseobject. At this time, there is no replacement for this functionality.
Courses (REST)
- The
/courses/allendpoint is no longer available. It has been replaced by the/coursesendpoint, which is paginated. - The
department_aliasfield is no longer available. At this time, there is no replacement for this field. - The
unitsfield is no longer available. It has been replaced by theminUnitsandmaxUnitsfields, which correspond tounits[0]andunits[1], respectively. - The
professor_historyfield is no longer available. The data can still be accessed by taking theidfield of each object in theinstructorsfield. - The
prerequisite_treefield is now an object, rather than a string containing a serialized object. - The
prerequisite_listandprerequisite_forfields are no longer available. The data can still be accessed by taking theidfield of each object in theprerequisitesanddependenciesfields, respectively.
Instructors (REST)
- The
/instructors/allendpoint is no longer available. It has been replaced by the/instructorsendpoint, which is paginated. - The
schoolsandrelated_departmentsfields are no longer available. At this time, there is no replacement for these fields. - The
shortened_namefield is no longer available. It has been replaced by ashortenedNamesfield, which is an array containing each WebSoc name associated with the instructor. - The
course_historyfield is no longer available. The data can still be accessed by taking theidfield of each object in thecoursesfield.
Grades (REST)
- The path to the endpoint which aggregates the grades is now
/grades/aggregateinstead of/grades/calculated. - The
yearfield/parameter is now a string containing one year number, and thequarterfield/parameter is now a string containing one of the six terms (Fall, Winter, Spring, Summer1, Summer10wk, Summer2). - The
department_name,section,title, andtypefields are no longer available. At this time, there is no replacement for these fields. - The
instructorfield has been replaced by theinstructorsfield, which is an array containing all instructors associated with the section. - The
numberandnumber_intfields/parameters have been renamed tocourseNumberandcourseNumericrespectively. - The
codefield/parameter has been renamed tosectionCodeand is now a string containing the section code.
WebSoc (REST)
- The path to this resource is now
/websocinstead of/schedule/soc. - The
termparameter has been replaced by theyearandquarterparameters which together make up the two space-delimited parts of thetermparameter. For example, if your original query usedterm=2021%20Fall, you should useyear=2021&quarter=Fallinstead. - The
meetingsandfinalExamfields 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, andrequestIdfields are no longer available. - The
successandpayloadfields have been renamed tookanddatarespectively.
Courses
- The
/courses/allendpoint is no longer available. It has been replaced by the/coursesendpoint, which is paginated. - The
instructorHistoryfield is no longer available. The data can still be accessed by taking theidfield of each object in theinstructorsfield. - The
shortenedNamefield of the Instructor object is no longer available. It has been replaced by ashortenedNamesfield, which is an array containing each WebSoc name associated with that instructor. - The
prerequisiteListandprerequisiteForfields are no longer available. The data can still be accessed by taking theidfield of each object in theprerequisitesanddependenciesfields, respectively.
Instructors
- The
/instructors/allendpoint is no longer available. It has been replaced by the/instructorsendpoint, which is paginated. - The
shortenedNamefield is no longer available. It has been replaced by ashortenedNamesfield, which is an array containing each WebSoc name associated with the instructor. - The
schoolsandrelatedDepartmentsfields are no longer available. At this time, there is no replacement for these fields. - The
courseHistoryfield is no longer available. It has been consolidated into thecoursesfield. Each object in thecoursesfield now contains atermsfield, 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
averageGPAfield will benull, rather than0.
WebSoc
- The
cacheoption is no longer available.- Previously, if
cachewas 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
updatedAtfield 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