Create Assignment
POST https://ed.link/api/v2/my/classes/:class_id/assignments
Create a new Assignment in the given Class.
The user must be enrolled as a teacher
, ta
, designer
, administrator
, or district-administrator
in the class to use this endpoint.
Request Parameters
Parameter | Type | Description |
---|---|---|
class_id | string | The UUID of the desired Class. |
Request Body
The request body should contain an Assignment object.
The following fields are allowed: title
, description
, description_plaintext
, attachments
, due_date
, display_date
, start_date
, end_date
, assignee_mode
, assignee_ids
, points_possible
, grading_type
, submission_types
, max_attempts
, session_id
, category_id
.
The following fields are required: title
, description
, due_date
, grading_type
.
When creating an assignment with the
assignee_mode
ofindividuals
, if the assignees are no longer enrolled in the class, Edlink will (by default) return an error. However, in rare cases Edlink can fall out of sync with the class's enrollments. If this happens in Schoology, the assignment will still be created but withassignee_mode
set toall
.
{
"title": "Week 12 Homework",
"description": "This is the description of the assignment",
"due_date": "2022-01-28T18:00:24.573Z",
"grading_type": "points",
"points_possible": 10,
"category_id": "00000000-0000-0000-0000-000000000000" // homework category
}
Sample Response
The response contains the newly created Assignment object.
{
"$data": {
"attachments": [],
"assignee_mode": "all",
"grading_type": "points",
"max_attempts": 1,
"title": "Week 12 Homework",
"submission_types": ["link"],
"state": "open",
"points_possible": 10,
"created_date": "2021-12-23T22:24:39.934Z",
"updated_date": "2022-01-03T20:49:09.233Z",
"due_date": "2022-01-28T18:00:24.573Z",
"id": "00000000-0000-0000-0000-000000000000",
"category_id": "00000000-0000-0000-0000-000000000000"
},
"$request": "00000000-0000-0000-0000-000000000000"
}
Additional Notes
module_id
is a POST
only field. In order to view modules that include this assignment, you must use the Resource endpoint.