Skip to content

z[ARCHIVED] API

maxmwang edited this page Nov 13, 2024 · 1 revision

Catalog

Basic information of all courses in our catalog

[GET] /api/catalog/catalog_json/ View all courses we have information for

Parameters

Try it out
Name Description
form
string
(query)

If set to 'long', returns the title of each course as well.

Available values : long

-- long

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
{
  "courses": [
    {
      "id": 2337,
      "course_number": "162",
      "abbreviation": "COMPSCI",
      "title": "Operating Systems and System Programming"
    }
  ]
}
[GET] /api/catalog/catalog_json/course_box/ Find grades_ids for the specified course

Returns general information about the course specified, including the title, description, semesters offered, etc.

Parameters

Try it out
Name Description
course_id *
integer
(query)

The course id of the course that needs to be fetched. Course ids can be found using the catalog/catalog_json endpoint.

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
{
  "course": {
    "units": "4.0",
    "description": "Basic concepts of operating system",
    "title": "Operating Systems and System Programming",
    "prerequisits": "COMPSCI 61B, COMPSCI 61C, and COMPSCI 70.",
    "abbreviation": "COMPSCI",
    "enrolled_percentage": 1,
    "department": "Computer Science",
    "enrolled_max": 400,
    "waitlisted": 0,
    "enrolled": 400,
    "grade_average": 3.18664596273292,
    "course_number": "162",
    "id": 2337,
    "letter_average": "B+"
  },
  "last_enrollment_update": "2020-01-01 00:00:00",
  "requirements": [
    "Computer Science",
    "4 Units",
    "Quantitative Reasoning",
    "Spring 2020"
  ],
  "favorited": false,
  "ongoing": true,
  "cover_photo": "GENERIC",
  "sections": [
    {
      "cnn": "28300",
      "section_number": "001",
      "kind": "Lecture",
      "instructor": "KUBIATOWICZ J",
      "location_name": "Valley Life Sciences 2050",
      "word_days": "TuTh",
      "start_time": "1900-01-01T17:00:00",
      "end_time": "1900-01-01T18:29:00",
      "enrolled": 400,
      "enrolled_max": 400,
      "waitlisted": 0,
      "final_day": "5",
      "final_start": "1900-01-01T11:30:00",
      "final_end": "1900-01-01T14:30:00",
      "id": 289041
    }
  ],
  "ongoing_sections": [
    {
      "cnn": "28300",
      "section_number": "001",
      "kind": "Lecture",
      "instructor": "KUBIATOWICZ J",
      "location_name": "Valley Life Sciences 2050",
      "word_days": "TuTh",
      "start_time": "1900-01-01T17:00:00",
      "end_time": "1900-01-01T18:29:00",
      "enrolled": 400,
      "enrolled_max": 400,
      "waitlisted": 0,
      "final_day": "5",
      "final_start": "1900-01-01T11:30:00",
      "final_end": "1900-01-01T14:30:00",
      "id": 289041
    }
  ]
}

Grades

Access all previous course grades in our database

[GET] /api/grades/grades_json/ View all courses that we have grade information for

Parameters

Try it out
Name Description
form
string
(query)

If set to 'long', returns the title of each course as well.

Available values : long

-- long

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
{
  "courses": [
    {
      "id": 2337,
      "course_number": "162",
      "abbreviation": "COMPSCI",
      "title": "Operating Systems and System Programming"
    }
  ]
}
[GET] /api/grades/course_grades/{course_id}/ Find grades_ids for the specified course

Returns information on which sections of which semesters we have grades data on a course. These sections are uniquely identified by a grades_id field.

Parameters

Try it out
Name Description
course_id *
string
(path)

The course id of the course that needs to be fetched. Course ids can be found using the grades/grades_json endpoint.

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
[
  {
    "semester": "fall",
    "instructor": "CULLER, D",
    "year": "2019",
    "section_number": "1",
    "grade_id": 407490
  }
]
[GET] /api/grades/sections/{grades_id}/ Find grade information of specified courses

Returns grade information on the section identified by grades_id.

