Assignments
List Assignments By Course
GET https://ed.link/api/v1/my/courses/:course\_id/assignments
This endpoint retrieves a list of assignments that are visible to the authenticated user in the course specified.
Request Parameters
Parameter | Type | Description |
---|---|---|
course_id | URL Parameter | The UUID for the course from which you want to retrieve assignments. |
This request also allows for the modified paging parameters.
Response Data
This endpoint returns an array of assignment objects.
Sample Request
axios.get('https://ed.link/api/v1/my/courses/8ab9c040-d458-4746-9bea-99f4b5066f17/assignments', {
headers: {
Authorization: `Bearer ${user_access_token}`
}
});
Fetch a Single Assignment
GET https://ed.link/api/v1/my/courses/:course\_id/assignments/:assignment\_id
This endpoint retrieves a single assignment from the specified course, if it is visible to the authenticated user.
Request Parameters
Parameter | Type | Description |
---|---|---|
course_id | URL Parameter | The UUID for the course from which you want to retrieve assignments. |
assignment_id | URL Parameter | The ID of the assignment that you want to retrieve. This parameter is not necessarily a UUID and may vary by the platform. However, we can guarantee that it will be a string and it will be shorter than 64 bytes. We also cannot guarantee that this ID will be globally unique, as it is not generated by Edlink. |
Response Data
This endpoint returns an Assignment
object.
Sample Request
axios.get('https://ed.link/api/v1/my/courses/8ab9c040-d458-4746-9bea-99f4b5066f17/assignments/74de393e-a5bc-43ee-b431-7826dfc59300', {
headers: {
Authorization: `Bearer ${user_access_token}`
}
});
Create an Assignment
POST https://ed.link/api/v1/my/courses/:course\_id/assignments
This endpoint retrieves a single assignment from the specified course, if it is visible to the authenticated user.
Request Parameters
Parameter | Type | Description |
---|---|---|
course_id | URL Parameter | The UUID for the course in which the assignment will be created. |
Request Body
An Assignment
object is expected in the request body. Please note, the description
property accepts an HTML string. Not all valid HTML tags will be available in all source systems. In addition, we recommend that the Assignment
object you send contains the following fields:
Parameter | Type | Description |
---|---|---|
description_plaintext | String | An optional plaintext representation of the description field for systems that do not support HTML descriptions. |
Response Data
This endpoint returns the newly created Assignment
object.
Sample Request
axios.post(
'https://ed.link/api/v1/my/courses/8ab9c040-d458-4746-9bea-99f4b5066f17/assignments',
{
title: 'Assignment Title',
description: '<div>HTML Description</div>',
description_plaintext: 'Plaintext description',
points_possible: 10,
grading_type: 'points'
},
{
headers: {
Authorization: `Bearer ${user_access_token}`
}
}
);
Update an Assignment
PUT https://ed.link/api/v1/my/courses/:course\_id/assignments/:assignment\_id
This endpoint retrieves a single assignment from the specified course, if it is visible to the authenticated user.
Due to a limitation in the Google Classroom API, it is not possible to update attachments for Google Classroom assignments.
Request Parameters
Parameter | Type | Description |
---|---|---|
course_id | URL Parameter | The UUID for the course from which you want to retrieve assignments. |
assignment_id | URL Parameter | The ID of the assignment that you want to update. |
Request Body
An Assignment
object is expected in the request body. Please note, the description
property accepts an HTML string. Not all valid HTML tags will be available in all source systems. In addition, we recommend that the Assignment
object you send contains the following fields:
Parameter | Type | Description |
---|---|---|
description_plaintext | String | An optional plaintext representation of the description field for systems that do not support HTML descriptions. |
Response Data
This endpoint returns the updated Assignment
object.
Sample Request
axios.get(
'https://ed.link/api/v1/my/courses/8ab9c040-d458-4746-9bea-99f4b5066f17/assignments/74de393e-a5bc-43ee-b431-7826dfc59300',
{
title: 'Assignment Title',
description: '<div>HTML Description</div>',
description_plaintext: 'Plaintext description',
points_possible: 10,
grading_type: 'points'
},
{
headers: {
Authorization: `Bearer ${user_access_token}`
}
}
);
Delete an Assignment
DELETE https://ed.link/api/v1/my/courses/:course\_id/assignments/:assignment\_id
This endpoint deletes the specified assignment and may only be called by a teacher
, ta
, or administrator
in the relevant course.
Request Parameters
Parameter | Type | Description |
---|---|---|
course_id | URL Parameter | The UUID for the course from which you want to retrieve assignments. |
assignment_id | URL Parameter | The ID of the assignment that you want to delete. |
Response Data
This endpoint returns 204 No Content
if the assignment was successfully deleted.
Sample Request
axios.delete('https://ed.link/api/v1/my/courses/8ab9c040-d458-4746-9bea-99f4b5066f17/assignments/74de393e-a5bc-43ee-b431-7826dfc59300', {
headers: {
Authorization: `Bearer ${user_access_token}`
}
});