Submitty Gradeable API
Cameron Peterson
API open source course management PHP testing Submitty

Introduction

Submitty is an open-source course management, assignment submission, and grading system from Rensselaer Polytechnic Institute. This project added two major API extensions: a Gradeable Creation API for instructors, and a Student API for programmatic submission and grade retrieval.

Gradeable Creation API

Submitting ten or more gradeables per week manually was error-prone. Two API endpoints were added:

  • Download: instructors can click a button or call the API to receive a JSON configuration file for any existing gradeable.
  • Upload: instructors can upload a JSON file (downloaded or hand-crafted) to create a new gradeable, through either the UI or the API.

Testing uses GitHub Actions and Cypress for frontend regression testing.

Student API

Submitty’s existing API was instructor-only. This project opened it to students by granting them API key access, locking instructor-only routes appropriately, and adding two student endpoints:

  • Submit a VCS gradeable by gradeable ID.
  • Retrieve score and feedback for a gradeable.

Challenges

A pre-existing bug in the gradeable creation backend was discovered and fixed during development. A DownloadResponse object was also created to replace an ad-hoc pattern of stripping success flags from JSON responses — considered bad practice — with a proper response type.

What’s Next

The Gradeable Creation API covers main and date page fields. The student API could be extended to support file uploads, discussion forum posts, and additional gradeable types.