Parameters

Try it out
Name Description
grades_id *
integer
(path)

The grades id of the course grades that needs to be fetched. Grade ids can be found using the grades/course_grades endpoint.

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
{
  "title": "COMPSCI 162",
  "subtitle": "Operating Systems and System Programming",
  "course_id": 2337,
  "course_letter": "B+",
  "course_gpa": 3.187,
  "section_letter": "B+",
  "section_gpa": 3.365,
  "denomintor": 464,
  "A+": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "A": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "A-": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "B+": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "B": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "B-": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "C+": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "C": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "C-": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "D": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "F": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "P": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "NP": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  }
}
[GET] /api/grades/sections/{grades_id_1}&{grades_id_2}/ Find grade information of specified courses

Returns aggregated grade information on sections identified by grades_id_2 and grades_id_2, but not limited to just two sections. Section grade IDs are delimited by '&' and must be from the same course.

Parameters

Try it out
Name Description
grades_id_1 *
integer
(path)

The grades id of the course grades that needs to be fetched. Grade ids can be found using the grades/course_grades endpoint.

grades_id_2 *
integer
(path)

The grades id of the course grades that needs to be fetched. Grade ids can be found using the grades/course_grades endpoint.

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
{
  "title": "COMPSCI 162",
  "subtitle": "Operating Systems and System Programming",
  "course_id": 2337,
  "course_letter": "B+",
  "course_gpa": 3.187,
  "section_letter": "B+",
  "section_gpa": 3.365,
  "denomintor": 464,
  "A+": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "A": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "A-": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "B+": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "B": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "B-": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "C+": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "C": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "C-": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "D": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "F": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "P": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  },
  "NP": {
    "numerator": 103,
    "percent": 0.24,
    "percentile_low": 0.72,
    "percentile_high": 0.96
  }
}

Enrollment

Query previous enrollment details

[GET] /api/enrollment/enrollment_json/ View all courses that we have enrollment information for

Parameters

Try it out
Name Description
form
string
(query)

If set to 'long', returns the title of each course as well.

Available values : long

-- long

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
{
  "courses": [
    {
      "id": 2337,
      "course_number": "162",
      "abbreviation": "COMPSCI",
      "title": "Operating Systems and System Programming"
    }
  ]
}
[GET] /api/enrollment/sections/{course_id}/ Find all semesters this course was offered.

Parameters

Try it out
Name Description
course_id *
string
(path)

The course id of the course enrollment that needs to be fetched. Course ids can be found using the enrollment/enrollment_json endpoint.

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
[
  {
    "semester": "fall",
    "year": "2019",
    "sections": [
      {
        "instructor": "CULLER D",
        "section_number": "001",
        "section_id": 222612
      }
    ]
  }
]
[GET] /api/enrollment/aggregate/{course_id}/{semester}/{year}/ Find enrollment for a specific offering.

Parameters

Try it out
Name Description
course_id *
string
(path)

The course id of the course enrollment that needs to be fetched. Course ids can be found using the enrollment/enrollment_json endpoint.

semester *
string
(path)

Specifies which semester to query the enrollment information from (ex: fall).

year *
string
(path)

Specifies which year to query the enrollment information from (ex: 2020).

Responses

Response content type
application/json
Code Description
200

successful operation

  • Example Value
  • Model
{
  "course_id": 2337,
  "title": "COMPSCI 162",
  "subtitle": "Operating Systems and System Programming",
  "section_id": "all",
  "section_name": "All Sections",
  "enrolled_max": 300,
  "enrolled_scale_max": 545,
  "enrolled_percent_max": 1.8183000000000002,
  "waitlisted_max": 300,
  "waitlisted_scale_max": 330,
  "waitlisted_percent_max": 1.1,
  "data": [
    {
      "date": "10/13/2019-00:00:00",
      "day": 182,
      "enrolled": 487,
      "enrolled_max": 300,
      "enrolled_percent": 1.623,
      "waitlisted": 0,
      "waitlisted_max": 92,
      "waitlisted_percent": 0
    }
  ],
  "telebears": {
    "semester": "Fall 2019",
    "phase1_start_date": "10/16/2017-00:00:00",
    "phase1_start_day": 1,
    "phase1_end_date": 68,
    "phase2_start_date": "10/16/2017-00:00:00",
    "phase2_start_day": 106,
    "phase2_end_date": 126,
    "adj_start_date": "10/16/2017-00:00:00",
    "adj_start_day": 127
  }
}

