Requirements

The FireRoad API provides access to JSON representations of all available major/minor requirements. You can view these requirements and submit modification requests in the Requirements Editor.

Requirements Lists

/requirements/list_reqs (GET)

Returns a dictionary where the keys are list IDs of requirements lists, and the values are metadata dictionaries containing various titles for the corresponding lists.

/requirements/get_json/<list_id> (GET)

Use this endpoint to get a JSON representation of a course requirements list. The list_id should be one of the keys returned by /requirements/list_reqs, or else a bad request error is thrown. The return value of this endpoint is a JSON representation which may contain the following keys:

  • list-id - the requirements list ID
  • short-title - a short title, e.g. "6-7"
  • medium-title - a medium title, e.g. "WGS Minor"
  • title-no-degree - a title without the degree name (e.g. "Computer Science and Engineering")
  • title - the full title (e.g. "Bachelor of Science in Computer Science and Engineering")
  • desc - an optional description of the statement or requirements list
  • req - string requirement, such as "6.009" or "24 units in 8.200-8.299" (if not present, see reqs)
  • plain-string - whether to interpret req as a parseable requirement ("6.009") or as a plain string ("24 units in 8.200-8.299"). Note that plain strings may have (distinct-)threshold keys attached, allowing the user to manually control progress.
  • reqs - a list of nested requirements statements (if not present, see req)
  • connection-type - logical connection type between the reqs (all or any, or none if it is a plain string)
  • threshold - optional dictionary describing the threshold to satisfy this statement. Keys are:
    • type - the type of inequality to apply (LT, GT, LTE, or GTE)
    • cutoff - the numerical cutoff
    • criterion - either subjects or units
  • distinct-threshold - optional dictionary describing the number of distinct child requirements of this statement that must be satisfied. Keys are the same as threshold.
  • threshold-desc - user-facing string describing the thresholds (if applicable)

Requirements Progress

/requirements/progress (GET or POST)

Returns a JSON representation of a course requirements list, including user progresses. There are a few different ways to provide the user's courses and progress overrides to this endpoint:

  1. /requirements/progress/<list_id>/<courses> (GET) courses is a comma-separated list of subject IDs. (Progress overrides cannot be passed using this method. No authorization is necessary.)
  2. /requirements/progress/<list_id>?road=<road_id> (GET) road_id is the integer ID number of the user's road. The user must be logged in or an authorization token must be passed.
  3. /requirements/progress/<list_id> (POST) The request body should contain the JSON representation of the road to evaluate against. (No authorization is necessary.)

The JSON returned by this endpoint contains the following keys in addition to those defined above:

  • fulfilled - boolean indicating whether the requirement is completed
  • progress - the integer progress toward the requirement, in units of criterion
  • max - the maximum possible progress, serving as a denominator for progress
  • percent_fulfilled - the percentage fulfilled
  • sat_courses - a list of courses that satisfies this requirement
  • is_bypassed - if present, a boolean indicating whether this requirement has been bypassed because of a progress assertion on one of its ancestors in the tree
  • assertion - if present, a JSON object representing a progress assertion that was made on this requirement by the input road file. The format is the same as the progress assertion object defined in the road file spec.