For Developers
Submit Submission
POST https://ed.link/api/v2/my/classes/:class\_id/assignments/:assignment\_id/submit
As a student, submit an attempt for your Submission. This will add it to the attempts
array seen when retrieving a submission. It will also update the state
of the submission to submitted
.
Request Parameters
Parameter | Type | Description |
---|---|---|
class_id | string | The UUID of the desired Class. |
assignment_id | string | The UUID of the desired Assignment. |
Request Body
The request body should contain an Attempt object, optionally including one or more attachments. You can see a list of all possible attachment types here.
Sample Request
axios.post(`https://ed.link/api/v2/my/classes/${class_id}/assignments/${assignment_id}/submit`, {
headers: {
authorization: `Bearer ${person_access_token}`
},
data: {
attachments: [
{
type: 'link',
url: 'https://www.example.com/my-submission.html/'
}
]
}
});
Sample Response
The response contains the updated Submission object.
{
"$request": "00000000-0000-0000-0000-000000000000",
"$data": {
"flags": [],
"state": "submitted",
"created_date": "2022-01-27T17:10:09.702Z",
"attempts": [
{
"attachments": [
{
"type": "text",
"text": "This is the body of a text submission."
}
],
"created_date": "2022-01-27T17:10:09.702Z"
},
{
"attachments": [
{
"type": "link",
"url": "https://www.example.com/my-submission.html/"
}
],
"created_date": "2022-01-28T14:11:09.702Z"
}
],
"override_due_date": "2022-01-29T23:59:59.000Z",
"id": "00000000-0000-0000-0000-000000000000",
"person_id": "00000000-0000-0000-0000-000000000000"
}
}