action flat_create_assignment { label: "Assignment creation" description: "Use this method as a teacher to create and post a new assignment to a class.\n\nIf the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course.\n" provider: flat method: POST path: "/classes/{class}/assignments" encoding: json input: { type: "object" description: "Assignment creation details" properties: { assignedStudents: { type: "array" description: "Identifiers for the students that have access to the assignment" items: { type: "string" } } assigneeMode: { type: "string" description: "Possible modes of assigning assignments" enum: ["everyone", "selected"] } attachments: { type: "array" items: { type: "object" description: "Attachment creation for an assignment or stream post.\nThis attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created.\n" properties: { googleDriveFileId: { type: "string" description: "The ID of the Google Drive File" } lockScoreTemplate: { type: "boolean" description: "To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template." } score: { type: "string" description: "A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the\nteachers and students of the class.\n" } sharingMode: { type: "string" description: "The sharing mode of the score for classes post and assignments" enum: ["read", "write", "copy", "performance"] } type: { type: "string" description: "The type of the attachment posted" enum: ["flat", "link", "googleDrive", "worksheet"] } url: { type: "string" description: "The URL of the attachment." } worksheet: { type: "string" description: "An unique worksheet identifier" } } } } cover: { type: "string" description: "The URL of the cover to display" } coverFile: { type: "string" description: "The id of the cover to display" } description: { type: "string" description: "Description and content of the assignment" } dueDate: { type: "string" format: "date-time" description: "The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date.\n" } googleClassroom: { type: "object" description: "Google Classroom options for this assignment" properties: { topicId: { type: "string" description: "Identifier of the topic where the assignment is created" } } } maxPoints: { type: "number" description: "If set, the grading will be enabled for the assignement with this value as the maximum of points\n" } microsoftGraph: { type: "object" description: "Microsoft Graph options for this assignment" properties: { categories: { type: "array" description: "List of categories this assignment belongs to" items: { type: "string" } } } } nbPlaybackAuthorized: { type: "number" description: "The number of playback authorized on the scores of the assignment." } scheduledDate: { type: "string" format: "date-time" description: "The publication (scheduled) date of the assignment.\nIf this one is specified, the assignment will only be listed to the teachers of the class.\n" } state: { type: "string" description: "State of the assignment" enum: ["draft", "active"] } title: { type: "string" description: "Title of the assignment" } toolset: { type: "string" description: "The id of the associated toolset" } type: { type: "string" description: "Type of the assignment" enum: ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance"] } } } output: { type: "object" description: "Assignment details" properties: { attachments: { type: "array" items: { type: "object" description: "Media attachment. The API will automatically resolve the details, oEmbed,\nand media available if possible and return them in this object\n" properties: { authorName: { type: "string" description: "The resolved author name of the attachment" } authorUrl: { type: "string" description: "The resolved author url of the attachment" } description: { type: "string" description: "The resolved description of the attachment" } googleDriveFileId: { type: "string" description: "The ID of the Google Drive File" } html: { type: "string" description: "If the attachment type is `rich` or `video`, the HTML code of the\nmedia to display\n" } htmlHeight: { type: "string" description: "If the `html` is available, the height of the widget" } htmlWidth: { type: "string" description: "If the `html` is available, the width of the widget" } iconUrl: { type: "string" description: "The URL of the icon" } lockScoreTemplate: { type: "boolean" description: "To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template." } mimeType: { type: "string" description: "The mine type of the file" } revision: { type: "string" description: "An unique revision identifier of a score" } score: { type: "string" description: "An unique Flat score identifier" } sharingMode: { type: "string" description: "The sharing mode of the score for classes post and assignments" enum: ["read", "write", "copy", "performance"] } thumbnailHeight: { type: "integer" description: "If the `thumbnailUrl` is available, the width of the thumbnail\n" } thumbnailUrl: { type: "string" description: "If the attachment type is `rich`, `video`, `photo` or `link`, a\ndisplayable thumbnail for this attachment\n" } thumbnailWidth: { type: "integer" description: "If the `thumbnailUrl` is available, the width of the thumbnail\n" } title: { type: "string" description: "The resolved title of the attachment" } track: { type: "string" description: "A unique track identifier" } type: { type: "string" description: "The type of the assignment resolved:\n* `rich`, `photo`, `video` are attachment types that are automatically resolved from a `link` attachment.\n* A `flat` attachment is a score document where the unique identifier will be specified in the `score` property. Its sharing mode will be provided in the `sharingMode` property.\n" enum: ["rich", "photo", "video", "link", "flat", "googleDrive", "worksheet", "performance"] } url: { type: "string" description: "The url of the attachment" } worksheet: { type: "string" description: "An unique worksheet identifier" } } } } canvas: { type: "object" description: "A Canvas LMS assignment" properties: { alternateLink: { type: "string" description: "Link to Canvas assignment" } id: { type: "string" description: "Unique identifier of the course on Canvas assignment" } } } classroom: { type: "string" description: "The unique identifier of the class where this assignment was posted" } cover: { type: "string" description: "The URL of the cover to display" } coverFile: { type: "string" description: "The id of the cover to display" } creationDate: { type: "string" format: "date-time" description: "The creation date of this assignment" } creator: { type: "string" description: "The User unique identifier of the creator of this assignment\n" } description: { type: "string" description: "Description and content of the assignment" } dueDate: { type: "string" format: "date-time" description: "The due date of this assignment, late submissions will be marked as\npaste due.\n" } googleClassroom: { type: "object" description: "A coursework on Google Classroom" properties: { alternateLink: { type: "string" description: "Absolute link to this coursework in the Classroom web UI" } id: { type: "string" description: "Identifier of the coursework assigned by Classroom" } state: { type: "string" description: "State of the coursework" } topicId: { type: "string" description: "Identifier of the topic where the assignment is created" } } } lti: { type: "object" description: "An LTI assignment" properties: { id: { type: "string" description: "Resource ID in the LMS" } } } maxPoints: { type: "number" description: "If set, the grading will be enabled for the assignement\n" } mfc: { type: "object" description: "A MusicFirst Classroom assignment" properties: { alternateLink: { type: "string" description: "Link to MusicFirst Classroom task" } id: { type: "string" description: "Unique identifier of the course on MusicFirst Task" } } } microsoftGraph: { type: "object" description: "A Microsoft Teams asignment" properties: { alternateLink: { type: "string" description: "Absolute link to this assignement in the Microsoft Teams web UI" } categories: { type: "array" description: "List of categories where this assignment is published under" items: { type: "string" description: "A Microsoft Teams assignment category ID" } } id: { type: "string" description: "Identifier of the assignement assigned by Microsoft Teams" } state: { type: "string" description: "State of the assignment" } } } scheduledDate: { type: "string" format: "date-time" description: "The publication (scheduled) date of the assignment.\nIf this one is specified, the assignment will only be listed to the teachers of the class.\n" } state: { type: "string" description: "State of the assignment" enum: ["draft", "active", "archived"] } submissions: { type: "array" items: { type: "object" description: "Assignment Submission" properties: { assignment: { type: "string" description: "Unique identifier of the assignment" } attachments: { type: "array" items: { type: "object" additionalProperties: true } } classroom: { type: "string" description: "Unique identifier of the classroom where the assignment was posted\n" } creationDate: { type: "string" description: "The date when the submission was created" } creator: { type: "string" description: "The User identifier of the student who created the submission" } draftGrade: { type: "number" description: "Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission" } googleClassroom: { type: "object" description: "A coursework submission on Google Classroom" properties: { alternateLink: { type: "string" description: "Absolute link to this coursework in the Classroom web UI" } id: { type: "string" description: "Identifier of the coursework submission assigned by Classroom" } state: { type: "string" description: "State of the submission on Google Classroom" } } } grade: { type: "number" description: "Optional grade. If unset, no grade was set." } id: { type: "string" description: "Unique identifier of the submission" } maxPoints: { type: "number" description: "Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set." } microsoftGraph: { type: "object" description: "A Microsoft Teams submission" properties: { alternateLink: { type: "string" description: "Absolute link to this submission in the Microsoft Teams web UI" } id: { type: "string" description: "Identifier of the submission assigned by Microsoft Teams" } state: { type: "string" description: "State of the submission" } } } returnCreator: { type: "string" description: "The User unique identifier of the teacher who returned the submission\n" } returnDate: { type: "string" description: "The date when the teacher returned the work" } state: { type: "string" description: "State of the submission" enum: ["created", "turnedIn", "returned"] } submissionDate: { type: "string" description: "The date when the student submitted his work" } } } } title: { type: "string" description: "Title of the assignment" } type: { type: "string" description: "Type of the assignment" enum: ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance"] } } } }