Create assignment
/api/v1/assignments/assignments:createor user sessionCreate a new assignment attached to an activity. The authenticated user must have permission to edit the parent course.
Request bodyapplication/jsonrequired
titlestringrequireddescriptionstringrequireddue_datestring | nullpublishedboolean | nullgrading_typeGradingTypeEnumrequiredALPHABETNUMERICPERCENTAGEPASS_FAILGPA_SCALEauto_gradingboolean | nullanti_copy_pasteboolean | nullshow_correct_answersboolean | nullallow_retriesboolean | nullmax_retriesinteger | nullpass_threshold_percentagenumber | nullungradedboolean | nullsolutionstring | nullsolution_filestring | nullsolution_revealenum | nullWhen the assignment's model answer (the "corrigé") becomes readable by the learner. NEVER - never sent to a student (the default: existing assignments never start handing out a solution on their own). ON_SUBMISSION - unlocked the moment the learner turns their work in. This is the formative-assessment mode: hand in the document, immediately get the worked solution to self-assess against. AFTER_GRADING - unlocked only once the submission is GRADED, i.e. the teacher (or the auto-grader) has finished with it.
NEVERON_SUBMISSIONAFTER_GRADINGorg_idintegerrequiredcourse_idintegerrequiredchapter_idintegerrequiredactivity_idintegerrequiredReturns
AssignmentRead — Assignment created and returned.
titlestringrequireddescriptionstringrequireddue_datestring | nullpublishedboolean | nullgrading_typeGradingTypeEnumrequiredALPHABETNUMERICPERCENTAGEPASS_FAILGPA_SCALEauto_gradingboolean | nullanti_copy_pasteboolean | nullshow_correct_answersboolean | nullallow_retriesboolean | nullmax_retriesinteger | nullpass_threshold_percentagenumber | nullungradedboolean | nullsolutionstring | nullsolution_filestring | nullsolution_revealenum | nullWhen the assignment's model answer (the "corrigé") becomes readable by the learner. NEVER - never sent to a student (the default: existing assignments never start handing out a solution on their own). ON_SUBMISSION - unlocked the moment the learner turns their work in. This is the formative-assessment mode: hand in the document, immediately get the worked solution to self-assess against. AFTER_GRADING - unlocked only once the submission is GRADED, i.e. the teacher (or the auto-grader) has finished with it.
NEVERON_SUBMISSIONAFTER_GRADINGorg_idintegerrequiredcourse_idintegerrequiredchapter_idintegerrequiredactivity_idintegerrequiredidintegerrequiredassignment_uuidstringrequiredcreation_datestring | nullupdate_datestring | nullcourse_uuidstring | nullactivity_uuidstring | nullhas_solutionboolean | nullsolution_unlockedboolean | nullError responses
401Authentication required403User lacks permission to create assignments in this course404Parent activity or course not found422Validation Error —HTTPValidationError
{
"title": "Example title",
"description": "An example description",
"due_date": "string",
"published": false,
"grading_type": "ALPHABET",
"auto_grading": false,
"anti_copy_paste": false,
"show_correct_answers": false,
"allow_retries": false,
"max_retries": 0,
"pass_threshold_percentage": 0,
"ungraded": false,
"solution": "string",
"solution_file": "string",
"solution_reveal": "NEVER",
"org_id": 1,
"course_id": 1,
"chapter_id": 1,
"activity_id": 1,
"id": 1,
"assignment_uuid": "string",
"creation_date": "string",
"update_date": "string",
"course_uuid": "string",
"activity_uuid": "string",
"has_solution": false,
"solution_unlocked": false
}