For Developers

Create Task

POST https://ed.link/api/v2/graph/jobs/:job_id/tasks

Create a Task.

Request Parameters

ParameterTypeDescription
job_idstringThe UUID of the desired Job.

Request Body

The request body should contain an array of tasks. Please note, a previous version of this document incorrectly stated that the task body should contain property called type. This is incorrect. The correct property is entity_type. In order to remain backwards compatible, the type property will still be accepted, but it is recommended to use entity_type instead. If you use type, Edlink will correct it to entity_type and issue a warning.

[
    {
        "entity_type": "assignment",
        "event_type": "created",
        "data": {
            "class_id": "00000000-0000-0000-0000-000000000000",
            "title": "Grade 1 Numbers to 20 Workbook",
            "due_date": "2022-10-17T17:30:00.000Z",
            "description": "Test assignment",
            "display_date": "",
            "grading_type": "points",
            "points_possible": 107,
            "submission_types": "text"
        }
    }
]

Sample Request

axios.post('https://ed.link/api/v2/graph/jobs/00000000-0000-0000-0000-000000000000/tasks', {
    headers: {
        authorization: `Bearer ${integration_access_token}`
    },
    data: [
        {
            entity_type: 'assignment',
            event_type: 'created',
            data: {
                class_id: '00000000-0000-0000-0000-000000000000',
                title: 'Grade 1 Numbers to 20 Workbook',
                due_date: '2022-10-17T17:30:00.000Z',
                description: 'Test assignment',
                display_date: '',
                grading_type: 'points',
                points_possible: 107,
                submission_types: 'text'
            }
        }
    ]
});

Sample Response

The response contains the created array of Tasks.

{
    "$request": "00000000-0000-0000-0000-000000000000",
    "$data": [
        {
            "id": "00000000-0000-0000-0000-000000000000",
            "created_date": "2022-10-24T18:52:00.000Z",
            "updated_date": "2022-10-24T18:52:00.000Z",
            "entity_type": "assignment",
            "event_type": "created",
            "state": "queued",
            "attempts": 0,
            "properties": {},
            "job_id": "00000000-0000-0000-0000-000000000000",
            "integration_id": "00000000-0000-0000-0000-000000000000",
            "data": {
                "assignee_mode": "all",
                "grading_type": "points",
                "class_id": "00000000-0000-0000-0000-000000000000",
                "title": "Grade 1 Numbers to 20 Workbook",
                "description": "Test assignment",
                "state": "open",
                "due_date": "2022-10-17T17:30:00.000Z",
                "points_possible": 107,
                "submission_types": "text"
            }
        }
    ]
}