Create Assignment
POST https://ed.link/api/v2/graph/classes/:class_id/assignments
Create a new Assignment in the given Class.
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: id, title, description, description_plaintext, state, attachments, due_date, display_date, start_date, end_date, assignee_mode, assignee_ids, section_ids, points_possible, grading_type, submission_types, max_attempts, session_id, category_id, module_id, properties, rubric_id, parent_id.
The following fields are required: title, description, due_date, grading_type.
If you set grading_type to rubric then you must pass the rubric_id of the rubric that you wish to use.
In order to avoid relying on LMS-specific (and inconsistent) defaults, we recommend you always pass state to the value you wish to be dealing with. (i.e. open or draft explicitly)
When creating an assignment with the
assignee_modeofindividuals, 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_modeset 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 Request
axios.post('https://ed.link/api/v2/graph/classes/00000000-0000-0000-0000-000000000000/assignments', {
headers: {
authorization: `Bearer ${integration_access_token}`
},
data: {
category_id: '00000000-0000-0000-0000-000000000000',
assignee_mode: 'all',
grading_type: 'points',
max_attempts: 1,
title: 'Week 12 Homework',
submission_types: ['link'],
state: 'open',
due_date: '2022-01-28T18:00:24.573Z'
}
});
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.
Microsoft Assignments
Microsoft supports the addToCalendarAction property when creating Assignments. To set it, add the following properties to your create request body:
"properties": {
"microsoft": {
"addToCalendarAction": "studentsAndTeamOwners"
}
}
The supported values are listed in Microsoft's documentation, but the following are supported as of this writing:
- none
- studentsAndPublisher
- studentsAndTeamOwners
- unknownFutureValue
- studentsOnly
Canvas Assignments
For Canvas integrations you can set the assignment's position within the module you are creating the assignment for (set by module_id) by adding properties.canvas.module_item.position to the assignment creation payload:
properties: {
canvas: {
module_item: {
position: 2
}
}
}
Canvas also allows defining how assignments of submission_type 'lti' will open, either in a new_tab or in the current tab. You can set this property during creation by passing a boolean to properties.canvas.new_tab. Here is an example POST body demonstrating this. Note, the property defaults to true if not set like this.
{
"title": "Fake example homework",
"description": "This is the description of the assignment",
"due_date": "2027-01-28T18:00:24.573Z",
"grading_type": "points",
"points_possible": 10,
"submission_types": ["lti"],
"properties": {
"canvas": {
"new_tab": false
}
}
}
Canvas requires you to "publish" the Assignment before you can modify student submissions (i.e. submit or grade them).
You can do that by either creating or updating the Assignment with the state property set to open.
ManageBac Assignments
In order for assignment creation to succeed, the following permissions are required in ManageBac:
Classes(read/write)Classes -> students(read)Tasks(read/write)
PowerSchool Assignments
PowerSchool validates the due_date against the specific term or grading period ranges for the class. If the provided due_date falls outside the allowed range, the API will return a 409 error. Please ensure the date is within the active term dates.
Infinite Campus Assignments
For Infinite Campus Grade Passback, assignments must be associated with a specific Grading Task (e.g., 'Online Options Grade'), which is configured at the integration level by Edlink rather than passed in the API request.
Supported Providers
- aeries
- aspen
- blackbaud
- blackboard
- brightspace
- canvas
- classgather
- clever
- facts
- illuminate
- microsoft
- moodle
- oneroster
- powerschool
- schoology
- lti
- skyward
- veracross
- qmlativ
- infinitecampus
- rapididentity
- studio
- sapphire
- genesis
- focus
- renweb
- synergy
- managebac