Last updated 2020-03-03
Also referred to as assignment_id
, this is a unique name for an assignment within a course. For example, "Assignment 1".
Also referred to as course_id
, this is a unique name for a course. For example, "NBG 101".
The md5 checksum of a feedback file. The feedback file is an HTML document containing a grader's feedback on a notebook file from a submission.
Also referred to as notebook_id
, this is the base name of a .ipynb notebook without the extension. For example, "Problem 1" is the name for the notebook "Problem 1.ipynb".
The ID given to a student. For example, "doe_jane".
true
if the request is successful, false
otherwise. If unsuccessful, the response will only contain the fields "success"
and "message"
. The message field contains the error message, if any.
A timestamp of when a user initiates the assignment submission process. It follows the format "%Y-%m-%d %H:%M:%S.%f %Z"
. For example, "2020-01-30 10:30:47.524219 UTC".
Assignments consist of a directory, notebook files in the root, and optional supplementary files in the root and/or subdirectories. In order to send an entire assignment in one request, a JSON file has a list of maps for each file. The following structure will be referred to as "encoded directory tree."
path
should be in Unix style, and should be relative. For example: a.ipynb
or notes/a.txt
. Pathnames not following this style will be rejected by server with error "Illegal path".
[
{
"path": /* file path relative to the root */,
"content": /* base64 encoded file contents */
},
...
]
Each file and directory tree will be transferred individually.
(TODO)
Adapted from the proposed JupyterHub exchange service.
List all available courses taking or teaching (students+instructors). Used for ExchangeList.
{
"success": true,
"courses":
[
/* course name */,
...
]
}
- Login required
Create a course (anyone logged in). Used for outside Exchange.
{
"success": true
}
- Login required
- Course already exists
list all assignments for a course (students+instructors)
Used for the outbound part of ExchangeList.
{
"success": true,
"assignments":
[
/* assignment name */,
...
]
}
- Login required
- Permission denied
- Course not found
download a copy of an assignment (students+instructors)
If list_only
is true
, files
only contains path
(does not contain content
).
Used for ExchangeFetchAssignment.
list_only=/* true or false */
{
"success": true,
"files": /* encoded directory tree */
}
- Login required
- Permission denied
- Course not found
- Assignment not found
release an assignment (instructors only)
Used for ExchangeReleaseAssignment.
files=/* encoded directory tree in JSON */
{
"success": true
}
- Login required
- Permission denied
- Course not found
- Assignment already exists
- Please supply files
- Illegal path
- Files cannot be JSON decoded
- Content cannot be base64 decoded
list all submissions for an assignment from all students (instructors only)
Used for the inbound part of ExchangeList.
{
"success": true,
"submissions":
[
{
"student_id": /* student ID */,
"timestamp": /* submission timestamp */,
"notebooks":
[
{
"notebook_id": /* name of notebook */,
"feedback_checksum": /* md5 checksum, or "" */
},
...
]
},
...
]
}
- Login required
- Permission denied
- Course not found
- Assignment not found
list all submissions for an assignment from a particular student (instructors+students, though students are restricted to only viewing their own submissions)
{
"success": true,
"submissions":
[
{
"student_id": /* student ID */,
"timestamp": /* submission timestamp */,
"notebooks":
[
{
"notebook_id": /* name of notebook */,
"feedback_checksum": /* md5 checksum, or "" */
},
...
]
},
...
]
}
- Login required
- Permission denied
- Course not found
- Assignment not found
- Student not found
submit a copy of an assignment (students+instructors)
Used for ExchangeSubmit.
files=/* encoded directory tree in JSON */
{
"success": true
}
- Login required
- Permission denied
- Course not found
- Assignment not found
- Please supply files
- Illegal path
- Files cannot be JSON decoded
- Content cannot be base64 decoded
download a student's submitted assignment (instructors only)
If list_only
is true
, files
only contains path
(does not contain content
).
Used for ExchangeCollect.
list_only=/* true or false */
{
"success": true,
"timestamp": /* submission timestamp */,
"files": /* encoded directory tree */
}
- Login required
- Permission denied
- Course not found
- Assignment not found
- Student not found
- Submission not found
upload feedback on a student's assignment (instructors only)
Old feedback on the same submission will be removed
Used for ExchangeReleaseFeedback.
timestamp=/* submission timestamp */&
files=/* encoded directory tree in JSON */
{
"success": true
}
- Login required
- Permission denied
- Course not found
- Assignment not found
- Student not found
- Submission not found
- Please supply timestamp
- Time format incorrect
- Please supply files
- Illegal path
- Files cannot be JSON decoded
- Content cannot be base64 decoded
download feedback on a student's assignment (instructors+students, though students are restricted to only viewing their own feedback)
When feedback is not available, "files"
will be empty.
If list_only
is true
, files
only contains path
(does not contain content
).
Used for ExchangeFetchFeedback.
timestamp=/* submission timestamp */&
list_only=/* true or false */
{
"success": /* true or false*/,
"timestamp": /* submission timestamp */,
"files": /* encoded directory tree */
}
- Login required
- Permission denied
- Course not found
- Assignment not found
- Student not found
- Submission not found
- Please supply timestamp
- Time format incorrect