jupyter / nbgrader

A system for assigning and grading notebooks
https://nbgrader.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.28k stars 317 forks source link

where can I find complete list of formgrader API urls #1685

Closed adarshverma19 closed 7 months ago

adarshverma19 commented 1 year ago

I am integrating nbgrader into my LMS. In my LMS backend, I am using formgrader URLs like

  1. formgrader/api/assignment/{assignment_name}/generate_feedback"
  2. formgrader/api/assignment/{assignment_name}/release_feedback"
  3. formgrader/api/assignments

to fetch details and perform some actions directly from my LMS frontend.

These are URLs that I found out myself by using chrome debugger tools I need one for auto-grading all assignments. I only found the one that auto grades for a single student, like so

Where can I find the entire list of formgrader endpoints(URLs) and their documentation?

brichet commented 1 year ago

Hey @adarshverma19, I don't think the endpoints are documented yet. You can find all the URLs in the directory containing the server extensions, in the handlers.py files.

Assignment list handlers https://github.com/jupyter/nbgrader/blob/066e793fb973b8ed03ea222a28c81950361edc94/nbgrader/server_extensions/assignment_list/handlers.py#L366-L371

Course list handlers https://github.com/jupyter/nbgrader/blob/066e793fb973b8ed03ea222a28c81950361edc94/nbgrader/server_extensions/course_list/handlers.py#L224-L226

Formgrader API handlers - this is where you should find the one you are looking for if it exists https://github.com/jupyter/nbgrader/blob/066e793fb973b8ed03ea222a28c81950361edc94/nbgrader/server_extensions/formgrader/apihandlers.py#L314-L348

Formgrader handlers https://github.com/jupyter/nbgrader/blob/066e793fb973b8ed03ea222a28c81950361edc94/nbgrader/server_extensions/formgrader/handlers.py#L286-L305

validate assignment handlers https://github.com/jupyter/nbgrader/blob/066e793fb973b8ed03ea222a28c81950361edc94/nbgrader/server_extensions/validate_assignment/handlers.py#L130-L133

When a URL matches a regular expression (first parameter of handlers), the corresponding object is instantiated (to return web content or JSON data).

It would be wonderful to improve the documentation by documenting the endpoints, if you have it after your research.

brichet commented 7 months ago

Closing as answered