Viewing, creating, and modifying coursework in Classroom
What can I build with the coursework endpoints in the Classroom API?
The new endpoints let developers view and manage work in a class. Specifically, you can do all of the following:
- View assignments and questions (collectively referred to as “coursework”) for a user
- Create, modify, and delete coursework
- Attach materials (Drive files, YouTube videos, links) to coursework
- Change the state of a student’s submission (e.g., turn-in, return, reclaim)
- Set the grade for an assignment submission
- Attach materials (Drive files, YouTube videos, links) to student submissions
Some sample use cases for coursework:
- Gradebooks, SIS or reporting systems can sync assignments and grades from Classroom to their applications, eliminating manual data transfer
- Learning applications can create new assignments which appear in the class stream. As students complete work, applications can turn-in the work, set grades, attach student work, and store work in appropriate Drive folders.
What permissions will my application need to create or modify assignments?
For now, an application can only modify work that it creates. In other words, any assignment mutation API requests must use the same Developer Console Project ID that was stored at the assignment creation time.
API requests also require the correct user scopes. Teachers can view assignments, create assignments, attach links to assignment submissions, and set submission grades. Students can view assignments, attach links to their assignment records, and turn-in and reclaim their submissions. Domain administrators can view coursework, but have no write permissions.
What types of items can my application attach to assignment or submissions?
The API supports attaching Drive files, YouTube videos, and links. Attaching native Google Forms is not yet supported.
Will end users know that an assignments in Classroom was created by my application?
Yes. The Classroom UI will identify externally created assignments using the product name of the Dev Console project that created the work. Users will be able to report externally created work as unwanted, as well as disconnect the application that created the work, i.e., revoke any credentials issued to the application by the user.
Classroom share button and other integrations
I’ve already integrated with the Classroom share button. Can I modify an assignment created using the share button?
Not yet. To modify an assignment, the request must use the same DevConsole project that created the assignment. We plan to eventually support API modification of assignments created using the Share button.
Can I create or modify announcements in the API?
No. We currently support creating/modifying assignments and questions (collectively referred to as "coursework").
Can I answer questions in the API?
Not yet. We currently support creating/modifying questions. Answering questions programatically is on our roadmap, but not currently supported.
Feedback and questions
How can I submit feature requests or request issues?
You can submit, view, and vote on feature requests in our issue tracker.
How will I know when new functionality is available in the Classroom API ?
I’m using the Classroom API. How can I ask technical questions?
Post your questions on Stack Overflow with the google-classroom tag.