Models

course_json
course_json{
courses [course_short{
id integer
example: 2337
course_number string
example: 162
abbreviation string
example: COMPSCI
title string
example: Operating Systems and System Programming
}
]
}
course_box
course_box{
course /assets/swagger.yaml#/definitions/coursecourse{
units string
example: 4.0
description string
example: Basic concepts of operating system
title string
example: Operating Systems and System Programming
prerequisits string
example: COMPSCI 61B, COMPSCI 61C, and COMPSCI 70.
abbreviation string
example: COMPSCI
enrolled_percentage number($float)
example: 1
department string
example: Computer Science
enrolled_max integer
example: 400
waitlisted integer
example: 0
enrolled integer
example: 400
grade_average number($float)
example: 3.18664596273292
course_number string
example: 162
id integer
example: 2337
letter_average string
example: B+
}
last_enrollment_update string
example: 2020-01-01 00:00:00
requirements [
example: List [ "Computer Science", "4 Units", "Quantitative Reasoning", "Spring 2020" ]
string]
favorited boolean
default: false
ongoing boolean
default: true
cover_photo string
example: GENERIC
sections [/assets/swagger.yaml#/definitions/sectionsection{
cnn string
example: 28300
section_number string
example: 001
kind string
example: Lecture
instructor string
example: KUBIATOWICZ J
location_name string
example: Valley Life Sciences 2050
word_days string
example: TuTh
start_time string
example: 1900-01-01T17:00:00
end_time string
example: 1900-01-01T18:29:00
enrolled integer
example: 400
enrolled_max integer
example: 400
waitlisted integer
example: 0
final_day string
example: 5
final_start string
example: 1900-01-01T11:30:00
final_end string
example: 1900-01-01T14:30:00
id integer
example: 289041
}
]
ongoing_sections [/assets/swagger.yaml#/definitions/sectionsection{
cnn string
example: 28300
section_number string
example: 001
kind string
example: Lecture
instructor string
example: KUBIATOWICZ J
location_name string
example: Valley Life Sciences 2050
word_days string
example: TuTh
start_time string
example: 1900-01-01T17:00:00
end_time string
example: 1900-01-01T18:29:00
enrolled integer
example: 400
enrolled_max integer
example: 400
waitlisted integer
example: 0
final_day string
example: 5
final_start string
example: 1900-01-01T11:30:00
final_end string
example: 1900-01-01T14:30:00
id integer
example: 289041
}
]
}
course_grades
course_grades[/assets/swagger.yaml#/definitions/section_gradescourse_grades{
semester string
example: fall
instructor string
example: CULLER, D
year string
example: 2019
section_number string
example: 1
grade_id integer
example: 407490
}
]
course_enrollment
course_enrollment{
course_id integer
example: 2337
title string
example: COMPSCI 162
subtitle string
example: Operating Systems and System Programming
section_id string
example: all
section_name string
example: All Sections
enrolled_max integer
example: 300
enrolled_scale_max integer
example: 545
enrolled_percent_max number($float)
example: 1.8183000000000002
waitlisted_max integer
example: 300
waitlisted_scale_max integer
example: 330
waitlisted_percent_max number($float)
example: 1.1
data [/assets/swagger.yaml#/definitions/enrollment_dataenrollment_data{
date string
example: 10/13/2019-00:00:00
day integer
example: 182
enrolled integer
example: 487
enrolled_max integer
example: 300
enrolled_percent number($float)
example: 1.623
waitlisted integer
example: 0
waitlisted_max integer
example: 92
waitlisted_percent number($float)
example: 0
}
]
telebears /assets/swagger.yaml#/definitions/enrollment_telebearsenrollment_telebears{
semester string
example: Fall 2019
phase1_start_date string
example: 10/16/2017-00:00:00
phase1_start_day integer
example: 1
phase1_end_date integer
example: 68
phase2_start_date string
example: 10/16/2017-00:00:00
phase2_start_day integer
example: 106
phase2_end_date integer
example: 126
adj_start_date string
example: 10/16/2017-00:00:00
adj_start_day integer
example: 127
}
}
course
course{
units string
example: 4.0
description string
example: Basic concepts of operating system
title string
example: Operating Systems and System Programming
prerequisits string
example: COMPSCI 61B, COMPSCI 61C, and COMPSCI 70.
abbreviation string
example: COMPSCI
enrolled_percentage number($float)
example: 1
department string
example: Computer Science
enrolled_max integer
example: 400
waitlisted integer
example: 0
enrolled integer
example: 400
grade_average number($float)
example: 3.18664596273292
course_number string
example: 162
id integer
example: 2337
letter_average string
example: B+
}
course_short
course_short{
id integer
example: 2337
course_number string
example: 162
abbreviation string
example: COMPSCI
title string
example: Operating Systems and System Programming
}
section
course_short{
id integer
example: 2337
course_number string
example: 162
abbreviation string
example: COMPSCI
title string
example: Operating Systems and System Programming
}
section_grades
section_grades{
semester string
example: fall
instructor string
example: CULLER, D
year string
example: 2019
section_number string
example: 1
grade_id integer
example: 407490
}
grade_data
grade_data{
title string
example: COMPSCI 162
subtitle string
example: Operating Systems and System Programming
course_id integer
example: 2337
course_letter string
example: B+
course_gpa number($float)
example: 3.187
section_letter string
example: B+
section_gpa number($float)
example: 3.365
denomintor integer
example: 464
A+ /assets/swagger.yaml#/definitions/grade_bingrade_bin{
numerator integer
example: 103
percent number($float)
example: 0.24
percentile_low number($float)
example: 0.72
percentile_high number($float)
example: 0.96
}
A /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
A- /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
B+ /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
B /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
B- /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
C+ /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
C /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
C- /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
D /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
F /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
P /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
NP /assets/swagger.yaml#/definitions/grade_bingrade_bin{...}
}
grade_bin
grade_bin{
numerator integer
example: 103
percent number($float)
example: 0.24
percentile_low number($float)
example: 0.72
percentile_high number($float)
example: 0.96
}
enrollment_sections
enrollment_sections[/assets/swagger.yaml#/definitions/enrollment_semesterenrollment_sections{
semester string
example: fall
year string
example: 2019
sections [/assets/swagger.yaml#/definitions/enrollment_shortenrollment_short{
instructor string
example: CULLER D
section_number string
example: 001
section_id integer
example: 222612
}
]
}
]
enrollment_semester
enrollment_semester{
semester string
example: fall
year string
example: 2019
sections [/assets/swagger.yaml#/definitions/enrollment_shortenrollment_short{
instructor string
example: CULLER D
section_number string
example: 001
section_id integer
example: 222612
}
]
}
enrollment_short
enrollment_short{
instructor string
example: CULLER D
section_number string
example: 001
section_id integer
example: 222612
}
enrollment_data
enrollment_data{
date string
example: 10/13/2019-00:00:00
day integer
example: 182
enrolled integer
example: 487
enrolled_max integer
example: 300
enrolled_percent number($float)
example: 1.623
waitlisted integer
example: 0
waitlisted_max integer
example: 92
waitlisted_percent number($float)
example: 0
}
enrollment_telebears
enrollment_telebears{
semester string
example: Fall 2019
phase1_start_date string
example: 10/16/2017-00:00:00
phase1_start_day integer
example: 1
phase1_end_date integer
example: 68
phase2_start_date string
example: 10/16/2017-00:00:00
phase2_start_day integer
example: 106
phase2_end_date integer
example: 126
adj_start_date string
example: 10/16/2017-00:00:00
adj_start_day integer
example: 127
}